AMDGPU LLVM Adding GFX 9/10/11 "Generic Targets" To Build Once & Run On Multiple GPUs

Written by Michael Larabel in Radeon on 12 February 2024 at 06:28 AM EST. 4 Comments
RADEON
Code merged today to mainline LLVM is preparing for the notion of generic targets across the GFX9, GFX10, and GFX11 GPU families. With follow-on work these generic targets are aiming to allow compiling code once and then running across multiple GPUs in the given hardware family.

The code merged today to the AMDGPU LLVM back-end allows for new generic targets of gfx9-generic (Vega), gfx10.1-generic (RDNA1), gfx10.3-generic (RDNA2), and gfx11-generic (RDNA3) for those wanting to target a given generation and build a binary that will work across the various GPUs nicely for that target.

New AMDGPU targets


The LLVM commit explains:
"These generic targets include multiple GPUs and will, in the future, provide a way to build once and run on multiple GPU, at the cost of less optimization opportunities.

Note that this is just doing the compiler side of things, device libs an runtimes/loader/etc. don't know about these targets yet, so none of them actually work in practice right now. This is just the initial commit to make LLVM aware of them."

This is part of the AMDGPU effort on their Code Object V6 support.
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