OpenCL 3.0.12 Published With Command Buffers Mutable Dispatch Extension

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.
3 Comments