mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
performance: move usm pool init to first alloc call
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3fbcbcaef2
commit
20d6910b66
@@ -3933,6 +3933,8 @@ CL_API_ENTRY void *CL_API_CALL clHostMemAllocINTEL(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
neoContext->initializeUsmAllocationPools();
|
||||
|
||||
auto allocationFromPool = neoContext->getHostMemAllocPool().createUnifiedMemoryAllocation(size, unifiedMemoryProperties);
|
||||
if (allocationFromPool) {
|
||||
TRACING_EXIT(ClHostMemAllocINTEL, &allocationFromPool);
|
||||
@@ -3995,6 +3997,8 @@ CL_API_ENTRY void *CL_API_CALL clDeviceMemAllocINTEL(
|
||||
|
||||
unifiedMemoryProperties.device = &neoDevice->getDevice();
|
||||
|
||||
neoContext->initializeUsmAllocationPools();
|
||||
|
||||
auto allocationFromPool = neoContext->getDeviceMemAllocPool().createUnifiedMemoryAllocation(size, unifiedMemoryProperties);
|
||||
if (allocationFromPool) {
|
||||
TRACING_EXIT(ClDeviceMemAllocINTEL, &allocationFromPool);
|
||||
|
||||
Reference in New Issue
Block a user