[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 09:21:13 PDT 2024
AlexVlx wrote:
> > We don't use `offload` at the moment, that's for HIPSPV. Of course, future, fancy work is more than welcome, but this merely slots into the existing infra and current use cases.
>
> I'm not a huge fan of smuggling what is essentially a Toolchain behind what was intended as a `-mcpu` option. I guess we already somewhat support that? I know @yaxunl was the one that made the original `--offload=` RFC / support but I don't think it ever got 100% finished. I'm just a little concerned that if we support it this way then we'll never be able to change it because the argument will be that we need it for backwards compatibility. But I guess that's already the case and this patch just simplifies it?
It's how it works today, I believe: `--offload-arch` unambiguously establishes the toolchain, and we don't have a separate toolchain for AMDGCN flavoured SPIR-V (hence the rather sneaky triple based manipulation). I don't disagree with the principle, but I think that tidying this up and, possibly, allowing things like multiple triples within a single toolchain in a less sneaky way would be a pretty big lift. On the other hand, we cannot just switch to an `--offload` based flow either, because we have lots of client apps that rely on `--offload-arch` and whose build infra incorporates it.
https://github.com/llvm/llvm-project/pull/113509
More information about the cfe-commits
mailing list