[llvm] [Offload] Add device UID (PR #164391)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 22 08:57:30 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:
> Ok, I can also return std::string and thus remove the attribute
But then, I have to do the hsa/cuda call every time. That doesn't seem appropriate?
https://github.com/llvm/llvm-project/pull/164391
More information about the llvm-commits
mailing list