
We can now target the NVPTX architecture directly via `--target=nvptx64-nvidia-cuda`. This currently does not define the `__CUDA_ARCH__` macro with is used to allow code to target different codes based on support. This patch simply adds this support. Reviewed By: tra, jdoerfert Differential Revision: https://reviews.llvm.org/D146975
6 lines
217 B
C
6 lines
217 B
C
// REQUIRES: nvptx-registered-target
|
|
|
|
// RUN: %clang %s -c -E -dM --target=nvptx64-nvidia-cuda -march=sm_70 -o - | \
|
|
// RUN: FileCheck --check-prefix=CHECK-CUDA-ARCH %s
|
|
// CHECK-CUDA-ARCH: #define __CUDA_ARCH__ 700
|