fix: add limitations for setting gmm flag Cacheable

- move isCachingOnCpuAvailable to product helper
- isCachingOnCpuAvailable should return false on mtl
- if wsl, skip checking method from product helper

Related-To: NEO-7194
Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
This commit is contained in:
Cencelewska, Katarzyna
2023-05-29 11:11:44 +00:00
committed by Compute-Runtime-Automation
parent 6f21d133cf
commit d2436a8231
19 changed files with 55 additions and 35 deletions

View File

@@ -1867,8 +1867,8 @@ HWTEST_F(OsAgnosticMemoryManagerUsingWddmTest, givenEnabled64kbPagesWhenAllocati
EXPECT_EQ(MemoryConstants::pageSize64k, graphicsAllocation->getUnderlyingBufferSize());
EXPECT_NE(0llu, graphicsAllocation->getGpuAddress());
EXPECT_NE(nullptr, graphicsAllocation->getUnderlyingBuffer());
auto &gfxCoreHelper = executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->getHelper<GfxCoreHelper>();
EXPECT_EQ(gfxCoreHelper.isCachingOnCpuAvailable(), graphicsAllocation->getDefaultGmm()->resourceParams.Flags.Info.Cacheable);
auto &productHelper = executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->getHelper<ProductHelper>();
EXPECT_EQ(productHelper.isCachingOnCpuAvailable(), graphicsAllocation->getDefaultGmm()->resourceParams.Flags.Info.Cacheable);
memoryManager.freeGraphicsMemory(graphicsAllocation);
}