fix: allow empty set to be passed to clSetKernelExecInfo

Related-To: GSD-8538
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
Jaroslaw Warchulski
2024-04-16 13:30:26 +00:00
committed by Compute-Runtime-Automation
parent 4b4d21a5e6
commit ea057abd36
3 changed files with 18 additions and 4 deletions

View File

@@ -5123,9 +5123,9 @@ cl_int CL_API_CALL clSetKernelExecInfo(cl_kernel kernel,
case CL_KERNEL_EXEC_INFO_SVM_PTRS:
case CL_KERNEL_EXEC_INFO_USM_PTRS_INTEL: {
if ((paramValueSize == 0) ||
if ((paramValueSize == 0 && paramValue) ||
(paramValueSize % sizeof(void *)) ||
(paramValue == nullptr)) {
(paramValueSize && paramValue == nullptr)) {
retVal = CL_INVALID_VALUE;
TRACING_EXIT(ClSetKernelExecInfo, &retVal);
return retVal;