|
1 |
| -// REQUIRES: nvptx-registered-target |
| 1 | +// Check device traits macros are defined if sycl is enabled: |
| 2 | +// Compiling for the default CUDA target passing the triple to '-fsycl-targets'. |
| 3 | +// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvptx64-nvidia-cuda -### %s 2>&1 \ |
| 4 | +// RUN: | FileCheck -check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEFAULT-TRIPLE %s |
| 5 | +// CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEFAULT-TRIPLE-COUNT-2: "-D__SYCL_ANY_DEVICE_HAS_ANY_ASPECT__=1" |
| 6 | +// CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEFAULT-TRIPLE: "{{(-D__SYCL_ALL_DEVICES_HAVE_)?}}{{.*}}{{(__=1)?}}" |
2 | 7 |
|
3 | 8 | // Check device traits macros are defined if sycl is enabled:
|
4 |
| -// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -### %s 2>&1 \ |
5 |
| -// RUN: | FileCheck -check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA %s |
6 |
| -// CHECK-SYCL-NVPTX-NVIDIA-CUDA-COUNT-2: "-D__SYCL_ANY_DEVICE_HAS_ANY_ASPECT__=1" |
7 |
| -// CHECK-SYCL-NVPTX-NVIDIA-CUDA: "-D__SYCL_ANY_DEVICE_HAS_{{.*}}__=1" |
8 |
| -// CHECK-SYCL-NVPTX-NVIDIA-CUDA: "{{(-D__SYCL_ALL_DEVICES_HAVE_)?}}{{.*}}{{(__=1)?}}" |
| 9 | +// Compiling for a specific CUDA target passing the device to '-fsycl-targets'. |
| 10 | +// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_80 -### %s 2>&1 \ |
| 11 | +// RUN: | FileCheck -check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE %s |
| 12 | +// CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE-COUNT-2: "-D__SYCL_ANY_DEVICE_HAS_ANY_ASPECT__=1" |
| 13 | +// CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE: "{{(-D__SYCL_ALL_DEVICES_HAVE_)?}}{{.*}}{{(__=1)?}}" |
9 | 14 |
|
| 15 | +// Check device traits macros are defined if sycl is enabled: |
| 16 | +// Compiling for a CUDA target passing the device arch to '--offload-arch'. |
| 17 | +// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --offload-arch=sm_80 -### %s 2>&1 \ |
| 18 | +// RUN: | FileCheck -check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH %s |
| 19 | +// CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH-COUNT-2: "-D__SYCL_ANY_DEVICE_HAS_ANY_ASPECT__=1" |
| 20 | +// CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH: "{{(-D__SYCL_ALL_DEVICES_HAVE_)?}}{{.*}}{{(__=1)?}}" |
0 commit comments