jhuber6 wrote: > > The main obstacle of letting clang emit error when `--offload-arch` is not > > specified is HIP apps using hipcc as CMAKE_CXX_COMPILER. hipcc adds -xhip > > by default for .cpp programs. This is a known and long existing issue. > > Another option is to have multiple `--offload-arch` options by default, > > which covers gfx9 generic, gfx10 generic, gfx11 generic, and gfx12 generic. > > This should make the program work for most of GPU's.
Seems silly to do that when we have the `.hip` extension, but I guess it's a convenience that we can't really turn off at this stage. > So perhaps we can fork this linguistically? I.e.: > > * the HIP language should default to SPIRV (which will work everywhere; > additionally, I think that some of the concerns in this thread re: > performance / capability are misplaced, considering we're not using generic > SPIRV, but that's a different kettle of fish); > > * everything else just errors out if --offload-arch / -mcpu are not set. > Trying to add multiple / all offload-archs is just committing to being > on an endless treadmill. Part of why we added SPIRV support is to deal with > this. We still rely on external Khronos tools for SPIR-V right? I don't think we can shift that to the default until it's all LLVM. https://github.com/llvm/llvm-project/pull/139281 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits