performance(ocl): add usm allocation pooling flag

EnableDeviceUsmAllocationPool and EnableHostUsmAllocationPool for device
and host allocations respectively.

Pool size will be set to flag value * MB.

Allocation size threshold to be pooled is 1MB.

Pools are created per context.

Related-To: NEO-9700

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2023-12-22 14:26:30 +00:00
committed by Compute-Runtime-Automation
parent 047438850d
commit 2fe3804cc2
25 changed files with 562 additions and 35 deletions

View File

@@ -92,6 +92,7 @@ set(NEO_CORE_tests_mocks
${CMAKE_CURRENT_SOURCE_DIR}/mock_tbx_csr.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_timestamp_container.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_timestamp_packet.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_usm_memory_pool.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_wddm_residency_controller.h
${CMAKE_CURRENT_SOURCE_DIR}/ult_device_factory.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ult_device_factory.h

View File

@@ -0,0 +1,18 @@
/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/memory_manager/unified_memory_pooling.h"
class MockUsmMemAllocPool : public UsmMemAllocPool {
public:
using UsmMemAllocPool::allocations;
using UsmMemAllocPool::pool;
using UsmMemAllocPool::poolEnd;
using UsmMemAllocPool::poolMemoryType;
using UsmMemAllocPool::poolSize;
};

View File

@@ -573,4 +573,6 @@ InOrderAtomicSignallingEnabled = -1
SetProcessPowerThrottlingState = -1
InOrderDuplicatedCounterStorageEnabled = -1
OverrideCpuCaching = -1
EnableDeviceUsmAllocationPool = -1
EnableHostUsmAllocationPool = -1
# Please don't edit below this line