Revert "performance: improve pool handling"

This reverts commit 5f0b9efd2b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2024-06-20 21:32:32 +02:00
committed by Compute-Runtime-Automation
parent efa3647d8f
commit 7136dfbd38
8 changed files with 8 additions and 20 deletions

View File

@@ -500,8 +500,7 @@ void Context::initializeUsmAllocationPools() {
}
auto &productHelper = getDevices()[0]->getProductHelper();
bool enabled = ApiSpecificConfig::isDeviceUsmPoolingEnabled() && productHelper.isUsmPoolAllocatorSupported();
size_t poolSize = NEO::defaultPoolSize;
size_t poolSize = 2 * MemoryConstants::megaByte;
if (debugManager.flags.EnableDeviceUsmAllocationPool.get() != -1) {
enabled = debugManager.flags.EnableDeviceUsmAllocationPool.get() > 0;
poolSize = debugManager.flags.EnableDeviceUsmAllocationPool.get() * MemoryConstants::megaByte;
@@ -517,7 +516,7 @@ void Context::initializeUsmAllocationPools() {
}
enabled = ApiSpecificConfig::isHostUsmPoolingEnabled() && productHelper.isUsmPoolAllocatorSupported();
poolSize = NEO::defaultPoolSize;
poolSize = 2 * MemoryConstants::megaByte;
if (debugManager.flags.EnableHostUsmAllocationPool.get() != -1) {
enabled = debugManager.flags.EnableHostUsmAllocationPool.get() > 0;
poolSize = debugManager.flags.EnableHostUsmAllocationPool.get() * MemoryConstants::megaByte;

View File

@@ -53,12 +53,12 @@ HWTEST2_F(ContextUsmPoolDefaultFlagsTest, givenDefaultDebugFlagsWhenCreatingCont
HWTEST2_F(ContextUsmPoolDefaultFlagsTest, givenDefaultDebugFlagsWhenCreatingContextThenPoolsAreInitialized, IsXeHpgCore) {
EXPECT_TRUE(mockDeviceUsmMemAllocPool->isInitialized());
EXPECT_EQ(1 * MemoryConstants::megaByte, mockDeviceUsmMemAllocPool->poolSize);
EXPECT_EQ(2 * MemoryConstants::megaByte, mockDeviceUsmMemAllocPool->poolSize);
EXPECT_NE(nullptr, mockDeviceUsmMemAllocPool->pool);
EXPECT_EQ(InternalMemoryType::deviceUnifiedMemory, mockDeviceUsmMemAllocPool->poolMemoryType);
EXPECT_TRUE(mockHostUsmMemAllocPool->isInitialized());
EXPECT_EQ(1 * MemoryConstants::megaByte, mockHostUsmMemAllocPool->poolSize);
EXPECT_EQ(2 * MemoryConstants::megaByte, mockHostUsmMemAllocPool->poolSize);
EXPECT_NE(nullptr, mockHostUsmMemAllocPool->pool);
EXPECT_EQ(InternalMemoryType::hostUnifiedMemory, mockHostUsmMemAllocPool->poolMemoryType);
}