[llvm] [Offload] Add device UID (PR #164391)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 24 09:55:42 PDT 2025
================
@@ -293,6 +294,12 @@ struct CUDADeviceTy : public GenericDeviceTy {
if (auto Err = Plugin::check(Res, "error in cuDeviceGet: %s"))
return Err;
+ CUuuid UUID = {0};
+ Res = cuDeviceGetUuid(&UUID, Device);
+ if (auto Err = Plugin::check(Res, "error in cuDeviceGetUuid: %s"))
+ return Err;
+ setDeviceUidFromVendorUid(toHex(UUID.bytes, true));
----------------
jhuber6 wrote:
What's the expected use of this? I'm leaning towards not spending the extra bytes to store this permanently and just compute it on-demand. I.e. no `setDeviceUiD` there is only `getDeviceUiD` since we assume it's constant per device (at least within the execution environment since these aren't *Universally* unique IDs.)
https://github.com/llvm/llvm-project/pull/164391
More information about the llvm-commits
mailing list