File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -654,9 +654,15 @@ ur_result_t urDeviceGetInfo(
654
654
return ReturnValue (Device->ZeDeviceProperties ->physicalEUSimdWidth / 4 );
655
655
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE:
656
656
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE:
657
+ // Must return 0 for *vector_width_double* if the device does not have fp64.
658
+ if (!(Device->ZeDeviceModuleProperties ->flags & ZE_DEVICE_MODULE_FLAG_FP64))
659
+ return ReturnValue (uint32_t {0 });
657
660
return ReturnValue (Device->ZeDeviceProperties ->physicalEUSimdWidth / 8 );
658
661
case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF:
659
662
case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF:
663
+ // Must return 0 for *vector_width_half* if the device does not have fp16.
664
+ if (!(Device->ZeDeviceModuleProperties ->flags & ZE_DEVICE_MODULE_FLAG_FP16))
665
+ return ReturnValue (uint32_t {0 });
660
666
return ReturnValue (Device->ZeDeviceProperties ->physicalEUSimdWidth / 2 );
661
667
case UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS: {
662
668
// Max_num_sub_Groups = maxTotalGroupSize/min(set of subGroupSizes);
You can’t perform that action at this time.
0 commit comments