Skip to content

Commit

Permalink
[L0] moved ext check
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang, Winston <[email protected]>
  • Loading branch information
winstonzhang-intel committed Jan 28, 2025
1 parent a6900f1 commit 6856db0
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,15 +867,16 @@ ur_result_t urDeviceGetInfo(
return ReturnValue(int32_t(ZeDeviceNumIndices));
} break;
case UR_DEVICE_INFO_GPU_EU_COUNT: {
ze_device_properties_t DeviceProp = {};
DeviceProp.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
ze_eu_count_ext_t EuCountDesc = {};
EuCountDesc.stype = ZE_STRUCTURE_TYPE_EU_COUNT_EXT;
DeviceProp.pNext = (void *)&EuCountDesc;
ZE2UR_CALL(zeDeviceGetProperties, (ZeDevice, &DeviceProp));
if (Device->Platform->ZeDriverEuCountExtensionFound &&
EuCountDesc.numTotalEUs > 0) {
return ReturnValue(uint32_t{EuCountDesc.numTotalEUs});
if (Device->Platform->ZeDriverEuCountExtensionFound {
ze_device_properties_t DeviceProp = {};
DeviceProp.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
ze_eu_count_ext_t EuCountDesc = {};
EuCountDesc.stype = ZE_STRUCTURE_TYPE_EU_COUNT_EXT;
DeviceProp.pNext = (void *)&EuCountDesc;
ZE2UR_CALL(zeDeviceGetProperties, (ZeDevice, &DeviceProp));
if (EuCountDesc.numTotalEUs > 0) {
return ReturnValue(uint32_t{EuCountDesc.numTotalEUs});
}
}
uint32_t count = Device->ZeDeviceProperties->numEUsPerSubslice *
Device->ZeDeviceProperties->numSubslicesPerSlice *
Expand Down

0 comments on commit 6856db0

Please sign in to comment.