fix: define isCachingOnCpuAvailable per hw release

Related-To: NEO-8187
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-09-13 09:55:17 +00:00
committed by Compute-Runtime-Automation
parent 2f7c33c1fd
commit 3eb98163a8
19 changed files with 37 additions and 34 deletions

View File

@@ -809,10 +809,6 @@ HWTEST_F(ProductHelperTest, whenDisableL3ForDebugCalledThenFalseIsReturned) {
EXPECT_FALSE(productHelper->disableL3CacheForDebug(*defaultHwInfo));
}
HWTEST_F(ProductHelperTest, whenCheckIsCachingOnCpuAvailableThenAlwaysTrue) {
EXPECT_TRUE(productHelper->isCachingOnCpuAvailable());
}
HWTEST_F(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned) {
uint64_t patIndex = 1u;
bool isUncached = true;

View File

@@ -3150,8 +3150,12 @@ HWTEST_F(MockWddmMemoryManagerTest, givenEnabled64kbPagesWhenAllocationIsCreated
EXPECT_EQ(MemoryConstants::pageSize64k, graphicsAllocation->getUnderlyingBufferSize());
EXPECT_NE(0llu, graphicsAllocation->getGpuAddress());
EXPECT_NE(nullptr, graphicsAllocation->getUnderlyingBuffer());
auto &productHelper = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHelper<ProductHelper>();
EXPECT_EQ(productHelper.isCachingOnCpuAvailable(), graphicsAllocation->getDefaultGmm()->resourceParams.Flags.Info.Cacheable);
auto releaseHelper = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getReleaseHelper();
if (releaseHelper) {
EXPECT_EQ(releaseHelper->isCachingOnCpuAvailable(), graphicsAllocation->getDefaultGmm()->resourceParams.Flags.Info.Cacheable);
} else {
EXPECT_TRUE(graphicsAllocation->getDefaultGmm()->resourceParams.Flags.Info.Cacheable);
}
memoryManager.freeGraphicsMemory(graphicsAllocation);
}