[llvm] [Offload] Add device UID (PR #164391)
    Robert Imschweiler via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 22 08:55:34 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);
----------------
ro-i wrote:
I just added this set function so that it can be consistently called from the initImpl method of the plugins.
Ok, I can also return std::string and thus remove the attribute
https://github.com/llvm/llvm-project/pull/164391
    
    
More information about the llvm-commits
mailing list