|
1 | 1 | // Check device traits macros are defined if sycl is enabled:
|
2 | 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 \ |
| 3 | +// RUN: %clangxx -fno-sycl-libspirv -nocudalib -fsycl -fsycl-targets=nvptx64-nvidia-cuda -### %s 2>&1 \ |
4 | 4 | // RUN: | FileCheck -check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEFAULT-TRIPLE %s
|
5 | 5 | // CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEFAULT-TRIPLE: clang{{.*}} "-triple" "nvptx64-nvidia-cuda"
|
6 | 6 | // CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEFAULT-TRIPLE-COUNT-2: "-D__SYCL_ANY_DEVICE_HAS_ANY_ASPECT__=1"
|
|
9 | 9 |
|
10 | 10 | // Compiling for a specific CUDA target passing the device to '-fsycl-targets'.
|
11 | 11 | //
|
12 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_50 -### %s 2>&1 | \ |
| 12 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_50 -### %s 2>&1 | \ |
13 | 13 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
14 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_52 -### %s 2>&1 | \ |
| 14 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_52 -### %s 2>&1 | \ |
15 | 15 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
16 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_53 -### %s 2>&1 | \ |
| 16 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_53 -### %s 2>&1 | \ |
17 | 17 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
18 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_60 -### %s 2>&1 | \ |
| 18 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_60 -### %s 2>&1 | \ |
19 | 19 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
20 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_61 -### %s 2>&1 | \ |
| 20 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_61 -### %s 2>&1 | \ |
21 | 21 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
22 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_62 -### %s 2>&1 | \ |
| 22 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_62 -### %s 2>&1 | \ |
23 | 23 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
24 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_70 -### %s 2>&1 | \ |
| 24 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_70 -### %s 2>&1 | \ |
25 | 25 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
26 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_72 -### %s 2>&1 | \ |
| 26 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_72 -### %s 2>&1 | \ |
27 | 27 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
28 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_75 -### %s 2>&1 | \ |
| 28 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_75 -### %s 2>&1 | \ |
29 | 29 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
30 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_80 -### %s 2>&1 | \ |
| 30 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_80 -### %s 2>&1 | \ |
31 | 31 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
32 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_86 -### %s 2>&1 | \ |
| 32 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_86 -### %s 2>&1 | \ |
33 | 33 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
34 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_87 -### %s 2>&1 | \ |
| 34 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_87 -### %s 2>&1 | \ |
35 | 35 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
36 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_89 -### %s 2>&1 | \ |
| 36 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_89 -### %s 2>&1 | \ |
37 | 37 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
38 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_90 -### %s 2>&1 | \ |
| 38 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_90 -### %s 2>&1 | \ |
39 | 39 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
40 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_90a -### %s 2>&1 | \ |
| 40 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvidia_gpu_sm_90a -### %s 2>&1 | \ |
41 | 41 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-DEVICE-TRIPLE
|
42 | 42 |
|
43 | 43 | // Compiling for a CUDA target passing the device arch to '--offload-arch' (using the '--cuda-gpu-arch' alias).
|
44 | 44 | //
|
45 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 -### %s 2>&1 | \ |
| 45 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 -### %s 2>&1 | \ |
46 | 46 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
47 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_52 -### %s 2>&1 | \ |
| 47 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_52 -### %s 2>&1 | \ |
48 | 48 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
49 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_53 -### %s 2>&1 | \ |
| 49 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_53 -### %s 2>&1 | \ |
50 | 50 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
51 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 -### %s 2>&1 | \ |
| 51 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 -### %s 2>&1 | \ |
52 | 52 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
53 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_61 -### %s 2>&1 | \ |
| 53 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_61 -### %s 2>&1 | \ |
54 | 54 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
55 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_62 -### %s 2>&1 | \ |
| 55 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_62 -### %s 2>&1 | \ |
56 | 56 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
57 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_70 -### %s 2>&1 | \ |
| 57 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_70 -### %s 2>&1 | \ |
58 | 58 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
59 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_72 -### %s 2>&1 | \ |
| 59 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_72 -### %s 2>&1 | \ |
60 | 60 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
61 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_75 -### %s 2>&1 | \ |
| 61 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_75 -### %s 2>&1 | \ |
62 | 62 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
63 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -### %s 2>&1 | \ |
| 63 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -### %s 2>&1 | \ |
64 | 64 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
65 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_86 -### %s 2>&1 | \ |
| 65 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_86 -### %s 2>&1 | \ |
66 | 66 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
67 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_87 -### %s 2>&1 | \ |
| 67 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_87 -### %s 2>&1 | \ |
68 | 68 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
69 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_89 -### %s 2>&1 | \ |
| 69 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_89 -### %s 2>&1 | \ |
70 | 70 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
71 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_90 -### %s 2>&1 | \ |
| 71 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_90 -### %s 2>&1 | \ |
72 | 72 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
73 |
| -// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_90a -### %s 2>&1 | \ |
| 73 | +// RUN: %clangxx -fsycl -fno-sycl-libspirv -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_90a -### %s 2>&1 | \ |
74 | 74 | // RUN: FileCheck %s --check-prefix=CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH
|
75 | 75 |
|
76 | 76 | // Check device traits macros are defined if sycl is enabled:
|
|
86 | 86 | // CHECK-SYCL-NVPTX-NVIDIA-CUDA-OFFLOAD-ARCH: "-D__SYCL_ALL_DEVICES_HAVE_{{[a-z0-9_]+}}__=1"
|
87 | 87 |
|
88 | 88 | // Test all Cuda devices support at least the aspects of the least capable one.
|
89 |
| -// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_50 -### %s > %t 2>&1 |
90 |
| -// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_60 -### %s >> %t 2>&1 |
91 |
| -// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_70 -### %s >> %t 2>&1 |
92 |
| -// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_80 -### %s >> %t 2>&1 |
93 |
| -// RUN: %clangxx -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_90 -### %s >> %t 2>&1 |
| 89 | +// RUN: %clangxx -fno-sycl-libspirv -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_50 -### %s > %t 2>&1 |
| 90 | +// RUN: %clangxx -fno-sycl-libspirv -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_60 -### %s >> %t 2>&1 |
| 91 | +// RUN: %clangxx -fno-sycl-libspirv -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_70 -### %s >> %t 2>&1 |
| 92 | +// RUN: %clangxx -fno-sycl-libspirv -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_80 -### %s >> %t 2>&1 |
| 93 | +// RUN: %clangxx -fno-sycl-libspirv -nocudalib -fsycl -fsycl-targets=nvidia_gpu_sm_90 -### %s >> %t 2>&1 |
94 | 94 | // RUN: FileCheck --input-file=%t --check-prefixes=CHECK-SM50,CHECK-SM60,CHECK-SM70,CHECK-SM80,CHECK-SM90 %s
|
95 | 95 | // CHECK-SM50: "-D__SYCL_TARGET_NVIDIA_GPU_SM_50__"{{.*}} "-D__SYCL_ALL_DEVICES_HAVE_[[ASPECT:[a-z0-9]+]]__=1"
|
96 | 96 | // CHECK-SM60: "-D__SYCL_TARGET_NVIDIA_GPU_SM_60__"{{.*}} "-D__SYCL_ALL_DEVICES_HAVE_[[ASPECT]]__=1"
|
|
0 commit comments