fix: account for default chunking flag for shared prefetch determination
This PR accounts for default value of EnableBOChunking recently set to -1. Related-To: NEO-9120 Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
parent
8a50cdf130
commit
ff480efe7a
|
@ -72,6 +72,6 @@ const StackVec<DebugVarPrefix, 4> &ApiSpecificConfig::getPrefixTypes() {
|
|||
|
||||
bool ApiSpecificConfig::isSharedAllocPrefetchEnabled() {
|
||||
return (NEO::DebugManager.flags.ForceMemoryPrefetchForKmdMigratedSharedAllocations.get() ||
|
||||
(NEO::DebugManager.flags.EnableBOChunkingPrefetch.get() && ((NEO::DebugManager.flags.EnableBOChunking.get()) & 0x1)));
|
||||
(NEO::DebugManager.flags.EnableBOChunkingPrefetch.get() && ((NEO::DebugManager.flags.EnableBOChunking.get()) != -1) && ((NEO::DebugManager.flags.EnableBOChunking.get()) & 0x1)));
|
||||
}
|
||||
} // namespace NEO
|
||||
|
|
|
@ -53,6 +53,38 @@ TEST(ApiSpecificConfigL0Tests, GivenDebugFlagSetWhenCheckingIfDynamicPostSyncAll
|
|||
EXPECT_FALSE(ApiSpecificConfig::isDynamicPostSyncAllocLayoutEnabled());
|
||||
}
|
||||
|
||||
TEST(ApiSpecificConfigL0Tests, GivenDebugFlagCombinationsGetCorrectSharedAllocPrefetchEnabled) {
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
EXPECT_FALSE(ApiSpecificConfig::isSharedAllocPrefetchEnabled());
|
||||
|
||||
DebugManager.flags.ForceMemoryPrefetchForKmdMigratedSharedAllocations.set(true);
|
||||
|
||||
EXPECT_TRUE(ApiSpecificConfig::isSharedAllocPrefetchEnabled());
|
||||
|
||||
DebugManager.flags.ForceMemoryPrefetchForKmdMigratedSharedAllocations.set(false);
|
||||
|
||||
DebugManager.flags.EnableBOChunkingPrefetch.set(true);
|
||||
|
||||
EXPECT_FALSE(ApiSpecificConfig::isSharedAllocPrefetchEnabled());
|
||||
|
||||
DebugManager.flags.EnableBOChunking.set(1);
|
||||
|
||||
EXPECT_TRUE(ApiSpecificConfig::isSharedAllocPrefetchEnabled());
|
||||
|
||||
DebugManager.flags.EnableBOChunking.set(2);
|
||||
|
||||
EXPECT_FALSE(ApiSpecificConfig::isSharedAllocPrefetchEnabled());
|
||||
|
||||
DebugManager.flags.EnableBOChunking.set(3);
|
||||
|
||||
EXPECT_TRUE(ApiSpecificConfig::isSharedAllocPrefetchEnabled());
|
||||
|
||||
DebugManager.flags.EnableBOChunking.set(0);
|
||||
|
||||
EXPECT_FALSE(ApiSpecificConfig::isSharedAllocPrefetchEnabled());
|
||||
}
|
||||
|
||||
TEST(ImplicitScalingApiTests, givenLevelZeroApiUsedThenSupportEnabled) {
|
||||
EXPECT_TRUE(ImplicitScaling::apiSupport);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue