OpenCL 3.0.12 Released With Command Buffers Mutable Dispatch Extension and Enhanced Layers Support
The OpenCL 3.0 specification and SDK for heterogeneous parallel computation are regularly updated with bug fixes, improved documentation, and functional enhancements. The OpenCL 3.0.12 maintenance release on 15 September 2022, included significant new functionality.
Command Buffer Enhancements
The cl_khr_command_buffer extension was provisionally released in OpenCL 3.0.10 and 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 defined to be immutable between enqueues.
OpenCL 3.0.12 introduces the cl_khr_command_buffer_mutable_dispatch extension which layers over cl_khr_command_buffer to relax the immutability constraint. With this extension, kernel execution commands recorded to a command-buffer can be modified between enqueues by using a new API entry-point. This enables inputs to the kernel, work-item sizes, and offsets to be set without having to re-record the entire command sequence into a new command-buffer.
This extension was worked on by engineers from Codeplay, Qualcomm, Arm, Intel, Tampere University, NVIDIA, Google, and others, and is released provisionally to match the status of the base cl_khr_command_buffer extension and to provide an opportunity for community feedback before finalization. We'd love to hear from you on OpenCL's GitHub if you have any comments or suggestions.
Layer support was recently added to the Khronos OpenCL ICD Loader, making it much easier to create portable, platform-agnostic tools. While Khronos has focused on providing OpenCL validation layers, many other types of layers are possible: from simple OpenCL behavior modifications to full-fledged extension implementations.
New in this release, the OpenCL ICD Loader now supports system layers that can be installed for every user on a system. This enables system administrators to modify the behavior of OpenCL at a fine level of granularity and allows layers to be used with applications that run with elevated privileges.
Other updates in the OpenCL 3.0.12 release include:
- Added definition for a valid object and requirements for testing for valid objects
- Maximum limit added for the number of arguments supported by a kernel
- Requirements for comparability and uniqueness of object handles
- Behavior clarified for invalid device-side enqueue clk_event_t handles
- cl_khr_command_buffer interactions with other extensions clarified
- Error behavior when a command buffer is finalized multiple times is specified.
The official OpenCL 3.0.12 documentation, including documentation source code, can be downloaded from the OpenCL Registry.