Rusticl Support For AMD RadeonSI Driver Being Worked On

Written by Michael Larabel in Mesa on 26 September 2022 at 12:00 AM EDT. 15 Comments
MESA
Rusticl as the Rust-written OpenCL implementation for Mesa's Gallium3D as a newer and modern-focused CL alternative to the existing "Clover" code may soon see mainline support for working with the RadeonSI Gallium3D driver for supporting modern AMD graphics processors.

Rusticl recently picked up support for Intel's Iris driver in addition to supporting the work-in-progress open-source NVIDIA "Nouveau" and Arm Panfrost drivers, plus the swrast software fallback. Karol Herbst of Red Hat who wrote Rusticl as an OpenCL 3.0 driver for him to learn the Rust programming language has now been working on getting RadeonSI support in order.

This weekend Karol opened a Mesa merge request with "critical fixes" for the RadeonSI driver. This included the ac/llvm code to support non-32-bit sized workgroup IDs, assigning locations before passing the NIR to drivers from Rusticl kernels, and Rusticl limiting the global memory to 2GB.

In that merge request Karol noted, "radeonsi is still far away from working with Rusticl and I still manage to crash the Linux kernel reliably with Radeonsi." But then the same-day he followed up with a comment on that MR, "uhm.. actually.." With this screenshot:


Karol's screenshot shows the LuxMark OpenCL benchmark running on an AMD Radeon RX 6700 XT (RDNA2) graphics card with Rusticl providing the OpenCL 3.0 implementation.

Via Karol's Mesa Git branch he has a patch enabling the RadeonSI support. As of yet there is no MR pending for mainline to go ahead and enable RadeonSI support but given this weekend's progress that could very well happen soon.

AMD used to back the Mesa Clover driver in their pre-ROCm days, but in recent years has focused just on providing OpenCL support on Linux via their ROCm driver. It will be very interesting to see with modern AMD GPUs how Rusticl can perform against ROCm OpenCL. Having Rusticl support is a plus since it's part of Mesa and packaged by many Linux distributions compared to ROCm not being widely packaged among Linux distributions for easy user deployment. Given Rusticl is new to Mesa 22.3, it will be interesting to see how this Rust OpenCL compute stack for Mesa matures over the next year and what kind of adoption it sees. I'll be around with benchmarks when Mesa 22.3 stable nears in late November / December.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week