mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +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
@ -1072,7 +1072,7 @@ TEST(MemoryManagerTest, givenEnabledLocalMemoryWhenAllocatingSharedResourceCopyT
|
||||
EXPECT_EQ(MemoryPool::LocalMemory, allocation->getMemoryPool());
|
||||
EXPECT_EQ(0u, allocation->getDefaultGmm()->resourceParams.Flags.Info.NonLocalOnly);
|
||||
|
||||
auto gmmHelper = executionEnvironment->rootDeviceEnvironments[allocation->getRootDeviceIndex()].get()->getGmmHelper();
|
||||
auto gmmHelper = memoryManager.getGmmHelper(allocation->getRootDeviceIndex());
|
||||
EXPECT_LT(gmmHelper->canonize(memoryManager.getGfxPartition(allocation->getRootDeviceIndex())->getHeapBase(HeapIndex::HEAP_STANDARD64KB)), allocation->getGpuAddress());
|
||||
EXPECT_GT(gmmHelper->canonize(memoryManager.getGfxPartition(allocation->getRootDeviceIndex())->getHeapLimit(HeapIndex::HEAP_STANDARD64KB)), allocation->getGpuAddress());
|
||||
EXPECT_EQ(0llu, allocation->getGpuBaseAddress());
|
||||
|
@ -1308,7 +1308,7 @@ TEST(OsAgnosticMemoryManager, givenDebugModuleAreaTypeWhenCreatingAllocationThen
|
||||
EXPECT_LT(address64bit, MemoryConstants::max32BitAddress);
|
||||
EXPECT_TRUE(moduleDebugArea->is32BitAllocation());
|
||||
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[moduleDebugArea->getRootDeviceIndex()].get()->getGmmHelper();
|
||||
auto gmmHelper = memoryManager.getGmmHelper(moduleDebugArea->getRootDeviceIndex());
|
||||
auto frontWindowBase = gmmHelper->canonize(memoryManager.getGfxPartition(moduleDebugArea->getRootDeviceIndex())->getHeapBase(memoryManager.selectInternalHeap(moduleDebugArea->isAllocatedInLocalMemoryPool())));
|
||||
EXPECT_EQ(frontWindowBase, moduleDebugArea->getGpuBaseAddress());
|
||||
EXPECT_EQ(frontWindowBase, moduleDebugArea->getGpuAddress());
|
||||
@ -1346,7 +1346,7 @@ TEST(OsAgnosticMemoryManager, givenLocalMemoryAndDebugModuleAreaTypeWhenCreating
|
||||
EXPECT_LT(address64bit, MemoryConstants::max32BitAddress);
|
||||
EXPECT_TRUE(moduleDebugArea->is32BitAllocation());
|
||||
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[moduleDebugArea->getRootDeviceIndex()].get()->getGmmHelper();
|
||||
auto gmmHelper = memoryManager.getGmmHelper(moduleDebugArea->getRootDeviceIndex());
|
||||
auto frontWindowBase = gmmHelper->canonize(memoryManager.getGfxPartition(moduleDebugArea->getRootDeviceIndex())->getHeapBase(memoryManager.selectInternalHeap(moduleDebugArea->isAllocatedInLocalMemoryPool())));
|
||||
EXPECT_EQ(frontWindowBase, moduleDebugArea->getGpuBaseAddress());
|
||||
EXPECT_EQ(frontWindowBase, moduleDebugArea->getGpuAddress());
|
||||
|
Reference in New Issue
Block a user