Skip to content

Commit 83025da

Browse files
Revert "Add ze_eu_count_t to get total number of EUs"
This reverts commit 24c18be. Signed-off-by: Compute-Runtime-Validation <[email protected]>
1 parent 24c18be commit 83025da

File tree

3 files changed

+1
-63
lines changed

3 files changed

+1
-63
lines changed

level_zero/core/source/device/device_imp.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -562,19 +562,6 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
562562
std::string name = getNEODevice()->getDeviceInfo().name;
563563
memcpy_s(pDeviceProperties->name, name.length(), name.c_str(), name.length());
564564

565-
if (pDeviceProperties->pNext) {
566-
ze_base_desc_t *extendedDesc = reinterpret_cast<ze_base_desc_t *>(pDeviceProperties->pNext);
567-
if (extendedDesc->stype == ZE_STRUCTURE_TYPE_EU_COUNT_EXT) {
568-
ze_eu_count_ext_t *ze_eu_count_desc = reinterpret_cast<ze_eu_count_ext_t *>(extendedDesc);
569-
uint32_t numTotalEUs = hardwareInfo.gtSystemInfo.MaxEuPerSubSlice * hardwareInfo.gtSystemInfo.SubSliceCount * hardwareInfo.gtSystemInfo.SliceCount;
570-
571-
if (isImplicitScalingCapable()) {
572-
numTotalEUs *= neoDevice->getNumGenericSubDevices();
573-
}
574-
ze_eu_count_desc->numTotalEUs = numTotalEUs;
575-
}
576-
}
577-
578565
return ZE_RESULT_SUCCESS;
579566
}
580567

level_zero/core/test/black_box_tests/zello_world_gpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]) {
149149

150150
SUCCESS_OR_TERMINATE(zeContextDestroy(context));
151151

152-
std::cout << "\nZello World GPU Results validation " << (outputValidationSuccessful ? "PASSED" : "FAILED") << "\n";
152+
std::cout << "\nZello World Results validation " << (outputValidationSuccessful ? "PASSED" : "FAILED") << "\n";
153153

154154
return 0;
155155
}

level_zero/core/test/unit_tests/sources/device/test_device.cpp

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -966,34 +966,6 @@ TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDevicePropertiesCalledThenA
966966
EXPECT_NE(deviceProperties.maxMemAllocSize, devicePropertiesBefore.maxMemAllocSize);
967967
}
968968

969-
TEST_F(DeviceTest, WhenRequestingZeEuCountThenExpectedEUsAreReturned) {
970-
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
971-
ze_eu_count_ext_t ze_eu_count_desc = {ZE_STRUCTURE_TYPE_EU_COUNT_EXT};
972-
deviceProperties.pNext = &ze_eu_count_desc;
973-
974-
uint32_t maxEuPerSubSlice = 48;
975-
uint32_t subSliceCount = 8;
976-
uint32_t sliceCount = 1;
977-
978-
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxEuPerSubSlice = maxEuPerSubSlice;
979-
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SubSliceCount = subSliceCount;
980-
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SliceCount = sliceCount;
981-
982-
device->getProperties(&deviceProperties);
983-
984-
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount * sliceCount;
985-
986-
EXPECT_EQ(expectedEUs, ze_eu_count_desc.numTotalEUs);
987-
}
988-
989-
TEST_F(DeviceTest, WhenRequestingZeEuCountWithIncorrectStypeThenPNextIsIgnored) {
990-
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
991-
ze_eu_count_ext_t ze_eu_count_desc = {ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES};
992-
deviceProperties.pNext = &ze_eu_count_desc;
993-
device->getProperties(&deviceProperties);
994-
EXPECT_EQ(0u, ze_eu_count_desc.numTotalEUs);
995-
}
996-
997969
TEST_F(DeviceTest, WhenGettingDevicePropertiesThenSubslicesPerSliceIsBasedOnSubslicesSupported) {
998970
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
999971
deviceProperties.type = ZE_DEVICE_TYPE_GPU;
@@ -1668,27 +1640,6 @@ TEST_F(MultipleDevicesDisabledImplicitScalingTest, whenCallingGetMemoryPropertie
16681640
EXPECT_EQ(memProperties.totalSize, device0->getNEODevice()->getDeviceInfo().globalMemSize / numSubDevices);
16691641
}
16701642

1671-
TEST_F(MultipleDevicesEnabledImplicitScalingTest, WhenRequestingZeEuCountThenExpectedEUsAreReturned) {
1672-
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
1673-
ze_eu_count_ext_t ze_eu_count_desc = {ZE_STRUCTURE_TYPE_EU_COUNT_EXT};
1674-
deviceProperties.pNext = &ze_eu_count_desc;
1675-
1676-
uint32_t maxEuPerSubSlice = 48;
1677-
uint32_t subSliceCount = 8;
1678-
uint32_t sliceCount = 1;
1679-
1680-
L0::Device *device = driverHandle->devices[0];
1681-
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.MaxEuPerSubSlice = maxEuPerSubSlice;
1682-
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SubSliceCount = subSliceCount;
1683-
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->gtSystemInfo.SliceCount = sliceCount;
1684-
1685-
device->getProperties(&deviceProperties);
1686-
1687-
uint32_t expectedEUs = maxEuPerSubSlice * subSliceCount * sliceCount;
1688-
1689-
EXPECT_EQ(expectedEUs * numSubDevices, ze_eu_count_desc.numTotalEUs);
1690-
}
1691-
16921643
TEST_F(MultipleDevicesEnabledImplicitScalingTest, whenCallingGetMemoryPropertiesWithSubDevicesThenCorrectSizeReturned) {
16931644
L0::Device *device0 = driverHandle->devices[0];
16941645
uint32_t count = 1;

0 commit comments

Comments
 (0)