performance: move host/device memUsmAllocPool init to platform/context init

Related-To: NEO-16059

Signed-off-by: Aleksander Czerwionka <aleksander.czerwionka@intel.com>
This commit is contained in:
Aleksander Czerwionka
2025-09-17 11:17:23 +00:00
committed by Compute-Runtime-Automation
parent 6ec9ebd7a6
commit f0f869ed42
18 changed files with 160 additions and 136 deletions

View File

@@ -3977,10 +3977,7 @@ CL_API_ENTRY void *CL_API_CALL clHostMemAllocINTEL(
return nullptr;
}
auto platform = neoContext->getDevice(0u)->getPlatform();
platform->initializeHostUsmAllocationPool();
auto allocationFromPool = platform->getHostMemAllocPool().createUnifiedMemoryAllocation(size, unifiedMemoryProperties);
auto allocationFromPool = neoContext->getDevice(0u)->getPlatform()->getHostMemAllocPool().createUnifiedMemoryAllocation(size, unifiedMemoryProperties);
if (allocationFromPool) {
TRACING_EXIT(ClHostMemAllocINTEL, &allocationFromPool);
return allocationFromPool;
@@ -4042,8 +4039,6 @@ CL_API_ENTRY void *CL_API_CALL clDeviceMemAllocINTEL(
unifiedMemoryProperties.device = &neoDevice->getDevice();
neoContext->initializeDeviceUsmAllocationPool();
auto allocationFromPool = neoContext->getDeviceMemAllocPool().createUnifiedMemoryAllocation(size, unifiedMemoryProperties);
if (allocationFromPool) {
TRACING_EXIT(ClDeviceMemAllocINTEL, &allocationFromPool);