File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2091,11 +2091,11 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
20912091 //
20922092 // Agents that do not support UUID will return the string "GPU-XX" or
20932093 // "CPU-XX" or "DSP-XX" depending on their device type.
2094- char Uuid [24 ] = {0 };
2095- if (auto Err = getDeviceAttr (HSA_AMD_AGENT_INFO_UUID, Uuid ))
2094+ char UUID [24 ] = {0 };
2095+ if (auto Err = getDeviceAttr (HSA_AMD_AGENT_INFO_UUID, UUID ))
20962096 return Err;
2097- if (strcmp (Uuid + 3 , " -XX" ) != 0 )
2098- setDeviceUidFromVendorUid (Uuid );
2097+ if (! StringRef (UUID). ends_with ( " -XX" ))
2098+ setDeviceUidFromVendorUid (UUID );
20992099
21002100 // Get the wavefront size.
21012101 uint32_t WavefrontSize = 0 ;
Original file line number Diff line number Diff line change @@ -294,11 +294,11 @@ struct CUDADeviceTy : public GenericDeviceTy {
294294 if (auto Err = Plugin::check (Res, " error in cuDeviceGet: %s" ))
295295 return Err;
296296
297- CUuuid Uuid = {0 };
298- Res = cuDeviceGetUuid (&Uuid , Device);
297+ CUuuid UUID = {0 };
298+ Res = cuDeviceGetUuid (&UUID , Device);
299299 if (auto Err = Plugin::check (Res, " error in cuDeviceGetUuid: %s" ))
300300 return Err;
301- setDeviceUidFromVendorUid (toHex (Uuid .bytes , true ));
301+ setDeviceUidFromVendorUid (toHex (UUID .bytes , true ));
302302
303303 // Query the current flags of the primary context and set its flags if
304304 // it is inactive.
You can’t perform that action at this time.
0 commit comments