Skip to content

Mutable Dispatch interaction with zero sized enqueue is unspecified #1447

@EwanC

Description

@EwanC

This issue is split of from original issue #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cl_khr_command_bufferRelating to the command-buffer family of extension

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions