mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
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:
committed by
Compute-Runtime-Automation
parent
d755c3b3e4
commit
10d123ae3e
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user