fix: report correct EU counts for multi-slice platforms
Related-To: GSD-10625 Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
parent
01e59c1b78
commit
c3c2028ed6
|
@ -1042,7 +1042,7 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
|||
}
|
||||
} else if (extendedProperties->stype == ZE_STRUCTURE_TYPE_EU_COUNT_EXT) {
|
||||
ze_eu_count_ext_t *zeEuCountDesc = reinterpret_cast<ze_eu_count_ext_t *>(extendedProperties);
|
||||
uint32_t numTotalEUs = hardwareInfo.gtSystemInfo.MaxEuPerSubSlice * hardwareInfo.gtSystemInfo.SubSliceCount * hardwareInfo.gtSystemInfo.SliceCount;
|
||||
uint32_t numTotalEUs = hardwareInfo.gtSystemInfo.EUCount;
|
||||
|
||||
if (isImplicitScalingCapable()) {
|
||||
numTotalEUs *= neoDevice->getNumGenericSubDevices();
|
||||
|
|
|
@ -1360,18 +1360,15 @@ TEST_F(DeviceTest, WhenRequestingZeEuCountThenExpectedEUsAreReturned) {
|
|||
ze_eu_count_ext_t zeEuCountDesc = {ZE_STRUCTURE_TYPE_EU_COUNT_EXT};
|
||||
deviceProperties.pNext = &zeEuCountDesc;
|
||||
|
||||
uint32_t maxEuPerSubSlice = 48;
|
||||
uint32_t subSliceCount = 8;
|
||||
uint32_t sliceCount = 1;
|
||||
uint32_t maxEuPerSubSlice = 8;
|
||||
uint32_t subSliceCount = 18;
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount;
|
||||
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxEuPerSubSlice = maxEuPerSubSlice;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SubSliceCount = subSliceCount;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SliceCount = sliceCount;
|
||||
auto hwInfo = device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
hwInfo->gtSystemInfo.EUCount = expectedEUs;
|
||||
|
||||
device->getProperties(&deviceProperties);
|
||||
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount * sliceCount;
|
||||
|
||||
EXPECT_EQ(expectedEUs, zeEuCountDesc.numTotalEUs);
|
||||
}
|
||||
|
||||
|
@ -1383,16 +1380,13 @@ TEST_F(DeviceTest, WhenRequestingZeEuCountWithoutStypeCorrectThenNoEusAreReturne
|
|||
|
||||
uint32_t maxEuPerSubSlice = 48;
|
||||
uint32_t subSliceCount = 8;
|
||||
uint32_t sliceCount = 1;
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount;
|
||||
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxEuPerSubSlice = maxEuPerSubSlice;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SubSliceCount = subSliceCount;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SliceCount = sliceCount;
|
||||
auto hwInfo = device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
hwInfo->gtSystemInfo.EUCount = expectedEUs;
|
||||
|
||||
device->getProperties(&deviceProperties);
|
||||
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount * sliceCount;
|
||||
|
||||
EXPECT_NE(expectedEUs, zeEuCountDesc.numTotalEUs);
|
||||
EXPECT_EQ(std::numeric_limits<uint32_t>::max(), zeEuCountDesc.numTotalEUs);
|
||||
}
|
||||
|
@ -2524,17 +2518,14 @@ TEST_F(MultipleDevicesEnabledImplicitScalingTest, WhenRequestingZeEuCountThenExp
|
|||
|
||||
uint32_t maxEuPerSubSlice = 48;
|
||||
uint32_t subSliceCount = 8;
|
||||
uint32_t sliceCount = 1;
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount;
|
||||
|
||||
L0::Device *device = driverHandle->devices[0];
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxEuPerSubSlice = maxEuPerSubSlice;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SubSliceCount = subSliceCount;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SliceCount = sliceCount;
|
||||
auto hwInfo = device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
hwInfo->gtSystemInfo.EUCount = expectedEUs;
|
||||
|
||||
device->getProperties(&deviceProperties);
|
||||
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount * sliceCount;
|
||||
|
||||
EXPECT_EQ(expectedEUs * numSubDevices, zeEuCountDesc.numTotalEUs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue