AMDGPU LLVM Adding GFX 9/10/11 "Generic Targets" To Build Once & Run On Multiple GPUs
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.
The LLVM commit explains:
This is part of the AMDGPU effort on their Code Object V6 support.
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.
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.
4 Comments