clEnqueueMigrateMemINTEL with memory prefetch for KMD migrated shared allocation

Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2022-07-13 12:10:15 +00:00
committed by Compute-Runtime-Automation
parent ae0e701f6f
commit 3e22f30ed5
5 changed files with 119 additions and 14 deletions

View File

@@ -4184,6 +4184,16 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMigrateMemINTEL(
auto pEvent = castToObjectOrAbort<Event>(*event);
pEvent->setCmdType(CL_COMMAND_MIGRATEMEM_INTEL);
}
if (NEO::DebugManager.flags.AppendMemoryPrefetchForKmdMigratedSharedAllocations.get() > 0) {
auto pSvmAllocMgr = pCommandQueue->getContext().getSVMAllocsManager();
UNRECOVERABLE_IF(pSvmAllocMgr == nullptr);
auto allocData = pSvmAllocMgr->getSVMAlloc(ptr);
if (allocData) {
pSvmAllocMgr->prefetchMemory(pCommandQueue->getDevice(), *allocData);
}
}
}
return retVal;