@@ -1230,7 +1230,15 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
12301230 // see sycl/doc/extensions/supported/sycl_ext_intel_device_info.md.
12311231 std::array<char , 8 > LUID {};
12321232 unsigned int nodeMask = 0 ;
1233- UR_CHECK_ERROR (cuDeviceGetLuid (LUID .data (), &nodeMask, hDevice->get ()));
1233+ // Must pass both parameters - CUDA returns SUCCESS with zeros on
1234+ // unsupported platforms
1235+ CUresult Result = cuDeviceGetLuid (LUID .data (), &nodeMask, hDevice->get ());
1236+
1237+ // CUDA_ERROR_NOT_SUPPORTED means LUID is not available on this platform
1238+ if (Result == CUDA_ERROR_NOT_SUPPORTED ) {
1239+ return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION ;
1240+ }
1241+ UR_CHECK_ERROR (Result);
12341242
12351243 bool isAllZeros = true ;
12361244 for (char num : LUID ) {
@@ -1255,7 +1263,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
12551263 // see sycl/doc/extensions/supported/sycl_ext_intel_device_info.md.
12561264 std::array<char , 8 > LUID {};
12571265 unsigned int nodeMask = 0 ;
1258- UR_CHECK_ERROR (cuDeviceGetLuid (LUID .data (), &nodeMask, hDevice->get ()));
1266+ // Must pass both parameters - CUDA returns SUCCESS with zeros on
1267+ // unsupported platforms
1268+ CUresult Result = cuDeviceGetLuid (LUID .data (), &nodeMask, hDevice->get ());
1269+
1270+ // CUDA_ERROR_NOT_SUPPORTED means node mask is not available on this
1271+ // platform
1272+ if (Result == CUDA_ERROR_NOT_SUPPORTED ) {
1273+ return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION ;
1274+ }
1275+ UR_CHECK_ERROR (Result);
12591276
12601277 // If nodeMask is zero, the feature is not supported on this platform
12611278 if (nodeMask == 0 ) {
0 commit comments