jhuber6 added inline comments.

================
Comment at: clang/test/Driver/openmp-offload-gpu-new.c:56
+
+// RUN:   %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-fopenmp \
+// RUN:     -fopenmp-targets=nvptx64-nvidia-cuda,amdgcn-amd-amdhsa 
-Xopenmp-target=nvptx64-nvidia-cuda --offload-arch=sm_70 \
----------------
tra wrote:
> You may want to add a test that when no `--offload-arch=` is specified, 
> driver makes a reasonable default choice for both nvptx and amdgpu.
OpenMP uses a different default from CUDA / HIP. If not specified, it will use 
the `CLANG_OPENMP_NVPTX_DEFAULT_ARCH` definition (Should be set automatically 
when CMake configures Clang) or the `amdgpu-arch` tool and pass it in via the 
`-march=` option. This is indicated by passing an empty StringRef to the bound 
architecture while CUDA / HIP use some default. Elsewhere, if we see the 
BoundArchitecture is empty we just get the value of the `-march` option 
instead. This should be covered by some other tests and this doesn't change the 
default behaviour.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124721/new/

https://reviews.llvm.org/D124721

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to