performance: limit tlb flush scope to DG2

Related-To: NEO-7116

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2024-10-30 17:29:01 +00:00
committed by Compute-Runtime-Automation
parent d755c3b3e4
commit 10d123ae3e
6 changed files with 15 additions and 23 deletions

View File

@@ -63,7 +63,7 @@ void ProductHelperHw<gfxProduct>::adjustSamplerState(void *sampler, const Hardwa
template <PRODUCT_FAMILY gfxProduct>
bool ProductHelperHw<gfxProduct>::isTlbFlushRequired() const {
bool tlbFlushRequired = true;
bool tlbFlushRequired = false;
if (debugManager.flags.ForceTlbFlush.get() != -1) {
tlbFlushRequired = !!debugManager.flags.ForceTlbFlush.get();
}

View File

@@ -148,15 +148,6 @@ bool ProductHelperHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const RootDev
return false;
}
template <>
bool ProductHelperHw<gfxProduct>::isTlbFlushRequired() const {
bool tlbFlushRequired = false;
if (debugManager.flags.ForceTlbFlush.get() != -1) {
tlbFlushRequired = !!debugManager.flags.ForceTlbFlush.get();
}
return tlbFlushRequired;
}
template <>
bool ProductHelperHw<gfxProduct>::isBlitSplitEnqueueWARequired(const HardwareInfo &hwInfo) const {
return true;

View File

@@ -266,4 +266,13 @@ bool ProductHelperHw<gfxProduct>::isHostUsmAllocationReuseSupported() const {
return true;
}
template <>
bool ProductHelperHw<gfxProduct>::isTlbFlushRequired() const {
bool tlbFlushRequired = true;
if (debugManager.flags.ForceTlbFlush.get() != -1) {
tlbFlushRequired = !!debugManager.flags.ForceTlbFlush.get();
}
return tlbFlushRequired;
}
} // namespace NEO

View File

@@ -492,14 +492,14 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenCallGetInternalHeapsPrealloca
EXPECT_EQ(productHelper->getInternalHeapsPreallocated(), 3u);
}
HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfIsTlbFlushRequiredThenTrueIsReturned, IsNotXeHpgOrXeHpcCore) {
EXPECT_TRUE(productHelper->isTlbFlushRequired());
HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfIsTlbFlushRequiredThenFalseIsReturned, IsNotXeHpgCore) {
EXPECT_FALSE(productHelper->isTlbFlushRequired());
}
HWTEST2_F(ProductHelperTest, givenProductHelperAndForceTlbFlushNotSetWhenAskedIfIsTlbFlushRequiredThenFalseIsReturned, IsNotPVC) {
HWTEST_F(ProductHelperTest, givenProductHelperAndForceTlbFlushSetWhenAskedIfIsTlbFlushRequiredThenTrueIsReturned) {
DebugManagerStateRestore restore{};
debugManager.flags.ForceTlbFlush.set(0);
EXPECT_FALSE(productHelper->isTlbFlushRequired());
debugManager.flags.ForceTlbFlush.set(1);
EXPECT_TRUE(productHelper->isTlbFlushRequired());
}
HWTEST_F(ProductHelperTest, givenLockableAllocationWhenGettingIsBlitCopyRequiredForLocalMemoryThenCorrectValuesAreReturned) {

View File

@@ -29,10 +29,6 @@ PVCTEST_F(PvcProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValue
EXPECT_EQ(aub_stream::ProductFamily::Pvc, productHelper->getAubStreamProductFamily());
}
PVCTEST_F(PvcProductHelper, whenCheckIsTlbFlushRequiredThenReturnProperValue) {
EXPECT_FALSE(productHelper->isTlbFlushRequired());
}
PVCTEST_F(PvcProductHelper, whenForceTlbFlushSetAndCheckIsTlbFlushRequiredThenReturnProperValue) {
DebugManagerStateRestore restore;
debugManager.flags.ForceTlbFlush.set(1);

View File

@@ -13,10 +13,6 @@ using namespace NEO;
using MtlProductHelperWindows = ProductHelperTestWindows;
MTLTEST_F(MtlProductHelperWindows, whenCheckIsTlbFlushRequiredThenReturnProperValue) {
EXPECT_TRUE(productHelper->isTlbFlushRequired());
}
MTLTEST_F(MtlProductHelperWindows, whenCheckingIsTimestampWaitSupportedForEventsThenReturnTrue) {
EXPECT_TRUE(productHelper->isTimestampWaitSupportedForEvents());
}