From 6e998fc3c1311cbd13861d06bbc72806123c056d Mon Sep 17 00:00:00 2001 From: Dominik Dabek Date: Fri, 21 Mar 2025 11:07:58 +0000 Subject: [PATCH] fix: move host usm reuse max size to mem manager Intialize value on memory manager creation. Related-To: NEO-6893 Signed-off-by: Dominik Dabek --- .../execution_environment.cpp | 2 + .../source/memory_manager/memory_manager.cpp | 9 +++ shared/source/memory_manager/memory_manager.h | 15 ++-- .../memory_manager/unified_memory_manager.cpp | 10 +-- .../memory_manager/unified_memory_manager.h | 1 - .../test/common/mocks/mock_memory_manager.h | 1 + .../test/common/mocks/ult_device_factory.cpp | 1 + .../execution_environment_tests.cpp | 4 +- .../unified_memory_manager_cache_tests.cpp | 72 ++++++++++--------- 9 files changed, 67 insertions(+), 48 deletions(-) diff --git a/shared/source/execution_environment/execution_environment.cpp b/shared/source/execution_environment/execution_environment.cpp index 7096732e7e..1bfd2be044 100644 --- a/shared/source/execution_environment/execution_environment.cpp +++ b/shared/source/execution_environment/execution_environment.cpp @@ -90,6 +90,8 @@ bool ExecutionEnvironment::initializeMemoryManager() { } break; } + memoryManager->initUsmReuseMaxSize(); + return memoryManager->isInitialized(); } diff --git a/shared/source/memory_manager/memory_manager.cpp b/shared/source/memory_manager/memory_manager.cpp index 0a2b32909c..7999c41d12 100644 --- a/shared/source/memory_manager/memory_manager.cpp +++ b/shared/source/memory_manager/memory_manager.cpp @@ -389,6 +389,15 @@ uint32_t MemoryManager::getFirstContextIdForRootDevice(uint32_t rootDeviceIndex) return 0; } +void MemoryManager::initUsmReuseMaxSize() { + const auto totalSystemMemory = this->getSystemSharedMemory(0u); + auto fractionOfTotalMemoryForRecycling = 0.02; + if (debugManager.flags.ExperimentalEnableHostAllocationCache.get() != -1) { + fractionOfTotalMemoryForRecycling = 0.01 * std::min(100, debugManager.flags.ExperimentalEnableHostAllocationCache.get()); + } + this->maxAllocationsSavedForReuseSize = static_cast(fractionOfTotalMemoryForRecycling * totalSystemMemory); +} + OsContext *MemoryManager::createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, const EngineDescriptor &engineDescriptor) { auto rootDeviceIndex = commandStreamReceiver->getRootDeviceIndex(); diff --git a/shared/source/memory_manager/memory_manager.h b/shared/source/memory_manager/memory_manager.h index d0d2137927..f119499261 100644 --- a/shared/source/memory_manager/memory_manager.h +++ b/shared/source/memory_manager/memory_manager.h @@ -342,15 +342,21 @@ class MemoryManager { return std::unique_lock(hostAllocationsReuseMtx); } - void recordHostAllocationSaveForReuse(size_t size) { + void initUsmReuseMaxSize(); + + uint64_t getMaxAllocationsSavedForReuseSize() const { + return maxAllocationsSavedForReuseSize; + } + + void recordHostAllocationSaveForReuse(uint64_t size) { hostAllocationsSavedForReuseSize += size; } - void recordHostAllocationGetFromReuse(size_t size) { + void recordHostAllocationGetFromReuse(uint64_t size) { hostAllocationsSavedForReuseSize -= size; } - size_t getHostAllocationsSavedForReuseSize() const { + uint64_t getHostAllocationsSavedForReuseSize() const { return hostAllocationsSavedForReuseSize; } @@ -430,7 +436,8 @@ class MemoryManager { std::mutex physicalMemoryAllocationMapMutex; std::unique_ptr[]> localMemAllocsSize; std::atomic sysMemAllocsSize; - size_t hostAllocationsSavedForReuseSize = 0u; + uint64_t maxAllocationsSavedForReuseSize = 0u; + uint64_t hostAllocationsSavedForReuseSize = 0u; mutable std::mutex hostAllocationsReuseMtx; std::map, CustomHeapAllocatorConfig> customHeapAllocators; }; diff --git a/shared/source/memory_manager/unified_memory_manager.cpp b/shared/source/memory_manager/unified_memory_manager.cpp index 4ea34c3064..5b8f9d7614 100644 --- a/shared/source/memory_manager/unified_memory_manager.cpp +++ b/shared/source/memory_manager/unified_memory_manager.cpp @@ -75,7 +75,7 @@ bool SVMAllocsManager::SvmAllocationCache::insert(size_t size, void *ptr, SvmAll } } else { auto lock = memoryManager->obtainHostAllocationsReuseLock(); - if (size + memoryManager->getHostAllocationsSavedForReuseSize() > this->maxSize) { + if (size + memoryManager->getHostAllocationsSavedForReuseSize() > memoryManager->getMaxAllocationsSavedForReuseSize()) { isSuccess = false; } else { memoryManager->recordHostAllocationSaveForReuse(size); @@ -912,14 +912,8 @@ void SVMAllocsManager::initUsmDeviceAllocationsCache(Device &device) { } void SVMAllocsManager::initUsmHostAllocationsCache() { - const auto totalSystemMemory = this->memoryManager->getSystemSharedMemory(0u); - auto fractionOfTotalMemoryForRecycling = 0.02; - if (debugManager.flags.ExperimentalEnableHostAllocationCache.get() != -1) { - fractionOfTotalMemoryForRecycling = 0.01 * std::min(100, debugManager.flags.ExperimentalEnableHostAllocationCache.get()); - } this->usmHostAllocationsCache.reset(new SvmAllocationCache); - this->usmHostAllocationsCache->maxSize = static_cast(fractionOfTotalMemoryForRecycling * totalSystemMemory); - if (this->usmHostAllocationsCache->maxSize > 0u) { + if (memoryManager->getMaxAllocationsSavedForReuseSize() > 0u) { this->usmHostAllocationsCache->allocations.reserve(128u); this->usmHostAllocationsCache->svmAllocsManager = this; this->usmHostAllocationsCache->memoryManager = memoryManager; diff --git a/shared/source/memory_manager/unified_memory_manager.h b/shared/source/memory_manager/unified_memory_manager.h index 50c6932c29..7e0cc30409 100644 --- a/shared/source/memory_manager/unified_memory_manager.h +++ b/shared/source/memory_manager/unified_memory_manager.h @@ -201,7 +201,6 @@ class SVMAllocsManager { std::vector allocations; std::mutex mtx; - size_t maxSize = 0; SVMAllocsManager *svmAllocsManager = nullptr; MemoryManager *memoryManager = nullptr; bool enablePerformanceLogging = false; diff --git a/shared/test/common/mocks/mock_memory_manager.h b/shared/test/common/mocks/mock_memory_manager.h index 01d04dc434..743dee8ecd 100644 --- a/shared/test/common/mocks/mock_memory_manager.h +++ b/shared/test/common/mocks/mock_memory_manager.h @@ -62,6 +62,7 @@ class MockMemoryManager : public MemoryManagerCreate { using MemoryManager::latestContextId; using MemoryManager::localMemAllocsSize; using MemoryManager::localMemorySupported; + using MemoryManager::maxAllocationsSavedForReuseSize; using MemoryManager::reservedMemory; using MemoryManager::secondaryEngines; diff --git a/shared/test/common/mocks/ult_device_factory.cpp b/shared/test/common/mocks/ult_device_factory.cpp index 9a65902246..f2639ecdcf 100644 --- a/shared/test/common/mocks/ult_device_factory.cpp +++ b/shared/test/common/mocks/ult_device_factory.cpp @@ -94,6 +94,7 @@ bool UltDeviceFactory::initializeMemoryManager(ExecutionEnvironment &executionEn bool enableLocalMemory = gfxCoreHelper.getEnableLocalMemory(*defaultHwInfo); bool aubUsage = (testMode == TestMode::aubTests) || (testMode == TestMode::aubTestsWithTbx); executionEnvironment.memoryManager.reset(new MockMemoryManager(false, enableLocalMemory, aubUsage, executionEnvironment)); + executionEnvironment.memoryManager->initUsmReuseMaxSize(); } return true; } diff --git a/shared/test/unit_test/execution_environment/execution_environment_tests.cpp b/shared/test/unit_test/execution_environment/execution_environment_tests.cpp index 62908ef8d9..a409c29096 100644 --- a/shared/test/unit_test/execution_environment/execution_environment_tests.cpp +++ b/shared/test/unit_test/execution_environment/execution_environment_tests.cpp @@ -396,7 +396,9 @@ TEST(ExecutionEnvironment, givenEnvVarUsedInCalConfigAlsoSetByAppWhenCreateExecu TEST(ExecutionEnvironment, givenExecutionEnvironmentWhenInitializeMemoryManagerIsCalledThenItIsInitalized) { MockExecutionEnvironment executionEnvironment{}; executionEnvironment.initializeMemoryManager(); - EXPECT_NE(nullptr, executionEnvironment.memoryManager); + ASSERT_NE(nullptr, executionEnvironment.memoryManager); + EXPECT_TRUE(executionEnvironment.memoryManager->isInitialized()); + EXPECT_NE(0u, executionEnvironment.memoryManager->getMaxAllocationsSavedForReuseSize()); } static_assert(sizeof(ExecutionEnvironment) == sizeof(std::unique_ptr) + diff --git a/shared/test/unit_test/memory_manager/unified_memory_manager_cache_tests.cpp b/shared/test/unit_test/memory_manager/unified_memory_manager_cache_tests.cpp index 120ecbe5c5..8b29d72c47 100644 --- a/shared/test/unit_test/memory_manager/unified_memory_manager_cache_tests.cpp +++ b/shared/test/unit_test/memory_manager/unified_memory_manager_cache_tests.cpp @@ -986,6 +986,9 @@ HWTEST_F(SvmHostAllocationCacheTest, givenOclApiSpecificConfigWhenCheckingIfEnab std::unique_ptr deviceFactory(new UltDeviceFactory(1, 1)); auto device = deviceFactory->rootDevices[0]; RAIIProductHelperFactory raii(*device->getExecutionEnvironment()->rootDeviceEnvironments[0]); + const auto expectedMaxSize = static_cast(0.02 * device->getMemoryManager()->getSystemSharedMemory(0u)); + EXPECT_EQ(expectedMaxSize, device->getMemoryManager()->getMaxAllocationsSavedForReuseSize()); + { raii.mockProductHelper->isHostUsmAllocationReuseSupportedResult = false; auto svmManager = std::make_unique(device->getMemoryManager(), false); @@ -999,8 +1002,6 @@ HWTEST_F(SvmHostAllocationCacheTest, givenOclApiSpecificConfigWhenCheckingIfEnab EXPECT_EQ(nullptr, svmManager->usmHostAllocationsCache); svmManager->initUsmAllocationsCaches(*device); EXPECT_NE(nullptr, svmManager->usmHostAllocationsCache); - const auto expectedMaxSize = static_cast(0.02 * svmManager->memoryManager->getSystemSharedMemory(0u)); - EXPECT_EQ(expectedMaxSize, svmManager->usmHostAllocationsCache->maxSize); } } @@ -1016,10 +1017,11 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingHostAll DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(device->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; auto testDataset = std::vector( {{1u, nullptr}, @@ -1066,7 +1068,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenInitializedThe ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); auto expectedMaxSize = static_cast(svmManager->memoryManager->getSystemSharedMemory(mockRootDeviceIndex) * 0.02); - EXPECT_EQ(expectedMaxSize, svmManager->usmHostAllocationsCache->maxSize); + EXPECT_EQ(expectedMaxSize, device->getMemoryManager()->getMaxAllocationsSavedForReuseSize()); } TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingHostAllocationThenItIsPutIntoCacheOnlyIfMaxSizeWillNotBeExceeded) { @@ -1076,14 +1078,13 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingHostAll DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto memoryManager = device->getMemoryManager(); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); auto svmManager = std::make_unique(memoryManager, false); + constexpr auto allocationSize = MemoryConstants::pageSize64k; + memoryManager->maxAllocationsSavedForReuseSize = allocationSize; svmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - constexpr auto allocationSize = MemoryConstants::pageSize64k; - svmManager->usmHostAllocationsCache->maxSize = allocationSize; - SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory, 1, rootDeviceIndices, deviceBitfields); { auto allocation = svmManager->createHostUnifiedMemoryAllocation(allocationSize, unifiedMemoryProperties); @@ -1148,18 +1149,16 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledAndMultipleSVMMana DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto memoryManager = device->getMemoryManager(); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); auto svmManager = std::make_unique(memoryManager, false); auto secondSvmManager = std::make_unique(memoryManager, false); + constexpr auto allocationSize = MemoryConstants::pageSize64k; + memoryManager->maxAllocationsSavedForReuseSize = allocationSize; svmManager->initUsmAllocationsCaches(*device); secondSvmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); ASSERT_NE(nullptr, secondSvmManager->usmHostAllocationsCache); - constexpr auto allocationSize = MemoryConstants::pageSize64k; - svmManager->usmHostAllocationsCache->maxSize = allocationSize; - secondSvmManager->usmHostAllocationsCache->maxSize = allocationSize; - SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory, 1, rootDeviceIndices, deviceBitfields); { auto allocation = svmManager->createHostUnifiedMemoryAllocation(allocationSize, unifiedMemoryProperties); @@ -1226,10 +1225,11 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsWithDifferentSizesWhenAllocat DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(device->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; auto testDataset = std::vector( { @@ -1277,10 +1277,11 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsWithDifferentSizesWhenAllocat DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(device->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory, 1, rootDeviceIndices, deviceBitfields); auto allocation = svmManager->createHostUnifiedMemoryAllocation(SVMAllocsManager::SvmAllocationCache::minimalSizeToCheckUtilization, unifiedMemoryProperties); @@ -1316,20 +1317,20 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationOverSizeLimitWhenAllocatingAft DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(device->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; const auto notAcceptedAllocSize = SVMAllocsManager::SvmAllocationCache::maxServicedSize + 1; SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory, 1, rootDeviceIndices, deviceBitfields); - auto mockMemoryManager = reinterpret_cast(device->getMemoryManager()); auto mockGa = std::make_unique(mockRootDeviceIndex, nullptr, notAcceptedAllocSize); mockGa->gpuAddress = 0xbadf00; mockGa->cpuPtr = reinterpret_cast(0xbadf00); mockGa->setAllocationType(AllocationType::svmCpu); - mockMemoryManager->mockGa = mockGa.release(); - mockMemoryManager->returnMockGAFromHostPool = true; + memoryManager->mockGa = mockGa.release(); + memoryManager->returnMockGAFromHostPool = true; auto allocation = svmManager->createHostUnifiedMemoryAllocation(notAcceptedAllocSize, unifiedMemoryProperties); EXPECT_EQ(reinterpret_cast(0xbadf00), allocation); @@ -1345,10 +1346,11 @@ TEST_F(SvmHostAllocationCacheTest, givenMultipleAllocationsWhenAllocatingAfterFr DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(device->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; auto testDataset = std::vector( { @@ -1420,10 +1422,11 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsWithDifferentFlagsWhenAllocat DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto rootDevice = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(rootDevice->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(rootDevice->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*rootDevice); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; size_t defaultAllocSize = allocationSizeBasis; std::map subDeviceBitfields = {{0u, rootDevice->getDeviceBitfield()}}; @@ -1488,9 +1491,9 @@ TEST_F(SvmHostAllocationCacheTest, givenHostOutOfMemoryWhenAllocatingThenCacheIs device->injectMemoryManager(new MockMemoryManagerWithCapacity(*device->getExecutionEnvironment())); MockMemoryManagerWithCapacity *memoryManager = static_cast(device->getMemoryManager()); auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; memoryManager->capacity = MemoryConstants::pageSize64k * 3; @@ -1524,10 +1527,11 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationInUsageWhenAllocatingAfterFree DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(device->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); EXPECT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory, 1, rootDeviceIndices, deviceBitfields); auto allocation = svmManager->createUnifiedMemoryAllocation(10u, unifiedMemoryProperties); @@ -1535,8 +1539,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationInUsageWhenAllocatingAfterFree svmManager->freeSVMAlloc(allocation); EXPECT_EQ(svmManager->usmHostAllocationsCache->allocations.size(), 1u); - MockMemoryManager *mockMemoryManager = reinterpret_cast(device->getMemoryManager()); - mockMemoryManager->deferAllocInUse = true; + memoryManager->deferAllocInUse = true; auto testedAllocation = svmManager->createUnifiedMemoryAllocation(10u, unifiedMemoryProperties); EXPECT_EQ(svmManager->usmHostAllocationsCache->allocations.size(), 1u); auto svmData = svmManager->getSVMAlloc(testedAllocation); @@ -1555,10 +1558,11 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsInReuseWhenTrimOldAllocsCalle DebugManagerStateRestore restore; debugManager.flags.ExperimentalEnableHostAllocationCache.set(1); auto device = deviceFactory->rootDevices[0]; - auto svmManager = std::make_unique(device->getMemoryManager(), false); + auto memoryManager = reinterpret_cast(device->getMemoryManager()); + auto svmManager = std::make_unique(memoryManager, false); + memoryManager->maxAllocationsSavedForReuseSize = 1 * MemoryConstants::gigaByte; svmManager->initUsmAllocationsCaches(*device); EXPECT_NE(nullptr, svmManager->usmHostAllocationsCache); - svmManager->usmHostAllocationsCache->maxSize = 1 * MemoryConstants::gigaByte; SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory, 1, rootDeviceIndices, deviceBitfields); auto allocation = svmManager->createUnifiedMemoryAllocation(10u, unifiedMemoryProperties);