mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
18e45b2b42
commit
97faeae16f
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user