fix: defer initialization of cross root device tag allocations

additional tag allocations are not needed before creating OCL contexts
with multiple root devices

Related-To: NEO-7634

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-01-13 10:36:23 +00:00
committed by Compute-Runtime-Automation
parent dff2c2d8e3
commit c4759884d8
6 changed files with 128 additions and 56 deletions

View File

@@ -1406,11 +1406,7 @@ TEST_F(DrmMemoryManagerTest, GivenMisalignedHostPtrAndMultiplePagesSizeWhenAsked
auto hostPtrManager = static_cast<MockHostPtrManager *>(memoryManager->getHostPtrManager());
if (memoryManager->isLimitedRange(rootDeviceIndex)) {
ASSERT_EQ(6u, hostPtrManager->getFragmentCount());
} else {
ASSERT_EQ(3u, hostPtrManager->getFragmentCount());
}
ASSERT_EQ(3u, hostPtrManager->getFragmentCount());
auto reqs = MockHostPtrManager::getAllocationRequirements(rootDeviceIndex, ptr, size);
@@ -1422,11 +1418,7 @@ TEST_F(DrmMemoryManagerTest, GivenMisalignedHostPtrAndMultiplePagesSizeWhenAsked
}
memoryManager->freeGraphicsMemory(graphicsAllocation);
if (memoryManager->isLimitedRange(rootDeviceIndex)) {
EXPECT_EQ(3u, hostPtrManager->getFragmentCount());
} else {
EXPECT_EQ(0u, hostPtrManager->getFragmentCount());
}
EXPECT_EQ(0u, hostPtrManager->getFragmentCount());
}
TEST_F(DrmMemoryManagerTest, givenMemoryManagerWhenAskedFor32BitAllocationThen32BitDrmAllocationIsBeingReturned) {