Skip to content

Conversation

@bashbaug
Copy link
Contributor

@bashbaug bashbaug commented Dec 9, 2025

This is another PR to partially address the way we document error conditions, see #1320 and in particular #1320 (comment).

It contains a subset of the changes from #1399, specifically for clEnqueueNDRangeKernel.

Also, for clGetKernelSuggestedLocalWorkSizeKHR, while we're at it, since they share a lot of the same error conditions.

Also, for clGetKernelSuggestedLocalWorkSizeKHR, while we're at it.
* {CL_INVALID_OPERATION}
** if SVM pointers are set as arguments for _kernel_ and the device associated with _command_queue_ does not support SVM
** if system pointers are set as arguments for _kernel_ and the device associated with _command_queue_ does not support fine-grain system SVM
// TODO: Do we still need these explicit examples?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, this can be removed as it is already specified in the footnote 7: https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#_footnotedef_7

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder!

I agree footnote 7 is a good example where these out-of-resources cases are described elsewhere in the spec. So, I'm inclined to keep the same boilerplate text here for CL_OUT_OF_RESOURCES for clEnqueueNDRangeKernel vs. including the explicit examples.

If we really want to keep text like the following, which I don't believe is documented anywhere else in the spec...

For example, the explicitly specified local_work_size causes a failure to execute the kernel because of insufficient resources such as registers or local memory.

... perhaps it should move to a footnote, also? Or, we can just remove it completely, as is done in this PR.

@bashbaug
Copy link
Contributor Author

bashbaug commented Jan 6, 2026

Merging as discussed in the January 6th teleconference.

@bashbaug bashbaug merged commit 02b5bd3 into KhronosGroup:main Jan 6, 2026
2 checks passed
@bashbaug bashbaug deleted the error-code-consistency-kernels branch January 6, 2026 18:25
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.

2 participants