performance: add debug flag to control timestamp caching

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2024-08-30 11:13:10 +00:00
committed by Compute-Runtime-Automation
parent 4db039055f
commit ce3cb71773
4 changed files with 21 additions and 0 deletions

View File

@@ -811,6 +811,16 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu
}
}
TEST(GmmTest, givenDebugFlagWhenTimestampAllocationsAreQueriedThenBufferPolicyIsReturned) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceNonCoherentModeForTimestamps.set(1);
MockExecutionEnvironment mockExecutionEnvironment{};
const auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<ProductHelper>();
auto expectedUsage = GMM_RESOURCE_USAGE_OCL_BUFFER;
EXPECT_EQ(expectedUsage, CacheSettingsHelper::getGmmUsageType(AllocationType::gpuTimestampDeviceBuffer, false, productHelper));
EXPECT_EQ(expectedUsage, CacheSettingsHelper::getGmmUsageType(AllocationType::timestampPacketTagBuffer, false, productHelper));
}
TEST(GmmTest, givenForceAllResourcesUncachedFlagSetWhenGettingUsageTypeThenReturnUncached) {
DebugManagerStateRestore restore;
debugManager.flags.ForceAllResourcesUncached.set(true);