[llvm] [Offload] Add device UID (PR #164391)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 12:40:34 PDT 2025
================
@@ -1524,11 +1527,18 @@ Error GenericDeviceTy::enqueueHostCall(void (*Callback)(void *), void *UserData,
return Err;
}
+Expected<InfoTreeNode> GenericDeviceTy::obtainInfo() {
+ Expected<InfoTreeNode> Info = obtainInfoImpl();
+ if (Info)
+ Info->add("UID", DeviceUid, "", DeviceInfo::UID);
+ return Info;
+}
+
Error GenericDeviceTy::printInfo() {
- auto Info = obtainInfoImpl();
+ Expected<InfoTreeNode> Info = obtainInfo();
// Get the vendor-specific info entries describing the device properties.
- if (auto Err = Info.takeError())
+ if (Error Err = Info.takeError())
----------------
ro-i wrote:
I now aligned with the use of auto in the rest of the file. Then we can decide on auto or no-auto at some other occasion and for all occurrences :)
https://github.com/llvm/llvm-project/pull/164391
More information about the llvm-commits
mailing list