Skip to content

Commit 7e65322

Browse files
author
Georgi Mirazchiyski
committed
Add driver test checking -fcuda-is-device
1 parent b49e718 commit 7e65322

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
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"

0 commit comments

Comments
 (0)