Create a new class for handling multi device SVM arguments in kernel

set arg SVM for devices in Kernel

Related-To: NEO-5001


Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-01-14 16:48:50 +00:00
committed by Compute-Runtime-Automation
parent 5cd071f7d2
commit 00b2a28818
22 changed files with 458 additions and 124 deletions

View File

@@ -4790,7 +4790,7 @@ cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel,
}
}
GraphicsAllocation *pSvmAlloc = nullptr;
MultiGraphicsAllocation *pSvmAllocs = nullptr;
if (argValue != nullptr) {
auto svmManager = pKernel->getContext().getSVMAllocsManager();
auto svmData = svmManager->getSVMAlloc(argValue);
@@ -4803,11 +4803,11 @@ cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel,
}
}
} else {
pSvmAlloc = svmData->gpuAllocations.getGraphicsAllocation(pKernel->getDevices()[0]->getRootDeviceIndex());
pSvmAllocs = &svmData->gpuAllocations;
}
}
retVal = pKernel->setArgSvmAlloc(argIndex, const_cast<void *>(argValue), pSvmAlloc);
retVal = pKernel->setArgMultiDeviceSvmAlloc(argIndex, const_cast<void *>(argValue), pSvmAllocs);
TRACING_EXIT(clSetKernelArgSVMPointer, &retVal);
return retVal;
}