mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 12:11:31 +08:00
Revert "fix(l0): adjust getCacheProperties"
This reverts commit 8fb7967e8f.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4f21799bd4
commit
575aacabc9
@@ -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) {
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user