[llvm] [Offload] Add device UID (PR #164391)
    Joseph Huber via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 22 08:22:29 PDT 2025
    
    
  
================
@@ -1196,6 +1202,14 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
   /// global device id and is not the device id visible to the OpenMP user.
   const int32_t DeviceId;
 
+  /// The unique identifier of the device.
+  /// Per default, the unique identifier of the device is set to the device id,
+  /// combined with the plugin name, since the offload device id may overlap
+  /// between different plugins.
+  std::string DeviceUid;
+  /// Construct the device UID from the vendor (U)UID.
+  void setDeviceUidFromVendorUid(StringRef VendorUid);
----------------
jhuber6 wrote:
Do we need a global for this? Figured we can just recompute it whenever we call this function, not like it's on a fast path.
https://github.com/llvm/llvm-project/pull/164391
    
    
More information about the llvm-commits
mailing list