The developers of the Mesa project announced the certification of the rusticl controller by the Khronos organization, whiche successfully passed all CTS tests (Kronos Conformance Test Suite) and was recognized as fully compliant with the OpenCL 3.0 specification, which defines the C language APIs and extensions to orchestrate cross-platform parallel computing.
With this, it has been possible to obtain a certificate that allows officially declaring compatibility with the standards and using the Khronos trademarks associated with them.
The driver is written in Rust and developed by Red Hat's Karol Herbst, who is involved in the development of Mesa, the Nouveau driver, and the open OpenCL stack.
Rusticl passes all CTS tests
Rusticl has just become the first Rust code within Mesa, with an OpenCL implementation recently merged into the Mesa 22.3 release, and it should be noted that testing was performed on a system with an integrated 12th generation Intel GPU using the Gallium3D Iris driver.
For those who are unaware of the controller, Rusticl should know that this acts as a counterpart to Mesa's OpenCL Clover interface and is also developed using Mesa's Gallium interface. Clover has long been neglected and rusticl is positioned as its future replacement. In addition to achieving OpenCL 3.0 compatibility, the Rusticl project differs from Clover in that it supports OpenCL extensions for image processing, but does not yet support the FP16 format.
Rusticl uses rust-bindgen to generate bindings for Mesa and OpenCL that allow Rust functions to be called from C code and vice versa. The possibility of using the Rust language in the Mesa project has been discussed since 2020.
Some of the company's advantages of Rust support mention improving the security and quality of drivers by eliminating typical problems when working with memory, as well as the Possibility of including third-party developments in Mesa, such as Kazan (an implementation of Vulkan in Rust). Among the shortcomings, there is a complication of the build system, an unwillingness to link to the load package system, an increase in requirements for the build environment, and the need to include the Rust compiler in the build dependencies that are required to build key desktop components on Linux.
The code to support the Rust language and the rusticl controller have been accepted into mainstream Mesa and will be offered in the Mesa 22.3 release, which is expected in late November. Rust and Rusticl support will be disabled by default and will require compilation with explicit options "-D gallium-rusticl=true -Dllvm=enabled -Drust_std=2021«.
When compiling, the rustc compiler, bindgen, LLVM, SPIRV-Tools, and SPIRV-LLVM-Translator are required as additional dependencies.
It should be mentioned that heThe OpenCL 3.0 API covers all OpenCL versions (1.2, 2.x), without providing separate specifications for each version. OpenCL 3.0 provides the ability to extend core functionality through the integration of additional specifications that will overlap in the form of options without blocking the monolithic nature of OpenCL 1.2/2.X.
In addition, the specification OpenCL 3.0 has been aligned with the environment, extensions and specifications of the generic intermediate representation SPIR-V, that also uses the Vulkan API. With it, support for the SPIR-V 1.3 specification has also been added to the OpenCL 3.0 kernel as an optional feature. By using the SPIR-V intermediate representation for computational kernels, support for operations with subgroups has been added.
Finally, it is also worth noting the work on the development of the Nouveau driver, also done by Carol Herbst. Nouveau driver adds basic OpenGL support for GNU NVIDIA GeForce RTX 30xx based on Ampere microarchitecture released since May 2020. Changes related to new chip support will be included in Linux 6.2 and Mesa 22.3 kernel.
If you are interested in knowing more about it, you can consult the details In the following link.