OpenCL 3.0.12 Published With Command Buffers Mutable Dispatch Extension

Written by Michael Larabel in Standards on 16 September 2022 at 12:00 AM EDT. 3 Comments
The Khronos Group has published OpenCL 3.0.12 as the newest version of this API for compute across heterogeneous platforms, but mostly known for GPU compute.

The changes noted with OpenCL 3.0.12 amount to:
* Added a definition for a valid object and requirements for testing for valid objects.
* Added a maximum limit for the number of arguments supported by a kernel.
* Clarified requirements for comparability and uniqueness of object handles.
* Clarified behavior for invalid device-side enqueue `clk_event_t` handles.
* Clarified `cl_khr_command_buffer` interactions with other extensions.
* Specified error behavior when a command buffer is finalized multiple times.

Most notable though is the introduction of a new extension for mutable dispatch with command buffers. The cl_khr_command_buffer_mutable_dispatch is new with OpenCL 3.0.12 and is being introduced in provisional form. The cl_khr_command_buffer_mutable_dispatch extension allows for modifying the configuration of kernel execution commands between command buffer enqueues.

The cl_khr_command_buffer_mutable_dispatch extension was worked on by engineers from Codeplay, Qualcomm, Arm, Intel, Tampere University, NVIDIA, and Google to overcome the limitation of cl_khr_command_buffer that commands recorded in the command buffer are immutable between enqueues.
The cl_khr_command_buffer extension separates command construction from enqueue by providing a mechanism to record a set of commands which can then be repeatedly enqueued. However, the commands recorded to the command-buffer are immutable between enqueues.

cl_khr_command_buffer_mutable_dispatch removes this restriction, in particular, this extension allows the configuration of a kernel execution command in a command-buffer, called a mutable-dispatch, to be modified. This allows inputs and outputs to the kernel, as well as work-item sizes and offsets, to change without having to re-record the entire command sequence in a new command-buffer.

The official OpenCL 3.0.12 documentation can be downloaded from GitHub.
Related News
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week