performance: add debug key to control cpu cacheablitiy

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2024-06-19 09:52:20 +00:00
committed by Compute-Runtime-Automation
parent f7888fac0d
commit 0e29ab8387
4 changed files with 22 additions and 0 deletions

View File

@@ -136,4 +136,19 @@ HWTEST_F(GmmTests, givenVariousResourceUsageTypeWhenCreateGmmThenFlagCacheableIs
}
}
HWTEST_F(GmmTests, givenVariousCacheableDebugSettingsTheCacheableFieldIsProgrammedCorrectly) {
DebugManagerStateRestore restore;
debugManager.flags.OverrideGmmCacheableField.set(0);
StorageInfo storageInfo{};
GmmRequirements gmmRequirements{};
auto gmm = std::make_unique<Gmm>(getGmmHelper(), nullptr, 0, 0, GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER, storageInfo, gmmRequirements);
EXPECT_FALSE(gmm->resourceParams.Flags.Info.Cacheable);
debugManager.flags.OverrideGmmCacheableField.set(1);
auto gmm2 = std::make_unique<Gmm>(getGmmHelper(), nullptr, 0, 0, GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER, storageInfo, gmmRequirements);
EXPECT_TRUE(gmm2->resourceParams.Flags.Info.Cacheable);
}
} // namespace NEO