fix: disable passing FtrTile64Optimization to gmmlib

add debug key to control if the value should be passed

Related-To: NEO-10785
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-03-15 15:54:44 +00:00
committed by Compute-Runtime-Automation
parent f7342ff910
commit 1e1d675606
5 changed files with 84 additions and 1 deletions

View File

@@ -941,6 +941,35 @@ TEST(GmmHelperTest, givenValidGmmFunctionsWhenCreateGmmHelperWithoutOsInterfaceT
EXPECT_EQ(0, memcmp(&expectedWaTable, &passedWaTable, sizeof(WA_TABLE)));
EXPECT_EQ(GMM_CLIENT::GMM_OCL_VISTA, passedInputArgs.ClientType);
}
TEST(GmmHelperTest, givenEnableFtrTile64OptimizationDebugKeyWhenSetThenProperValueIsPassedToGmmlib) {
DebugManagerStateRestore restorer;
VariableBackup<decltype(passedInputArgs)> passedInputArgsBackup(&passedInputArgs);
VariableBackup<decltype(passedFtrTable)> passedFtrTableBackup(&passedFtrTable);
VariableBackup<decltype(passedGtSystemInfo)> passedGtSystemInfoBackup(&passedGtSystemInfo);
VariableBackup<decltype(passedWaTable)> passedWaTableBackup(&passedWaTable);
VariableBackup<decltype(copyInputArgs)> copyInputArgsBackup(&copyInputArgs, true);
auto hwInfo = defaultHwInfo.get();
{
MockExecutionEnvironment executionEnvironment{hwInfo};
EXPECT_EQ(0u, passedFtrTable.FtrTile64Optimization);
}
{
debugManager.flags.EnableFtrTile64Optimization.set(-1);
MockExecutionEnvironment executionEnvironment{hwInfo};
EXPECT_EQ(0u, passedFtrTable.FtrTile64Optimization);
}
{
debugManager.flags.EnableFtrTile64Optimization.set(0);
MockExecutionEnvironment executionEnvironment{hwInfo};
EXPECT_EQ(0u, passedFtrTable.FtrTile64Optimization);
}
{
debugManager.flags.EnableFtrTile64Optimization.set(1);
MockExecutionEnvironment executionEnvironment{hwInfo};
EXPECT_EQ(1u, passedFtrTable.FtrTile64Optimization);
}
}
TEST(GmmHelperTest, givenGmmHelperAndL3CacheDisabledForDebugThenCorrectMOCSIsReturned) {
decltype(GmmHelper::createGmmContextWrapperFunc) createGmmContextSave = GmmHelper::createGmmContextWrapperFunc;