mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Revert "Add ze_eu_count_t to get total number of EUs"
This reverts commit 2b963c7359.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
789a53e8f8
commit
4a3862b514
@@ -744,19 +744,6 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
||||
}
|
||||
}
|
||||
|
||||
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 *zeEuCountDesc = 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();
|
||||
}
|
||||
zeEuCountDesc->numTotalEUs = numTotalEUs;
|
||||
}
|
||||
}
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -1078,34 +1078,6 @@ TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDebugVariableOverrideDevice
|
||||
EXPECT_STREQ(deviceProperties.name, testDeviceName.c_str());
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, WhenRequestingZeEuCountThenExpectedEUsAreReturned) {
|
||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
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;
|
||||
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxEuPerSubSlice = maxEuPerSubSlice;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SubSliceCount = subSliceCount;
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SliceCount = sliceCount;
|
||||
|
||||
device->getProperties(&deviceProperties);
|
||||
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount * sliceCount;
|
||||
|
||||
EXPECT_EQ(expectedEUs, zeEuCountDesc.numTotalEUs);
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, WhenRequestingZeEuCountWithIncorrectStypeThenPNextIsIgnored) {
|
||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
ze_eu_count_ext_t zeEuCountDesc = {ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES};
|
||||
deviceProperties.pNext = &zeEuCountDesc;
|
||||
device->getProperties(&deviceProperties);
|
||||
EXPECT_EQ(0u, zeEuCountDesc.numTotalEUs);
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, WhenGettingDevicePropertiesThenSubslicesPerSliceIsBasedOnSubslicesSupported) {
|
||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
deviceProperties.type = ZE_DEVICE_TYPE_GPU;
|
||||
@@ -1963,27 +1935,6 @@ TEST_F(MultipleDevicesDisabledImplicitScalingTest, whenCallingGetMemoryPropertie
|
||||
EXPECT_EQ(memProperties.totalSize, device0->getNEODevice()->getDeviceInfo().globalMemSize / numSubDevices);
|
||||
}
|
||||
|
||||
TEST_F(MultipleDevicesEnabledImplicitScalingTest, WhenRequestingZeEuCountThenExpectedEUsAreReturned) {
|
||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
device->getProperties(&deviceProperties);
|
||||
|
||||
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount * sliceCount;
|
||||
|
||||
EXPECT_EQ(expectedEUs * numSubDevices, zeEuCountDesc.numTotalEUs);
|
||||
}
|
||||
|
||||
TEST_F(MultipleDevicesEnabledImplicitScalingTest, whenCallingGetMemoryPropertiesWithSubDevicesThenCorrectSizeReturned) {
|
||||
L0::Device *device0 = driverHandle->devices[0];
|
||||
uint32_t count = 1;
|
||||
|
||||
Reference in New Issue
Block a user