jhuber6 wrote:

> It's how it works today, I believe: `--offload-arch` unambiguously 
> establishes the toolchain

It's pretty ambiguous, right now it mostly works through a combination of the 
file type and good guessing because the targets people care about now have 
distinct names. For OpenMP, you can offload to x64 CPUs or whatever and then it 
doesn't work via `--offload-arch` because there's not a distinct CPU name we 
can infer the triple based on. For HIP we just infer the triple that it's AMD, 
but this SPIR-V thing throws the same wrench that OpenMP has. Maybe in the 
future someone will want `clang++ -x cuda foo.cpp --offload-arch=gfx1030` as 
well, who knows.

I don't think this is a blocker, but I think it bears deep consideration on how 
we expect these toolchains to actually work.

https://github.com/llvm/llvm-project/pull/113509
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to