Skip to content

Commit 4bcc7f2

Browse files
committed
use DeviceUid setter in generic device constructor
1 parent a35b1be commit 4bcc7f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

offload/plugins-nextgen/common/src/PluginInterface.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,9 @@ GenericDeviceTy::GenericDeviceTy(GenericPluginTy &Plugin, int32_t DeviceId,
715715
DeviceId(DeviceId), GridValues(OMPGridValues),
716716
PeerAccesses(NumDevices, PeerAccessState::PENDING), PeerAccessesLock(),
717717
PinnedAllocs(*this), RPCServer(nullptr) {
718-
DeviceUid = std::string(Plugin.getName()) + "-" +
719-
std::to_string(static_cast<uint64_t>(DeviceId));
718+
// Conservative fall-back to the plugin's device uid for the case that no real
719+
// vendor (u)uid will become available later.
720+
setDeviceUidFromVendorUid(std::to_string(static_cast<uint64_t>(DeviceId)));
720721

721722
#ifdef OMPT_SUPPORT
722723
OmptInitialized.store(false);

0 commit comments

Comments
 (0)