Khronos Concern, which is responsible for the development of specifications for the OpenGL, Vulkan and OpenCL family, announced the completion of development of the OpenCL 3.0 specifications that define APIs and C language extensions to organize multiplatform parallel computing using multi-core CPUs, GPUs, FPGAs, DSPs, and other specialized chips.
These are used from supercomputers and cloud servers, to chips that can be found on mobile devices and embedded technology. The OpenCL standard is completely open. Companies such as IBM, NVIDIA, Intel, AMD, Apple, ARM, Electronic Arts, Qualcomm, Texas Instruments and Toshiba participated in the work on the standard.
At the current stage of the specification, the status is provisional, which implies the possibility of refinement based on the comments sent through GitHub. After the comments are taken into account, the spec will receive the final status and the final test suite will be published to verify the compatibility of existing implementations.
OpenCL 3.0 Features
OpenCL 3.0 API now covers all OpenCL versions (1.2, 2.x), without providing separate specifications for each version. OpenCL 3.0 provides the ability to expand basic functionality through the integration of additional specifications, which will be arranged in the form of options, without blocking the monolithic nature of OpenCL 1.2 / 2.X.
Only functionality that complies with OpenCL 1.2 is declared mandatory and all the features offered in the specifications OpenCL 2.x are classified as optional. This approach will simplify the creation of specialized OpenCL 3.0 compliant implementations and broaden the range of devices on which OpenCL 3.0 can be used.
For example, manufacturers can implement support for OpenCL 3.0 without realizing the individual features of OpenCL 2.x. To access optional language features, OpenCL 3.0 adds a test query system that allows you to evaluate support for individual API elements as well as special macros.
Unification with specifications previously published makes it easy to transfer applications to OpenCL 3.0. OpenCL 1.2 applications will be able to run on devices that support OpenCL 3.0 without modification. OpenCL 2.x applications will also not require code changes, but if the OpenCL 3.0 environment provides the necessary functionality (to ensure portability in the future, it is recommended that OpenCL 2.x applications add test queries to evaluate compatibility with the openCL 2.x functions used).
Controller developers with OpenCL implementations they will be able to easily upgrade their products to OpenCL 3.0, adding only request processing for the presence of certain API calls, and gradually increasing functionality over time.
The OpenCL 3.0 specification is aligned with environment, extensions and specifications of SPIR-V Universal Intermediate View, which also uses the Vulkan API. Support for the SPIR-V 1.3 specification is included in the OpenCL 3.0 kernel as an optional feature. By using the SPIR-V intermediate representation for compute cores, support for operations with subgroups has been added.
Added support for expansion to perform asynchronous DMA operations, compatible with DSP-like chips with direct memory access. Asynchronous DMA allows you to use DMA transactions to transfer data between global and local memory in asynchronous mode, in parallel with performed calculations or other data transfer operations.
The specification of parallel programming extensions for C has been updated to version 3.0 and the development of the OpenCL language extensions for C ++ was discontinued in favor of the "C ++ for OpenCL" project.
C ++ for OpenCL is a Clang / LLVM based compiler which translates the C ++ and OpenCL C kernels into intermediate SPIR-V representation or low-level machine code. Through the translation to SPIR-V, the compilation of C ++ applications is also organized using the SYCL template library, which simplifies the creation of parallel applications.
To translate OpenCL via the Vulkan API, the clspv compiler is proposed, which converts the OpenCL kernels to the Vulkan SPIR-V view and the clvk layer to allow the OpenCL API to work on top of Vulkan.