mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
refactor: remove not required parameter
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d2c3ec7d36
commit
6f4a397cfc
@@ -2769,7 +2769,7 @@ TEST(MemoryManagerTest, whenMemoryManagerReturnsNullptrThenAllocateGlobalsSurfac
|
||||
EXPECT_EQ(nullptr, allocation);
|
||||
EXPECT_EQ(deviceBitfield, memoryManager->recentlyPassedDeviceBitfield);
|
||||
|
||||
auto svmAllocsManager = std::make_unique<SVMAllocsManager>(memoryManager, false);
|
||||
auto svmAllocsManager = std::make_unique<SVMAllocsManager>(memoryManager);
|
||||
memoryManager->recentlyPassedDeviceBitfield = {};
|
||||
allocation = allocateGlobalsSurface(svmAllocsManager.get(), device, 1024, 0u, false, &linkerInput, nullptr);
|
||||
EXPECT_EQ(nullptr, allocation);
|
||||
|
||||
@@ -24,7 +24,7 @@ TEST(PrefetchManagerTests, givenPrefetchManagerWhenCallingInterfaceFunctionsThen
|
||||
std::map<uint32_t, DeviceBitfield> deviceBitfields{{mockRootDeviceIndex, mockDeviceBitfield}};
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto prefetchManager = std::make_unique<MockPrefetchManager>();
|
||||
PrefetchContext prefetchContext;
|
||||
|
||||
@@ -73,7 +73,7 @@ TEST(PrefetchManagerTests, givenPrefetchManagerWhenCallingInterfaceFunctionsThen
|
||||
std::map<uint32_t, DeviceBitfield> deviceBitfields{{mockRootDeviceIndex, mockDeviceBitfield}};
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto prefetchManager = std::make_unique<MockPrefetchManager>();
|
||||
PrefetchContext prefetchContext;
|
||||
|
||||
@@ -108,7 +108,7 @@ TEST(PrefetchManagerTests, givenPrefetchManagerWhenCallingMigrateAllocationsToGp
|
||||
std::map<uint32_t, DeviceBitfield> deviceBitfields{{mockRootDeviceIndex, mockDeviceBitfield}};
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto prefetchManager = std::make_unique<MockPrefetchManager>();
|
||||
PrefetchContext prefetchContext;
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ TEST(SvmAllocationCacheSimpleTest, givenSvmAllocationCacheInfoWhenMarkedForDelet
|
||||
TEST(SvmAllocationCacheSimpleTest, givenAllocationsWhenCheckingIsInUseThenReturnCorrectValue) {
|
||||
SVMAllocsManager::SvmAllocationCache allocationCache;
|
||||
MockMemoryManager memoryManager;
|
||||
MockSVMAllocsManager svmAllocsManager(&memoryManager, false);
|
||||
MockSVMAllocsManager svmAllocsManager(&memoryManager);
|
||||
|
||||
allocationCache.memoryManager = &memoryManager;
|
||||
allocationCache.svmAllocsManager = &svmAllocsManager;
|
||||
@@ -162,7 +162,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationCacheDisabledWhenCheckingIfE
|
||||
DebugManagerStateRestore restorer;
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 1));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(0);
|
||||
EXPECT_EQ(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -174,7 +174,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationCacheEnabledAndMaxSizeZeroWh
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 1));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(0, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -192,7 +192,7 @@ HWTEST_F(SvmDeviceAllocationCacheTest, givenOclApiSpecificConfigWhenCheckingIfEn
|
||||
raii.mockProductHelper->isDeviceUsmAllocationReuseSupportedResult = false;
|
||||
device->initUsmReuseLimits();
|
||||
EXPECT_EQ(0u, device->usmReuseInfo.getMaxAllocationsSavedForReuseSize());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
EXPECT_EQ(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_EQ(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -200,7 +200,7 @@ HWTEST_F(SvmDeviceAllocationCacheTest, givenOclApiSpecificConfigWhenCheckingIfEn
|
||||
{
|
||||
raii.mockProductHelper->isDeviceUsmAllocationReuseSupportedResult = true;
|
||||
device->initUsmReuseLimits();
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
EXPECT_EQ(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -211,7 +211,7 @@ HWTEST_F(SvmDeviceAllocationCacheTest, givenOclApiSpecificConfigWhenCheckingIfEn
|
||||
raii.mockProductHelper->isDeviceUsmAllocationReuseSupportedResult = true;
|
||||
mockAilConfigurationHelper.limitAmountOfDeviceMemoryForRecyclingReturn = true;
|
||||
device->initUsmReuseLimits();
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
EXPECT_EQ(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -227,7 +227,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationCacheEnabledWhenDirectSubmis
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->anyDirectSubmissionEnabledReturnValue = true;
|
||||
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -278,7 +278,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingDevic
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -329,7 +329,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationCacheEnabledWhenInitializedT
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(2);
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 1));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
|
||||
@@ -344,7 +344,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingDevic
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
constexpr auto allocationSize = MemoryConstants::pageSize64k;
|
||||
device->usmReuseInfo.init(allocationSize, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -415,8 +415,8 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationCacheEnabledAndMultipleSVMMa
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto secondSvmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto secondSvmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
constexpr auto allocationSize = MemoryConstants::pageSize64k;
|
||||
device->usmReuseInfo.init(allocationSize, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -485,7 +485,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationsWithDifferentSizesWhenAlloc
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -534,7 +534,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationWithDifferentSizeWhenAllocat
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -579,7 +579,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationsWithDifferentSizesWhenAlloc
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -619,7 +619,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationOverSizeLimitWhenAllocatingA
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -649,7 +649,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenMultipleAllocationsWhenAllocatingAfter
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -727,7 +727,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationsWithDifferentFlagsWhenAlloc
|
||||
auto rootDevice = deviceFactory->rootDevices[0];
|
||||
auto secondRootDevice = deviceFactory->rootDevices[1];
|
||||
auto subDevice1 = reinterpret_cast<MockSubDevice *>(deviceFactory->subDevices[0]);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(rootDevice->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(rootDevice->getMemoryManager());
|
||||
rootDevice->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
secondRootDevice->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
subDevice1->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
@@ -802,7 +802,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenDeviceOutOfMemoryWhenAllocatingThenCac
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
device->injectMemoryManager(new MockMemoryManagerWithCapacity(*device->getExecutionEnvironment()));
|
||||
MockMemoryManagerWithCapacity *memoryManager = static_cast<MockMemoryManagerWithCapacity *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
memoryManager->usmReuseInfo.init(0u, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -841,7 +841,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationWithIsInternalAllocationSetW
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -873,7 +873,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationInUsageWhenAllocatingAfterFr
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -906,7 +906,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenUsmReuseCleanerWhenTrimOldInCachesCall
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(0);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->executionEnvironment->unifiedMemoryReuseCleaner.reset(new MockUnifiedMemoryReuseCleaner(false));
|
||||
auto mockUnifiedMemoryReuseCleaner = reinterpret_cast<MockUnifiedMemoryReuseCleaner *>(device->executionEnvironment->unifiedMemoryReuseCleaner.get());
|
||||
EXPECT_EQ(0u, mockUnifiedMemoryReuseCleaner->svmAllocationCaches.size());
|
||||
@@ -959,7 +959,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenDirectSubmissionLightWhenTrimOldInCach
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(0);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->executionEnvironment->unifiedMemoryReuseCleaner.reset(new MockUnifiedMemoryReuseCleaner(true));
|
||||
auto mockUnifiedMemoryReuseCleaner = reinterpret_cast<MockUnifiedMemoryReuseCleaner *>(device->executionEnvironment->unifiedMemoryReuseCleaner.get());
|
||||
EXPECT_EQ(0u, mockUnifiedMemoryReuseCleaner->svmAllocationCaches.size());
|
||||
@@ -1001,7 +1001,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenUsmReuseCleanerWhenTrimOldInCachesCall
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(0);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
device->executionEnvironment->unifiedMemoryReuseCleaner.reset(new MockUnifiedMemoryReuseCleaner(false));
|
||||
auto mockUnifiedMemoryReuseCleaner = reinterpret_cast<MockUnifiedMemoryReuseCleaner *>(device->executionEnvironment->unifiedMemoryReuseCleaner.get());
|
||||
EXPECT_EQ(0u, mockUnifiedMemoryReuseCleaner->svmAllocationCaches.size());
|
||||
@@ -1042,7 +1042,7 @@ TEST_F(SvmDeviceAllocationCacheTest, givenAllocationsInReuseWhenTrimOldAllocsCal
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableDeviceAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
device->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmDeviceAllocationsCache);
|
||||
@@ -1092,7 +1092,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheDisabledWhenCheckingIfEna
|
||||
DebugManagerStateRestore restorer;
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 1));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(0);
|
||||
EXPECT_EQ(nullptr, svmManager->usmHostAllocationsCache);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -1122,14 +1122,14 @@ HWTEST_F(SvmHostAllocationCacheTest, givenOclApiSpecificConfigWhenCheckingIfEnab
|
||||
|
||||
{
|
||||
raii.mockProductHelper->isHostUsmAllocationReuseSupportedResult = false;
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
EXPECT_EQ(nullptr, svmManager->usmHostAllocationsCache);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_EQ(nullptr, svmManager->usmHostAllocationsCache);
|
||||
}
|
||||
{
|
||||
raii.mockProductHelper->isHostUsmAllocationReuseSupportedResult = true;
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
EXPECT_EQ(nullptr, svmManager->usmHostAllocationsCache);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1180,7 +1180,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingHostAll
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1230,7 +1230,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenInitializedThe
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(2);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
|
||||
@@ -1246,7 +1246,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingHostAll
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
constexpr auto allocationSize = MemoryConstants::pageSize64k;
|
||||
memoryManager->usmReuseInfo.init(allocationSize, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -1317,7 +1317,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledWhenFreeingHostAll
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
constexpr auto allocationSize = MemoryConstants::pageSize64k;
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1350,8 +1350,8 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationCacheEnabledAndMultipleSVMMana
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto secondSvmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto secondSvmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
constexpr auto allocationSize = MemoryConstants::pageSize64k;
|
||||
memoryManager->usmReuseInfo.init(allocationSize, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
@@ -1426,7 +1426,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsWithDifferentSizesWhenAllocat
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1478,7 +1478,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsWithDifferentSizesWhenAllocat
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1518,7 +1518,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationOverSizeLimitWhenAllocatingAft
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1547,7 +1547,7 @@ TEST_F(SvmHostAllocationCacheTest, givenMultipleAllocationsWhenAllocatingAfterFr
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1623,7 +1623,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsWithDifferentFlagsWhenAllocat
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto rootDevice = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(rootDevice->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*rootDevice);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1690,7 +1690,7 @@ TEST_F(SvmHostAllocationCacheTest, givenHostOutOfMemoryWhenAllocatingThenCacheIs
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
device->injectMemoryManager(new MockMemoryManagerWithCapacity(*device->getExecutionEnvironment()));
|
||||
MockMemoryManagerWithCapacity *memoryManager = static_cast<MockMemoryManagerWithCapacity *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
ASSERT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1728,7 +1728,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationInUsageWhenAllocatingAfterFree
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
@@ -1759,7 +1759,7 @@ TEST_F(SvmHostAllocationCacheTest, givenAllocationsInReuseWhenTrimOldAllocsCalle
|
||||
debugManager.flags.ExperimentalEnableHostAllocationCache.set(1);
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = reinterpret_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
memoryManager->usmReuseInfo.init(1 * MemoryConstants::gigaByte, UsmReuseInfo::notLimited);
|
||||
svmManager->initUsmAllocationsCaches(*device);
|
||||
EXPECT_NE(nullptr, svmManager->usmHostAllocationsCache);
|
||||
|
||||
@@ -24,7 +24,7 @@ using namespace NEO;
|
||||
TEST(SvmDeviceAllocationTest, givenGivenSvmAllocsManagerWhenObtainOwnershipCalledThenLockedUniqueLockReturned) {
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 1));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
|
||||
auto lock = svmManager->obtainOwnership();
|
||||
std::thread th1([&] {
|
||||
@@ -70,7 +70,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenFreeSvmAllocationDeferThenAllocationsCou
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
void *cmdQ = reinterpret_cast<void *>(0x12345);
|
||||
@@ -100,7 +100,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenFreeSVMAllocIsDeferredThenFreedSubsequen
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
void *cmdQ = reinterpret_cast<void *>(0x12345);
|
||||
@@ -127,7 +127,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, GivenTwoRootDevicesWhenAllocatingSharedMemor
|
||||
auto device = deviceFactory->rootDevices[1];
|
||||
std::map<uint32_t, NEO::DeviceBitfield> deviceBitfieldsLocal;
|
||||
deviceBitfieldsLocal[1] = device->getDeviceBitfield();
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
void *cmdQ = reinterpret_cast<void *>(0x12345);
|
||||
@@ -153,7 +153,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenMultipleFreeSVMAllocDeferredThenFreedSub
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -187,7 +187,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenPointerWithOffsetPassedThenProperDataRet
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
|
||||
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::deviceUnifiedMemory, 1, rootDeviceIndices, deviceBitfields);
|
||||
unifiedMemoryProperties.device = device;
|
||||
@@ -208,7 +208,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenMultiplePointerWithOffsetPassedThenPrope
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
|
||||
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::deviceUnifiedMemory, 1, rootDeviceIndices, deviceBitfields);
|
||||
unifiedMemoryProperties.device = device;
|
||||
@@ -247,7 +247,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenKmdMigratedSharedAllocationWhenPrefetch
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
void *cmdQ = reinterpret_cast<void *>(0x12345);
|
||||
@@ -277,7 +277,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenNonKmdMigratedSharedAllocationWhenPrefe
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
void *cmdQ = reinterpret_cast<void *>(0x12345);
|
||||
@@ -303,7 +303,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenNonSharedUnifiedMemoryAllocationWhenPre
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
void *cmdQ = reinterpret_cast<void *>(0x12345);
|
||||
@@ -331,7 +331,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenSharedSystemAllocationWhenPrefetchMemor
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
auto &hwInfo = *device->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
|
||||
@@ -357,7 +357,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenSharedSystemAllocationWhenPrefetchMemor
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -379,7 +379,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenForceMemoryPrefetchForKmdMigratedShared
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
void *cmdQ = reinterpret_cast<void *>(0x12345);
|
||||
@@ -402,7 +402,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenAlignmentThenUnifiedMemoryAllocationsAr
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -428,7 +428,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenAlignmentThenHostUnifiedMemoryAllocatio
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -454,7 +454,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenAlignmentThenSharedUnifiedMemoryAllocat
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -487,7 +487,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenAlignmentWhenLocalMemoryIsEnabledThenSh
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -519,7 +519,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenInternalAllocationWhenItIsMadeResidentT
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -556,7 +556,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenSubmitIndirectAllocationsAsPackCalledBut
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -587,7 +587,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenInternalAllocationWhenItIsMadeResidentT
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
@@ -625,7 +625,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, givenInternalAllocationWhenNewAllocationIsCr
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 2));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto memoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager, false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(memoryManager);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
csr->setupContext(*device->getDefaultEngine().osContext);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ TEST_F(UnifiedMemoryPoolingTest, givenUsmAllocPoolWhenCallingIsInitializedThenRe
|
||||
|
||||
std::unique_ptr<UltDeviceFactory> deviceFactory(new UltDeviceFactory(1, 1));
|
||||
auto device = deviceFactory->rootDevices[0];
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
auto svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
|
||||
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory, MemoryConstants::pageSize2M, rootDeviceIndices, deviceBitfields);
|
||||
|
||||
@@ -73,7 +73,7 @@ class InitializedUnifiedMemoryPoolingTest : public UnifiedMemoryPoolingTest {
|
||||
|
||||
deviceFactory = std::unique_ptr<UltDeviceFactory>(new UltDeviceFactory(1, 1));
|
||||
device = deviceFactory->rootDevices[0];
|
||||
svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
static_cast<MockMemoryManager *>(device->getMemoryManager())->failInDevicePoolWithError = failAllocation;
|
||||
|
||||
poolMemoryProperties = std::make_unique<SVMAllocsManager::UnifiedMemoryProperties>(poolMemoryType, MemoryConstants::pageSize2M, rootDeviceIndices, deviceBitfields);
|
||||
@@ -317,7 +317,7 @@ class UnifiedMemoryPoolingManagerTest : public SVMMemoryAllocatorFixture<true>,
|
||||
poolInfo2MbTo16Mb = usmMemAllocPoolsManager->poolInfos[3];
|
||||
poolInfo16MbTo64Mb = usmMemAllocPoolsManager->poolInfos[4];
|
||||
poolInfo64MbTo256Mb = usmMemAllocPoolsManager->poolInfos[5];
|
||||
svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager(), false);
|
||||
svmManager = std::make_unique<MockSVMAllocsManager>(device->getMemoryManager());
|
||||
mockMemoryManager = static_cast<MockMemoryManager *>(device->getMemoryManager());
|
||||
mockMemoryManager->failInDevicePoolWithError = failAllocation;
|
||||
if (InternalMemoryType::deviceUnifiedMemory == poolMemoryType) {
|
||||
|
||||
Reference in New Issue
Block a user