[llvm] [Offload] Add device UID (PR #164391)

Robert Imschweiler via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 06:08:34 PDT 2025


================
@@ -715,6 +715,9 @@ GenericDeviceTy::GenericDeviceTy(GenericPluginTy &Plugin, int32_t DeviceId,
       DeviceId(DeviceId), GridValues(OMPGridValues),
       PeerAccesses(NumDevices, PeerAccessState::PENDING), PeerAccessesLock(),
       PinnedAllocs(*this), RPCServer(nullptr) {
+  DeviceUid = std::string(Plugin.getName()) + "-" +
----------------
ro-i wrote:

That it's not a uuid as in "universal" uid (that's why I only call it "uid", too). Specifically, OpenMP 6.0, Section 9.1 says:
> The uid trait specifies a unique identifier string of the device, for which the accepted values are implementation defined.

So it's only an identifier unique to a device *on a given system*.

https://github.com/llvm/llvm-project/pull/164391


More information about the llvm-commits mailing list