Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify behavior around a zero-sized kernel enqueue and a global work size of NULL #1302

Open
bashbaug opened this issue Jan 23, 2025 · 0 comments

Comments

@bashbaug
Copy link
Contributor

OpenCL 2.1 relaxed error behavior around zero-sized kernel enqueues, including when the global work size is NULL, but this isn't documented clearly in the spec (for Khronos folks, this was described in the old Bugzilla 8677).

Specifically, this behavior is currently described in two places:

  1. In the description of the work_dim parameter to clEnqueueNDRangeKernel:

    If global_work_size is NULL, or the value in any passed dimension is 0 then the kernel command will trivially succeed after its event dependencies are satisfied and subsequently update its completion event. The behavior in this situation is similar to that of an enqueued marker, except that unlike a marker, an enqueued kernel with no events passed to event_wait_list may run at any time.

    This should probably be moved to the description of global_work_size instead.

  2. In the error condition for CL_INVALID_GLOBAL_WORK_SIZE:

    CL_INVALID_GLOBAL_WORK_SIZE if global_work_size is NULL or if any of the values specified in global_work_size[0], …​global_work_size[work_dim - 1] are 0. Returning this error code under these circumstances is deprecated by version 2.1.

    This should probably be rephrased to use a different work than "deprecated".

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

No branches or pull requests

1 participant