Add MultiGraphicsAllocation to USM

Related-To: NEO-4672
Change-Id: I53ea4bea73ae6d52840146f63bc561bb90f9fe62
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-06-29 12:47:13 +02:00
committed by sys_ocldev
parent 5bc511b77d
commit 93c1e1b976
33 changed files with 306 additions and 237 deletions

View File

@ -3708,7 +3708,7 @@ cl_int clGetMemAllocInfoINTEL(
if (!unifiedMemoryAllocation) {
return changeGetInfoStatusToCLResultType(info.set<void *>(nullptr));
}
return changeGetInfoStatusToCLResultType(info.set<uint64_t>(unifiedMemoryAllocation->gpuAllocation->getGpuAddress()));
return changeGetInfoStatusToCLResultType(info.set<uint64_t>(unifiedMemoryAllocation->gpuAllocations.getDefaultGraphicsAllocation()->getGpuAddress()));
}
case CL_MEM_ALLOC_SIZE_INTEL: {
if (!unifiedMemoryAllocation) {
@ -4545,7 +4545,7 @@ cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel,
return retVal;
}
} else {
pSvmAlloc = svmData->gpuAllocation;
pSvmAlloc = svmData->gpuAllocations.getGraphicsAllocation(pKernel->getDevice().getRootDeviceIndex());
}
}
@ -4612,7 +4612,7 @@ cl_int CL_API_CALL clSetKernelExecInfo(cl_kernel kernel,
TRACING_EXIT(clSetKernelExecInfo, &retVal);
return retVal;
}
GraphicsAllocation *svmAlloc = svmData->gpuAllocation;
GraphicsAllocation *svmAlloc = svmData->gpuAllocations.getGraphicsAllocation(pKernel->getDevice().getRootDeviceIndex());
if (paramName == CL_KERNEL_EXEC_INFO_SVM_PTRS) {
pKernel->setSvmKernelExecInfo(svmAlloc);