[llvm] [Offload] Add device UID (PR #164391)
    Alex Duran via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 21 12:56:53 PDT 2025
    
    
  
================
@@ -148,7 +148,9 @@ struct GenELF64DeviceTy : public GenericDeviceTy {
   /// Create the device with a specific id.
   GenELF64DeviceTy(GenericPluginTy &Plugin, int32_t DeviceId,
                    int32_t NumDevices)
-      : GenericDeviceTy(Plugin, DeviceId, NumDevices, GenELF64GridValues) {}
+      : GenericDeviceTy(Plugin, DeviceId, NumDevices, GenELF64GridValues) {
+    DeviceUid = getHostDeviceUid();
----------------
adurang wrote:
Yes, a physical hardware device might appear as multiple different devices if an OpenMP implementation decides to do so (where each could be a part or the full thing). So, every device with a different deviceId is "logically" a different device.
https://github.com/llvm/llvm-project/pull/164391
    
    
More information about the llvm-commits
mailing list