Correct clSetKernelExecInfo not to always require SVM support

Resolves: NEO-5269

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2021-03-22 17:57:23 +00:00
committed by Compute-Runtime-Automation
parent 47bdcce4c6
commit ecceddcab6
2 changed files with 37 additions and 16 deletions

View File

@@ -4869,12 +4869,16 @@ cl_int CL_API_CALL clSetKernelExecInfo(cl_kernel kernel,
return retVal;
}
for (const auto &pDevice : pMultiDeviceKernel->getDevices()) {
const HardwareInfo &hwInfo = pDevice->getHardwareInfo();
if (!hwInfo.capabilityTable.ftrSvm) {
retVal = CL_INVALID_OPERATION;
TRACING_EXIT(clSetKernelExecInfo, &retVal);
return retVal;
switch (paramName) {
case CL_KERNEL_EXEC_INFO_SVM_PTRS:
case CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM:
for (const auto &pDevice : pMultiDeviceKernel->getDevices()) {
const HardwareInfo &hwInfo = pDevice->getHardwareInfo();
if (!hwInfo.capabilityTable.ftrSvm) {
retVal = CL_INVALID_OPERATION;
TRACING_EXIT(clSetKernelExecInfo, &retVal);
return retVal;
}
}
}