KhronosGroup / KhronosGroup/OpenCL-Docs
Mutable Dispatch interaction with zero sized enqueue is unspecified
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 421
- Forks
- 132
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
This issue is split of from original issue https://github.com/KhronosGroup/OpenCL-Docs/issues/1437
From @AhmedAmraniAkdi
1- Are zero sized enqueue kernels allowed to be modified in the command buffer?
Starting from OpenCL 2.1 and newer devices, zero sized enqueue is supported. What is the expected behaviour when changing the global size in this case?
I understand a zero sized clCommandNDRangeKernelKHR can be used for synchronisation, is it still correct to change the global size in such case?
Reply from @EwanC
I don't think we have any wording that forbids either a) updating from zero global size to a non-zero global size, or b) updating for a non-zero global size to a zero global size. So if a device with OpenCL 2.1 or newer implements the extension, then as the extension is currently specified then they should work. Saying that, I don't think we have any CTS tests for these cases, if we confirm the group does indeed want this behavior, we should add those to the CTS.
We discussed this on the 19/08/2025 OpenCL WG call, and it was variable how much implementation effort would be required to support this for all vendors and some prototyping research may be required before making a decision.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked original issue #1437 and the OpenCL WG discussion summarized here. Review the current command-buffer specification wording for zero-sized enqueues and determine whether changing between zero and non-zero global sizes is intended. Prototype or research implementation impact, then define the required specification decision and any CTS coverage.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100