Rusticl Support For AMD RadeonSI Driver Being Worked On
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.