mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 00:10:58 +08:00
Add ze_eu_count_t to get total number of EUs
Related-To: LOCI-2667 Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8ec74558ea
commit
635c02e1ff
@@ -552,6 +552,20 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
||||
std::string name = getNEODevice()->getDeviceInfo().name;
|
||||
memcpy_s(pDeviceProperties->name, name.length(), name.c_str(), name.length());
|
||||
|
||||
if (pDeviceProperties->pNext) {
|
||||
ze_base_desc_t *extendedDesc = reinterpret_cast<ze_base_desc_t *>(pDeviceProperties->pNext);
|
||||
if (extendedDesc->stype == ZE_STRUCTURE_TYPE_EU_COUNT_EXT) {
|
||||
ze_eu_count_ext_t *ze_eu_count_desc = reinterpret_cast<ze_eu_count_ext_t *>(extendedDesc);
|
||||
uint32_t numTotalEUs = hardwareInfo.gtSystemInfo.MaxEuPerSubSlice * hardwareInfo.gtSystemInfo.SubSliceCount * hardwareInfo.gtSystemInfo.SliceCount;
|
||||
|
||||
if (isImplicitScalingCapable()) {
|
||||
numTotalEUs *= neoDevice->getNumGenericSubDevices();
|
||||
}
|
||||
|
||||
ze_eu_count_desc->numTotalEUs = numTotalEUs;
|
||||
}
|
||||
}
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user