@@ -670,35 +670,35 @@ ur_result_t urDeviceGetInfo(
670
670
case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE:
671
671
return ReturnValue (
672
672
size_t {Device->ZeDeviceImageProperties ->maxImageArraySlices });
673
- // Handle SIMD widths.
674
- // TODO: can we do better than this?
673
+ // Handle SIMD widths, matching compute-runtime OpenCL implementation:
674
+ // https://github.com/intel/compute-runtime/blob/291745cdf76d83f5dc40e7ef41d347366235ccdb/opencl/source/cl_device/cl_device_caps.cpp#L236
675
675
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR:
676
676
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR:
677
- return ReturnValue (Device-> ZeDeviceProperties -> physicalEUSimdWidth / 1 );
677
+ return ReturnValue (uint32_t { 16 } );
678
678
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT:
679
679
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT:
680
- return ReturnValue (Device-> ZeDeviceProperties -> physicalEUSimdWidth / 2 );
680
+ return ReturnValue (uint32_t { 8 } );
681
681
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT:
682
682
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT:
683
- return ReturnValue (Device-> ZeDeviceProperties -> physicalEUSimdWidth / 4 );
683
+ return ReturnValue (uint32_t { 4 } );
684
684
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG:
685
685
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG:
686
- return ReturnValue (Device-> ZeDeviceProperties -> physicalEUSimdWidth / 8 );
686
+ return ReturnValue (uint32_t { 1 } );
687
687
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT:
688
688
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT:
689
- return ReturnValue (Device-> ZeDeviceProperties -> physicalEUSimdWidth / 4 );
689
+ return ReturnValue (uint32_t { 1 } );
690
690
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE:
691
691
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE:
692
692
// Must return 0 for *vector_width_double* if the device does not have fp64.
693
693
if (!(Device->ZeDeviceModuleProperties ->flags & ZE_DEVICE_MODULE_FLAG_FP64))
694
694
return ReturnValue (uint32_t {0 });
695
- return ReturnValue (Device-> ZeDeviceProperties -> physicalEUSimdWidth / 8 );
695
+ return ReturnValue (uint32_t { 1 } );
696
696
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF:
697
697
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF:
698
698
// Must return 0 for *vector_width_half* if the device does not have fp16.
699
699
if (!(Device->ZeDeviceModuleProperties ->flags & ZE_DEVICE_MODULE_FLAG_FP16))
700
700
return ReturnValue (uint32_t {0 });
701
- return ReturnValue (Device-> ZeDeviceProperties -> physicalEUSimdWidth / 2 );
701
+ return ReturnValue (uint32_t { 8 } );
702
702
case UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS: {
703
703
// Max_num_sub_Groups = maxTotalGroupSize/min(set of subGroupSizes);
704
704
uint32_t MinSubGroupSize =
0 commit comments