mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
performance: improve pool handling
Related-To: NEO-11731 Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6d70304e7b
commit
a3c3b6533a
@@ -503,7 +503,8 @@ void Context::initializeUsmAllocationPools() {
|
||||
}
|
||||
auto &productHelper = getDevices()[0]->getProductHelper();
|
||||
bool enabled = ApiSpecificConfig::isDeviceUsmPoolingEnabled() && productHelper.isUsmPoolAllocatorSupported();
|
||||
size_t poolSize = 2 * MemoryConstants::megaByte;
|
||||
|
||||
size_t poolSize = NEO::defaultPoolSize;
|
||||
if (debugManager.flags.EnableDeviceUsmAllocationPool.get() != -1) {
|
||||
enabled = debugManager.flags.EnableDeviceUsmAllocationPool.get() > 0;
|
||||
poolSize = debugManager.flags.EnableDeviceUsmAllocationPool.get() * MemoryConstants::megaByte;
|
||||
@@ -519,7 +520,7 @@ void Context::initializeUsmAllocationPools() {
|
||||
}
|
||||
|
||||
enabled = ApiSpecificConfig::isHostUsmPoolingEnabled() && productHelper.isUsmPoolAllocatorSupported();
|
||||
poolSize = 2 * MemoryConstants::megaByte;
|
||||
poolSize = NEO::defaultPoolSize;
|
||||
if (debugManager.flags.EnableHostUsmAllocationPool.get() != -1) {
|
||||
enabled = debugManager.flags.EnableHostUsmAllocationPool.get() > 0;
|
||||
poolSize = debugManager.flags.EnableHostUsmAllocationPool.get() * MemoryConstants::megaByte;
|
||||
|
||||
@@ -53,12 +53,12 @@ HWTEST2_F(ContextUsmPoolDefaultFlagsTest, givenDefaultDebugFlagsWhenCreatingCont
|
||||
|
||||
HWTEST2_F(ContextUsmPoolDefaultFlagsTest, givenDefaultDebugFlagsWhenCreatingContextThenPoolsAreInitialized, IsXeHpgCore) {
|
||||
EXPECT_TRUE(mockDeviceUsmMemAllocPool->isInitialized());
|
||||
EXPECT_EQ(2 * MemoryConstants::megaByte, mockDeviceUsmMemAllocPool->poolSize);
|
||||
EXPECT_EQ(1 * MemoryConstants::megaByte, mockDeviceUsmMemAllocPool->poolSize);
|
||||
EXPECT_NE(nullptr, mockDeviceUsmMemAllocPool->pool);
|
||||
EXPECT_EQ(InternalMemoryType::deviceUnifiedMemory, mockDeviceUsmMemAllocPool->poolMemoryType);
|
||||
|
||||
EXPECT_TRUE(mockHostUsmMemAllocPool->isInitialized());
|
||||
EXPECT_EQ(2 * MemoryConstants::megaByte, mockHostUsmMemAllocPool->poolSize);
|
||||
EXPECT_EQ(1 * MemoryConstants::megaByte, mockHostUsmMemAllocPool->poolSize);
|
||||
EXPECT_NE(nullptr, mockHostUsmMemAllocPool->pool);
|
||||
EXPECT_EQ(InternalMemoryType::hostUnifiedMemory, mockHostUsmMemAllocPool->poolMemoryType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user