feature: heapAssigner per root device

- create heapAssigner per root device in memory manager to allow per
device config

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-10-19 14:24:35 +00:00
committed by Compute-Runtime-Automation
parent 18e45b2b42
commit 97faeae16f
16 changed files with 44 additions and 40 deletions

View File

@@ -17,9 +17,7 @@ namespace NEO {
using AlocationHelperTests = Test<ClDeviceFixture>;
HWTEST_F(AlocationHelperTests, givenLinearStreamTypeWhenUseExternalAllocatorForSshAndDshDisabledThenUse32BitIsFalse) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.UseExternalAllocatorForSshAndDsh.set(true);
HeapAssigner heapAssigner = {};
HeapAssigner heapAssigner{false};
EXPECT_FALSE(heapAssigner.use32BitHeap(AllocationType::LINEAR_STREAM));
}

View File

@@ -352,6 +352,15 @@ TEST(ClMemoryManagerTest, givenForcedLinearImages3DImageAndProperDescriptorValue
alignedFree(hostPtr);
}
TEST(ClOsAgnosticMemoryManager, givenUseExternalAllocatorForSshAndDshWhenMemoryManagerCreatedThenExternalHeapIsNotallowed) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.UseExternalAllocatorForSshAndDsh.set(true);
MockExecutionEnvironment executionEnvironment{};
MockMemoryManager memoryManager(false, false, executionEnvironment);
EXPECT_FALSE(memoryManager.heapAssigners[0]->apiAllowExternalHeapForSshAndDsh);
}
using ClMemoryManagerMultiRootDeviceTests = MultiRootDeviceFixture;
TEST_F(ClMemoryManagerMultiRootDeviceTests, WhenAllocatingGlobalSurfaceThenItHasCorrectRootDeviceIndex) {