@@ -188,8 +188,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
188
188
}
189
189
case UR_DEVICE_INFO_ATOMIC_64:
190
190
return ReturnValue (
191
- static_cast <uint32_t >(Device->ZeDeviceModuleProperties ->flags &
192
- ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS));
191
+ static_cast <ur_bool_t >(Device->ZeDeviceModuleProperties ->flags &
192
+ ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS));
193
193
case UR_DEVICE_INFO_EXTENSIONS: {
194
194
// Convention adopted from OpenCL:
195
195
// "Returns a space separated list of extension names (the extension
@@ -258,9 +258,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
258
258
case UR_DEVICE_INFO_BUILD_ON_SUBDEVICE:
259
259
return ReturnValue (uint32_t {0 });
260
260
case UR_DEVICE_INFO_COMPILER_AVAILABLE:
261
- return ReturnValue (static_cast <uint32_t >(true ));
261
+ return ReturnValue (static_cast <ur_bool_t >(true ));
262
262
case UR_DEVICE_INFO_LINKER_AVAILABLE:
263
- return ReturnValue (static_cast <uint32_t >(true ));
263
+ return ReturnValue (static_cast <ur_bool_t >(true ));
264
264
case UR_DEVICE_INFO_MAX_COMPUTE_UNITS: {
265
265
uint32_t MaxComputeUnits =
266
266
Device->ZeDeviceProperties ->numEUsPerSubslice *
@@ -410,7 +410,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
410
410
case UR_EXT_DEVICE_INFO_OPENCL_C_VERSION:
411
411
return ReturnValue (" " );
412
412
case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC:
413
- return ReturnValue (static_cast <uint32_t >(true ));
413
+ return ReturnValue (static_cast <ur_bool_t >(true ));
414
414
case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE:
415
415
return ReturnValue (
416
416
size_t {Device->ZeDeviceModuleProperties ->printfBufferSize });
@@ -427,7 +427,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
427
427
return ReturnValue (ur_device_exec_capability_flag_t {
428
428
UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL});
429
429
case UR_DEVICE_INFO_ENDIAN_LITTLE:
430
- return ReturnValue (static_cast <uint32_t >(true ));
430
+ return ReturnValue (static_cast <ur_bool_t >(true ));
431
431
case UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT:
432
432
return ReturnValue (static_cast <uint32_t >(Device->ZeDeviceProperties ->flags &
433
433
ZE_DEVICE_PROPERTY_FLAG_ECC));
@@ -604,7 +604,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
604
604
}
605
605
case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: {
606
606
// TODO: Not supported yet. Needs to be updated after support is added.
607
- return ReturnValue (static_cast <uint32_t >(false ));
607
+ return ReturnValue (static_cast <ur_bool_t >(false ));
608
608
}
609
609
case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL: {
610
610
// ze_device_compute_properties.subGroupSizes is in uint32_t whereas the
@@ -790,7 +790,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
790
790
return UR_RESULT_ERROR_INVALID_VALUE;
791
791
case UR_DEVICE_INFO_BFLOAT16: {
792
792
// bfloat16 math functions are not yet supported on Intel GPUs.
793
- return ReturnValue (bool {false });
793
+ return ReturnValue (ur_bool_t {false });
794
794
}
795
795
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: {
796
796
// There are no explicit restrictions in L0 programming guide, so assume all
@@ -839,9 +839,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
839
839
return ReturnValue (capabilities);
840
840
}
841
841
case UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT:
842
- return ReturnValue (uint32_t {false });
842
+ return ReturnValue (ur_bool_t {false });
843
843
case UR_DEVICE_INFO_IMAGE_SRGB:
844
- return ReturnValue (uint32_t {false });
844
+ return ReturnValue (ur_bool_t {false });
845
845
846
846
case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES:
847
847
case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES: {
@@ -853,7 +853,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
853
853
0 )); // __read_write attribute currently undefinde in opencl
854
854
}
855
855
case UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT: {
856
- return ReturnValue (static_cast <uint32_t >(true ));
856
+ return ReturnValue (static_cast <ur_bool_t >(true ));
857
857
}
858
858
859
859
case UR_DEVICE_INFO_ESIMD_SUPPORT: {
@@ -893,9 +893,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
893
893
// can know if we are in (a) or (b) by checking if a tile is root device
894
894
// or not.
895
895
ur_device_handle_t URDev = Device->Platform ->getDeviceFromNativeHandle (d);
896
- if (URDev->isSubDevice ())
896
+ if (URDev->isSubDevice ()) {
897
897
// We are in COMPOSITE mode, return an empty list.
898
- return ReturnValue (0 );
898
+ if (pSize) {
899
+ *pSize = 0 ;
900
+ }
901
+ return UR_RESULT_SUCCESS;
902
+ }
899
903
900
904
Res.push_back (URDev);
901
905
}
0 commit comments