Revert "performance: Fill reusable allocation list on xe and later"

This reverts commit 15934ceb43.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation 2024-03-02 06:39:42 +01:00 committed by Compute-Runtime-Automation
parent 52430762ac
commit 293858320e
6 changed files with 22 additions and 32 deletions

View File

@ -681,6 +681,14 @@ bool GfxCoreHelperHw<GfxFamily>::copyThroughLockedPtrEnabled(const HardwareInfo
return false;
}
template <typename GfxFamily>
uint32_t GfxCoreHelperHw<GfxFamily>::getAmountOfAllocationsToFill() const {
if (debugManager.flags.SetAmountOfReusableAllocations.get() != -1) {
return debugManager.flags.SetAmountOfReusableAllocations.get();
}
return 0u;
}
template <typename GfxFamily>
bool GfxCoreHelperHw<GfxFamily>::isChipsetUniqueUUIDSupported() const {
return false;

View File

@ -43,14 +43,6 @@ bool GfxCoreHelperHw<GfxFamily>::timestampPacketWriteSupported() const {
return false;
}
template <typename GfxFamily>
uint32_t GfxCoreHelperHw<GfxFamily>::getAmountOfAllocationsToFill() const {
if (debugManager.flags.SetAmountOfReusableAllocations.get() != -1) {
return debugManager.flags.SetAmountOfReusableAllocations.get();
}
return 0u;
}
template <typename GfxFamily>
bool GfxCoreHelperHw<GfxFamily>::isTimestampWaitSupportedForQueues() const {
return false;

View File

@ -58,14 +58,6 @@ bool GfxCoreHelperHw<GfxFamily>::isTimestampWaitSupportedForQueues() const {
return true;
}
template <typename GfxFamily>
uint32_t GfxCoreHelperHw<GfxFamily>::getAmountOfAllocationsToFill() const {
if (debugManager.flags.SetAmountOfReusableAllocations.get() != -1) {
return debugManager.flags.SetAmountOfReusableAllocations.get();
}
return 1u;
}
template <typename GfxFamily>
bool GfxCoreHelperHw<GfxFamily>::makeResidentBeforeLockNeeded(bool precondition) const {
return true;

View File

@ -399,6 +399,14 @@ bool GfxCoreHelperHw<Family>::copyThroughLockedPtrEnabled(const HardwareInfo &hw
return true;
}
template <>
uint32_t GfxCoreHelperHw<Family>::getAmountOfAllocationsToFill() const {
if (debugManager.flags.SetAmountOfReusableAllocations.get() != -1) {
return debugManager.flags.SetAmountOfReusableAllocations.get();
}
return 1u;
}
template <>
bool GfxCoreHelperHw<Family>::isRelaxedOrderingSupported() const {
return true;

View File

@ -1347,6 +1347,11 @@ HWTEST2_F(GfxCoreHelperTest, givenGfxCoreHelperWhenCallCopyThroughLockedPtrEnabl
EXPECT_FALSE(gfxCoreHelper.copyThroughLockedPtrEnabled(*defaultHwInfo, productHelper));
}
HWTEST2_F(GfxCoreHelperTest, givenGfxCoreHelperWhenCallGetAmountOfAllocationsToFillThenReturnFalse, IsNotXeHpcCore) {
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
EXPECT_EQ(gfxCoreHelper.getAmountOfAllocationsToFill(), 0u);
}
HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenFlagSetAndCallCopyThroughLockedPtrEnabledThenReturnCorrectValue) {
DebugManagerStateRestore restorer;
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
@ -1358,11 +1363,9 @@ HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenFlagSetAndCallCopyThroughLocke
EXPECT_TRUE(gfxCoreHelper.copyThroughLockedPtrEnabled(*defaultHwInfo, productHelper));
}
HWTEST2_F(GfxCoreHelperTest, givenGfxCoreHelperWhenFlagSetAndCallGetAmountOfAllocationsToFillThenReturnCorrectValue, IsBeforeXeHpCore) {
HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenFlagSetAndCallGetAmountOfAllocationsToFillThenReturnCorrectValue) {
DebugManagerStateRestore restorer;
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
EXPECT_EQ(gfxCoreHelper.getAmountOfAllocationsToFill(), 0u);
debugManager.flags.SetAmountOfReusableAllocations.set(0);
EXPECT_EQ(gfxCoreHelper.getAmountOfAllocationsToFill(), 0u);

View File

@ -232,19 +232,6 @@ HWTEST2_F(GfxCoreHelperDg2AndLaterTest, givenGfxCoreHelperWhenCheckMakeResidentB
EXPECT_TRUE(gfxCoreHelper.makeResidentBeforeLockNeeded(false));
}
HWTEST2_F(GfxCoreHelperDg2AndLaterTest, givenGfxCoreHelperWhenFlagSetAndCallGetAmountOfAllocationsToFillThenReturnCorrectValue, IsAtLeastXeHpgCore) {
DebugManagerStateRestore restorer;
MockExecutionEnvironment mockExecutionEnvironment{};
auto &gfxCoreHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
EXPECT_EQ(gfxCoreHelper.getAmountOfAllocationsToFill(), 1u);
debugManager.flags.SetAmountOfReusableAllocations.set(0);
EXPECT_EQ(gfxCoreHelper.getAmountOfAllocationsToFill(), 0u);
debugManager.flags.SetAmountOfReusableAllocations.set(1);
EXPECT_EQ(gfxCoreHelper.getAmountOfAllocationsToFill(), 1u);
}
using ProductHelperTestDg2AndLater = ::testing::Test;
HWTEST2_F(ProductHelperTestDg2AndLater, givenDg2AndLaterPlatformWhenAskedIfHeapInLocalMemThenTrueIsReturned, IsAtLeastXeHpgCore) {