Skip to content

Commit 7a6d2bd

Browse files
author
Hugh Delaney
committed
Add UUID to device name
Without having a device index or UUID added to the device name, tests were failing in multi GPU systems as tests would instantiate the same testnames for separate GPUs of the same model. This makes each GPU name unique, which in turn makes test names unique.
1 parent 7a6622f commit 7a6d2bd

File tree

1 file changed

+6
-2
lines changed
  • test/conformance/testing/include/uur

1 file changed

+6
-2
lines changed

test/conformance/testing/include/uur/utils.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,13 @@ inline std::string GetPlatformName(ur_platform_handle_t hPlatform) {
189189
}
190190

191191
inline std::string GetDeviceName(ur_device_handle_t device) {
192-
std::string device_name;
192+
std::string device_name, device_uuid;
193193
GetDeviceInfo<std::string>(device, UR_DEVICE_INFO_NAME, device_name);
194-
return GTestSanitizeString(device_name);
194+
GetDeviceInfo<std::string>(device, UR_DEVICE_INFO_UUID, device_uuid);
195+
if (!device_uuid.empty()) {
196+
device_uuid += "____";
197+
}
198+
return GTestSanitizeString(device_name + device_uuid);
195199
}
196200

197201
inline std::string GetPlatformAndDeviceName(ur_device_handle_t device) {

0 commit comments

Comments
 (0)