Respect ForceAllResourcesUncached flag

Respect debug flag ForceAllResourcesUncached even when
Override L1 Policy flags are also set

Related-To: NEO-7003

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2022-08-12 12:23:39 +00:00
committed by Compute-Runtime-Automation
parent 025c3dd7a1
commit aa3a4765b9
17 changed files with 194 additions and 21 deletions

View File

@ -1760,7 +1760,16 @@ HWTEST2_F(ProgramTests, givenDebugFlagSetToWbWhenGetInternalOptionsThenCorrectBu
EXPECT_TRUE(CompilerOptions::contains(internalOptions, "-cl-store-cache-default=7 -cl-load-cache-default=4"));
}
HWTEST2_F(ProgramTests, givenAtLeastDG2WhenGetInternalOptionsThenCorrectBuildOptionIsSet, IsAtLeastXeHpgCore) {
HWTEST2_F(ProgramTests, givenDebugFlagSetForceAllResourcesUncachedWhenGetInternalOptionsThenCorrectBuildOptionIsSet, IsAtLeastXeHpgCore) {
DebugManagerStateRestore restorer;
DebugManager.flags.OverrideL1CachePolicyInSurfaceStateAndStateless.set(2);
DebugManager.flags.ForceAllResourcesUncached.set(true);
MockProgram program(pContext, false, toClDeviceVector(*pClDevice));
auto internalOptions = program.getInternalOptions();
EXPECT_TRUE(CompilerOptions::contains(internalOptions, "-cl-store-cache-default=1 -cl-load-cache-default=1"));
}
HWTEST2_F(ProgramTests, givenAtLeastXeHpgCoreWhenGetInternalOptionsThenCorrectBuildOptionIsSet, IsAtLeastXeHpgCore) {
MockProgram program(pContext, false, toClDeviceVector(*pClDevice));
auto internalOptions = program.getInternalOptions();
EXPECT_TRUE(CompilerOptions::contains(internalOptions, "-cl-store-cache-default=2 -cl-load-cache-default=4"));

View File

@ -110,7 +110,13 @@ XE_HPC_CORETEST_F(CmdsProgrammingTestsXeHpcCore, givenL1CachingOverrideWhenState
EXPECT_EQ(0u, sbaCmd.getL1CachePolicyL1CacheControl());
DebugManager.flags.ForceStatelessL1CachingPolicy.set(1u);
DebugManager.flags.ForceStatelessL1CachingPolicy.set(2u);
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);
EXPECT_EQ(2u, sbaCmd.getL1CachePolicyL1CacheControl());
DebugManager.flags.ForceAllResourcesUncached.set(true);
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);

View File

@ -110,7 +110,13 @@ DG2TEST_F(CmdsProgrammingTestsDg2, givenL1CachingOverrideWhenStateBaseAddressIsP
EXPECT_EQ(0u, sbaCmd.getL1CachePolicyL1CacheControl());
DebugManager.flags.ForceStatelessL1CachingPolicy.set(1u);
DebugManager.flags.ForceStatelessL1CachingPolicy.set(2u);
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);
EXPECT_EQ(2u, sbaCmd.getL1CachePolicyL1CacheControl());
DebugManager.flags.ForceAllResourcesUncached.set(true);
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);

View File

@ -110,7 +110,13 @@ XE_HPG_CORETEST_F(CmdsProgrammingTestsXeHpgCore, givenL1CachingOverrideWhenState
EXPECT_EQ(0u, sbaCmd.getL1CachePolicyL1CacheControl());
DebugManager.flags.ForceStatelessL1CachingPolicy.set(1u);
DebugManager.flags.ForceStatelessL1CachingPolicy.set(2u);
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);
EXPECT_EQ(2u, sbaCmd.getL1CachePolicyL1CacheControl());
DebugManager.flags.ForceAllResourcesUncached.set(true);
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);