RadeonSI Can Begin Using Valve's ACO Compiler For Certain Shaders
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.
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:
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.
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.
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.
38 Comments