fix: Add per product cache line size property

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2024-07-18 11:32:45 +00:00
committed by Compute-Runtime-Automation
parent 64acb65b08
commit 85e708819a
14 changed files with 31 additions and 1 deletions

View File

@@ -483,6 +483,11 @@ struct HwMapper<IGFX_UNKNOWN> {
using GfxProduct = UnknownProduct;
};
template <>
uint32_t ProductHelperHw<IGFX_UNKNOWN>::getCacheLineSize() const {
return 0x40;
}
} // namespace NEO
#include "shared/source/os_interface/product_helper.inl"

View File

@@ -90,6 +90,8 @@ using IsAtMostPVC = IsAtMostProduct<IGFX_PVC>;
using IsNotPVC = IsNotWithinProducts<IGFX_PVC, IGFX_PVC>;
using IsNotPvcOrDg2 = IsNotWithinProducts<IGFX_DG2, IGFX_PVC>;
using IsAtLeastBmg = IsAtLeastProduct<IGFX_BMG>;
using HasStatefulSupport = IsNotAnyGfxCores<IGFX_XE_HPC_CORE>;
using HasNoStatefulSupport = IsAnyGfxCores<IGFX_XE_HPC_CORE>;

View File

@@ -970,4 +970,12 @@ TEST(ProductHelperPreemptionSettingTest, whenSipClassIsForcedToBuiltinThenRequir
hwInfo.capabilityTable.requiredPreemptionSurfaceSize = initialPreemptionSurfaceSize;
MockProductHelper::setupPreemptionSurfaceSize(hwInfo, *executionEnvironment.rootDeviceEnvironments[0]);
EXPECT_EQ(initialPreemptionSurfaceSize, hwInfo.capabilityTable.requiredPreemptionSurfaceSize);
}
HWTEST2_F(ProductHelperTest, givenProductHelperWhenItsPreXe2ThenCacheLineSizeIs64Bytes, IsAtMostPVC) {
EXPECT_EQ(productHelper->getCacheLineSize(), 64u);
}
HWTEST2_F(ProductHelperTest, givenProductHelperWhenItsXe2PlusThenCacheLineSizeIs256Bytes, IsAtLeastBmg) {
EXPECT_EQ(productHelper->getCacheLineSize(), 256u);
}