RadeonSI Can Begin Using Valve's ACO Compiler For Certain Shaders

Written by Michael Larabel in Radeon on 15 May 2023 at 06:29 AM EDT. 38 Comments
RADEON
Beginning today with the newest Mesa 23.2-devel code, the environment variable option AMD_DEBUG=useaco is now available for telling the RadeonSI Gallium3D driver to use Valve's ACO shader compiler back-end rather than the AMDGPU LLVM shader compiler back-end for supported shader types.

Valve has spent years working on the ACO compiler back-end as a faster alternative to AMD's official LLVM-based shader compiler used by RadeonSI, formerly by RADV, and also the ROCm compute stack, etc. The ACO compiler back-end has been vital to the success of the RADV driver and making it a great driver for Linux gamers on the Steam Deck and those on the Linux desktop enjoying the open-source Radeon graphics.

AMD_DEBUG=useaco


For years there has been talk of bringing ACO to RadeonSI and it's slowly been happening. Thanks to this merge request by Qiang Yu the latest piece of the puzzle to come together allows enabling the ACO compiler with the AMD_DEBUG=useaco option for supported shader types.

But with this initial merge, the ACO compiler support with RadeonSI is just for monolithic pixel shaders. Qiang explained in the MR:
"ACO compile can be enabled with AMD_DEBUG=useaco. Currently only monolithic PS is supported. It would be a huge change to switch all shaders to ACO at once, so my plan is enable one by one for easier review and debug."

He's worked through the known regressions that originally were there for the ACO compiler with pixel shaders compared to the LLVM compiler back-end.

It's nice seeing this latest batch of ACO + RadeonSI code land that's several hundred lines of new code. Hopefully more shader types will begin working soon for ACO with RadeonSI. Other pending ACO work for Mesa can be found via this GitLab query.
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