[clang] [llvm] [clang][docs] Add preliminary documentation for SPIR-V support in the HIPAMD ToolChain (PR #96657)

Alex Voicu via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 25 09:41:21 PDT 2024


AlexVlx wrote:

> > > I'll need to play with this with my driver code. I'm guessing it's because it needs to generate an entirely separate toolchain? The OpenMP path basically does that by inferring the toolchain from the string value, so we can support `--offload-arch=sm_89,gfx90a` for example.
> > 
> > 
> > Not quite, it's more because we'd have to nest two triples (`spirv64-amd-amdhsa` && `amdgcn-amd-amdhsa`) within the same toolchain, since we're using the same HIPAMD ToolChain. It's fixable, just slightly faffy to do without spamming toolchains / within the same toolchain.
> 
> Honestly I'm wondering if it would be cleaner to just make a `HIPSPIRVToolChain` since we may want special handling in the future.

I looked at this and it doesn't look super appealing (turned into something of a rabbit hole), it'd duplicate a lot of the existing toolchain, and would also try to squat in an already overcrowded space (there's already HIPSPV). 

https://github.com/llvm/llvm-project/pull/96657


More information about the cfe-commits mailing list