File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1- // RUN: %clangxx %s -fsycl -nocudalib -fno-sycl-libspirv -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --offload-arch=sm_80 -E -dM \
1+ // Verify the __CUDA_ARCH__ macro has not been defined when offloading SYCL on NVPTX
2+ // RUN: %clangxx -E -dM -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --offload-arch=sm_80 -nocudalib -fno-sycl-libspirv %s 2>&1 \
23// RUN: | FileCheck --check-prefix=CHECK-CUDA-ARCH-MACRO %s
34// CHECK-CUDA-ARCH-MACRO-NOT: #define __CUDA_ARCH__ {{[0-9]+}}
5+
6+ // Verify that '-fcuda-is-device' is not supplied when offloading SYCL on NVPTX
7+ // RUN: %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --offload-arch=sm_80 -nocudalib -fno-sycl-libspirv %s 2>&1 \
8+ // RUN: | FileCheck --check-prefix=CHECK-CUDA-IS-DEVICE %s
9+ // CHECK-CUDA-IS-DEVICE: clang{{.*}} "-cc1" "-triple" "nvptx64-nvidia-cuda"
10+ // CHECK-CUDA-IS-DEVICE-NOT: "-fcuda-is-device"
11+ // CHECK-CUDA-IS-DEVICE-SAME: "-fsycl-is-device"
You can’t perform that action at this time.
0 commit comments