From 575aacabc9e0e1b01dd49543e09f7aff5aecd509 Mon Sep 17 00:00:00 2001 From: Compute-Runtime-Validation Date: Tue, 24 Jan 2023 06:04:41 +0100 Subject: [PATCH] Revert "fix(l0): adjust getCacheProperties" This reverts commit 8fb7967e8f65c11bcdbfdd207b0e336ce6e4f187. Signed-off-by: Compute-Runtime-Validation --- level_zero/core/source/device/device_imp.cpp | 3 +-- .../unit_tests/sources/device/test_device.cpp | 23 ------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/level_zero/core/source/device/device_imp.cpp b/level_zero/core/source/device/device_imp.cpp index 5fbfc7a7c5..5121cf24c3 100644 --- a/level_zero/core/source/device/device_imp.cpp +++ b/level_zero/core/source/device/device_imp.cpp @@ -910,8 +910,7 @@ ze_result_t DeviceImp::getCacheProperties(uint32_t *pCount, ze_device_cache_prop } const auto &hardwareInfo = this->getHwInfo(); - uint32_t subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&hardwareInfo); - pCacheProperties[0].cacheSize = hardwareInfo.gtSystemInfo.L3CacheSizeInKb * subDeviceCount * KB; + pCacheProperties[0].cacheSize = hardwareInfo.gtSystemInfo.L3BankCount * 128 * KB; pCacheProperties[0].flags = 0; if (pCacheProperties->pNext) { diff --git a/level_zero/core/test/unit_tests/sources/device/test_device.cpp b/level_zero/core/test/unit_tests/sources/device/test_device.cpp index 3f4626c3df..c25ea8f34e 100644 --- a/level_zero/core/test/unit_tests/sources/device/test_device.cpp +++ b/level_zero/core/test/unit_tests/sources/device/test_device.cpp @@ -1058,29 +1058,6 @@ TEST_F(DeviceTest, givenDeviceCachePropertiesThenAllPropertiesAreAssigned) { EXPECT_NE(deviceCacheProperties.cacheSize, deviceCachePropertiesBefore.cacheSize); } -TEST_F(DeviceTest, givenDeviceWithSubDevicesWhenQueriedForCacheSizeThenValueIsMultiplied) { - ze_device_cache_properties_t deviceCacheProperties = {}; - - auto rootDeviceIndex = device->getNEODevice()->getRootDeviceIndex(); - auto &hwInfo = *device->getNEODevice()->getExecutionEnvironment()->rootDeviceEnvironments[rootDeviceIndex]->getMutableHardwareInfo(); - auto singleRootDeviceCacheSize = hwInfo.gtSystemInfo.L3CacheSizeInKb * KB; - - hwInfo.gtSystemInfo.L3BankCount = 0u; - hwInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true; - - uint32_t count = 0; - ze_result_t res = device->getCacheProperties(&count, nullptr); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - EXPECT_EQ(count, 1u); - - for (uint32_t subDevicesCount : {1, 2, 3}) { - hwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = subDevicesCount; - res = device->getCacheProperties(&count, &deviceCacheProperties); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - EXPECT_EQ(deviceCacheProperties.cacheSize, singleRootDeviceCacheSize * subDevicesCount); - } -} - TEST_F(DeviceTest, givenDevicePropertiesStructureWhenDevicePropertiesCalledThenAllPropertiesAreAssigned) { ze_device_properties_t deviceProperties, devicePropertiesBefore; deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};