mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
Create getGmmHelper function in MemoryManager
Related-To: NEO-6523 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
518595dd97
commit
4f1e01d279
@@ -272,7 +272,7 @@ HWTEST_F(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocatingDebugAreaThenH
|
||||
}
|
||||
auto moduleDebugArea = osAgnosticMemoryManager.allocateGraphicsMemoryWithProperties(properties);
|
||||
auto gpuAddress = moduleDebugArea->getGpuAddress();
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[moduleDebugArea->getRootDeviceIndex()].get()->getGmmHelper();
|
||||
auto gmmHelper = osAgnosticMemoryManager.getGmmHelper(moduleDebugArea->getRootDeviceIndex());
|
||||
|
||||
EXPECT_LE(gmmHelper->canonize(osAgnosticMemoryManager.getGfxPartition(0)->getHeapBase(expectedHeap)), gpuAddress);
|
||||
EXPECT_GT(gmmHelper->canonize(osAgnosticMemoryManager.getGfxPartition(0)->getHeapLimit(expectedHeap)), gpuAddress);
|
||||
|
||||
@@ -30,7 +30,7 @@ TEST_F(FrontWindowAllocatorTests, givenAllocateInFrontWindowPoolFlagWhenAllocate
|
||||
allocData.size = MemoryConstants::kiloByte;
|
||||
auto allocation(memManager->allocate32BitGraphicsMemoryImpl(allocData, false));
|
||||
auto heap = memManager->heapAssigner.get32BitHeapIndex(allocData.type, false, *defaultHwInfo, true);
|
||||
auto gmmHelper = memManager.get()->peekExecutionEnvironment().rootDeviceEnvironments[allocation->getRootDeviceIndex()].get()->getGmmHelper();
|
||||
auto gmmHelper = memManager.get()->getGmmHelper(allocData.rootDeviceIndex);
|
||||
|
||||
EXPECT_EQ(gmmHelper->canonize(memManager->getGfxPartition(0)->getHeapMinimalAddress(heap)), allocation->getGpuAddress());
|
||||
EXPECT_LT(ptrOffset(allocation->getGpuAddress(), allocation->getUnderlyingBufferSize()), gmmHelper->canonize(memManager->getGfxPartition(0)->getHeapLimit(heap)));
|
||||
|
||||
Reference in New Issue
Block a user