Skip to content

[UR] Fix validation of arguments of urKernelLaunchWithArgsExp()#21628

Merged
kswiecicki merged 1 commit intointel:syclfrom
ldorau:UR_Fix_error_conditions_of_urKernelLaunchWithArgsExp
Mar 26, 2026
Merged

[UR] Fix validation of arguments of urKernelLaunchWithArgsExp()#21628
kswiecicki merged 1 commit intointel:syclfrom
ldorau:UR_Fix_error_conditions_of_urKernelLaunchWithArgsExp

Conversation

@ldorau
Copy link
Contributor

@ldorau ldorau commented Mar 25, 2026

The validation layer in ur_valddi.cpp (generated from YAML spec)
checked pGlobalWorkSize[0], [1], and [2] and
pLocalWorkSize[0], [1], and [2] regardless of workDim.
For 1D kernels, indices [1] and [2] read out-of-bounds memory,
causing spurious UR_RESULT_ERROR_INVALID_WORK_DIMENSION errors.

Removed the hardcoded 3-element validation expressions
for pGlobalWorkSize and pLocalWorkSize that couldn't account for workDim.

@ldorau ldorau requested review from KFilipek and kswiecicki March 25, 2026 16:31
The validation layer in ur_valddi.cpp (generated from YAML spec)
checked pGlobalWorkSize[0], [1], and [2] and
pLocalWorkSize[0], [1], and [2] regardless of workDim.
For 1D kernels, indices [1] and [2] read out-of-bounds memory,
causing spurious UR_RESULT_ERROR_INVALID_WORK_DIMENSION errors.

Removed the hardcoded 3-element validation expressions
for pGlobalWorkSize and pLocalWorkSize that couldn't account for workDim.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
@ldorau ldorau changed the title [UR] Fix error conditions of urKernelLaunchWithArgsExp() [UR] Fix validation of arguments of urKernelLaunchWithArgsExp() Mar 26, 2026
@ldorau ldorau marked this pull request as ready for review March 26, 2026 06:42
@ldorau ldorau requested a review from a team as a code owner March 26, 2026 06:42
@github-actions
Copy link
Contributor

@intel/llvm-gatekeepers please consider merging

@ldorau
Copy link
Contributor Author

ldorau commented Mar 26, 2026

@intel/llvm-gatekeepers please merge

@kswiecicki kswiecicki merged commit f5d5b47 into intel:sycl Mar 26, 2026
43 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants