https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115740
--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> --- https://llvm.org/docs/CompileCudaWithLLVM.html#detecting-clang-vs-nvcc-from-code suggests that __CUDA_ARCH__ is the right macro (thanks to zhao)