1 | /// |
2 | /// Perform several driver tests for OpenMP offloading |
3 | /// |
4 | |
5 | // REQUIRES: clang-driver |
6 | // REQUIRES: x86-registered-target |
7 | // REQUIRES: powerpc-registered-target |
8 | // REQUIRES: nvptx-registered-target |
9 | |
10 | /// ########################################################################### |
11 | |
12 | /// Check -Xopenmp-target uses one of the archs provided when several archs are used. |
13 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ |
14 | // RUN: -Xopenmp-target -march=sm_35 -Xopenmp-target -march=sm_60 %s 2>&1 \ |
15 | // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-ARCHS %s |
16 | |
17 | // CHK-FOPENMP-TARGET-ARCHS: ptxas{{.*}}" "--gpu-name" "sm_60" |
18 | // CHK-FOPENMP-TARGET-ARCHS: nvlink{{.*}}" "-arch" "sm_60" |
19 | |
20 | /// ########################################################################### |
21 | |
22 | /// Check -Xopenmp-target -march=sm_35 works as expected when two triples are present. |
23 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp \ |
24 | // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu,nvptx64-nvidia-cuda \ |
25 | // RUN: -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_35 %s 2>&1 \ |
26 | // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-COMPILATION %s |
27 | |
28 | // CHK-FOPENMP-TARGET-COMPILATION: ptxas{{.*}}" "--gpu-name" "sm_35" |
29 | // CHK-FOPENMP-TARGET-COMPILATION: nvlink{{.*}}" "-arch" "sm_35" |
30 | |
31 | /// ########################################################################### |
32 | |
33 | /// Check that -lomptarget-nvptx is passed to nvlink. |
34 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp \ |
35 | // RUN: -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \ |
36 | // RUN: | FileCheck -check-prefix=CHK-NVLINK %s |
37 | /// Check that the value of --libomptarget-nvptx-path is forwarded to nvlink. |
38 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp \ |
39 | // RUN: --libomptarget-nvptx-path=/path/to/libomptarget/ \ |
40 | // RUN: -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \ |
41 | // RUN: | FileCheck -check-prefixes=CHK-NVLINK,CHK-LIBOMPTARGET-NVPTX-PATH %s |
42 | |
43 | // CHK-NVLINK: nvlink |
44 | // CHK-LIBOMPTARGET-NVPTX-PATH-SAME: "-L/path/to/libomptarget/" |
45 | // CHK-NVLINK-SAME: "-lomptarget-nvptx" |
46 | |
47 | /// ########################################################################### |
48 | |
49 | /// Check cubin file generation and usage by nvlink |
50 | // RUN: %clang -### -no-canonical-prefixes -target powerpc64le-unknown-linux-gnu -fopenmp=libomp \ |
51 | // RUN: -fopenmp-targets=nvptx64-nvidia-cuda -save-temps %s 2>&1 \ |
52 | // RUN: | FileCheck -check-prefix=CHK-CUBIN-NVLINK %s |
53 | /// Check cubin file generation and usage by nvlink when toolchain has BindArchAction |
54 | // RUN: %clang -### -no-canonical-prefixes -target x86_64-apple-darwin17.0.0 -fopenmp=libomp \ |
55 | // RUN: -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \ |
56 | // RUN: | FileCheck -check-prefix=CHK-CUBIN-NVLINK %s |
57 | |
58 | // CHK-CUBIN-NVLINK: clang{{.*}}" "-o" "[[PTX:.*\.s]]" |
59 | // CHK-CUBIN-NVLINK-NEXT: ptxas{{.*}}" "--output-file" "[[CUBIN:.*\.cubin]]" {{.*}}"[[PTX]]" |
60 | // CHK-CUBIN-NVLINK-NEXT: nvlink{{.*}}" {{.*}}"[[CUBIN]]" |
61 | |
62 | /// ########################################################################### |
63 | |
64 | /// Check unbundlink of assembly file, cubin file generation and usage by nvlink |
65 | // RUN: touch %t.s |
66 | // RUN: %clang -### -target powerpc64le-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ |
67 | // RUN: -no-canonical-prefixes -save-temps %t.s 2>&1 \ |
68 | // RUN: | FileCheck -check-prefix=CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK %s |
69 | |
70 | /// Use DAG to ensure that assembly file has been unbundled. |
71 | // CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK-DAG: ptxas{{.*}}" "--output-file" "[[CUBIN:.*\.cubin]]" {{.*}}"[[PTX:.*\.s]]" |
72 | // CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK-DAG: clang-offload-bundler{{.*}}" "-type=s" {{.*}}"-outputs={{.*}}[[PTX]] |
73 | // CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK-DAG-SAME: "-unbundle" |
74 | // CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK: nvlink{{.*}}" {{.*}}"[[CUBIN]]" |
75 | |
76 | /// ########################################################################### |
77 | |
78 | /// Check cubin file generation and bundling |
79 | // RUN: %clang -### -target powerpc64le-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ |
80 | // RUN: -no-canonical-prefixes -save-temps %s -c 2>&1 \ |
81 | // RUN: | FileCheck -check-prefix=CHK-PTXAS-CUBIN-BUNDLING %s |
82 | |
83 | // CHK-PTXAS-CUBIN-BUNDLING: clang{{.*}}" "-o" "[[PTX:.*\.s]]" |
84 | // CHK-PTXAS-CUBIN-BUNDLING-NEXT: ptxas{{.*}}" "--output-file" "[[CUBIN:.*\.cubin]]" {{.*}}"[[PTX]]" |
85 | // CHK-PTXAS-CUBIN-BUNDLING: clang-offload-bundler{{.*}}" "-type=o" {{.*}}"-inputs={{.*}}[[CUBIN]] |
86 | |
87 | /// ########################################################################### |
88 | |
89 | /// Check cubin file unbundling and usage by nvlink |
90 | // RUN: touch %t.o |
91 | // RUN: %clang -### -target powerpc64le-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ |
92 | // RUN: -no-canonical-prefixes -save-temps %t.o %S/Inputs/in.so 2>&1 \ |
93 | // RUN: | FileCheck -check-prefix=CHK-CUBIN-UNBUNDLING-NVLINK %s |
94 | |
95 | /// Use DAG to ensure that cubin file has been unbundled. |
96 | // CHK-CUBIN-UNBUNDLING-NVLINK-NOT: clang-offload-bundler{{.*}}" "-type=o"{{.*}}in.so |
97 | // CHK-CUBIN-UNBUNDLING-NVLINK-DAG: nvlink{{.*}}" {{.*}}"[[CUBIN:.*\.cubin]]" |
98 | // CHK-CUBIN-UNBUNDLING-NVLINK-DAG: clang-offload-bundler{{.*}}" "-type=o" {{.*}}"-outputs={{.*}}[[CUBIN]] |
99 | // CHK-CUBIN-UNBUNDLING-NVLINK-DAG-SAME: "-unbundle" |
100 | // CHK-CUBIN-UNBUNDLING-NVLINK-NOT: clang-offload-bundler{{.*}}" "-type=o"{{.*}}in.so |
101 | |
102 | /// ########################################################################### |
103 | |
104 | /// Check cubin file generation and usage by nvlink |
105 | // RUN: touch %t1.o |
106 | // RUN: touch %t2.o |
107 | // RUN: %clang -### -no-canonical-prefixes -target powerpc64le-unknown-linux-gnu -fopenmp=libomp \ |
108 | // RUN: -fopenmp-targets=nvptx64-nvidia-cuda %t1.o %t2.o 2>&1 \ |
109 | // RUN: | FileCheck -check-prefix=CHK-TWOCUBIN %s |
110 | /// Check cubin file generation and usage by nvlink when toolchain has BindArchAction |
111 | // RUN: %clang -### -no-canonical-prefixes -target x86_64-apple-darwin17.0.0 -fopenmp=libomp \ |
112 | // RUN: -fopenmp-targets=nvptx64-nvidia-cuda %t1.o %t2.o 2>&1 \ |
113 | // RUN: | FileCheck -check-prefix=CHK-TWOCUBIN %s |
114 | |
115 | // CHK-TWOCUBIN: nvlink{{.*}}openmp-offload-{{.*}}.cubin" "{{.*}}openmp-offload-{{.*}}.cubin" |
116 | |
117 | /// ########################################################################### |
118 | |
119 | /// Check PTXAS is passed -c flag when offloading to an NVIDIA device using OpenMP. |
120 | // RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -no-canonical-prefixes %s 2>&1 \ |
121 | // RUN: | FileCheck -check-prefix=CHK-PTXAS-DEFAULT %s |
122 | |
123 | // CHK-PTXAS-DEFAULT: ptxas{{.*}}" "-c" |
124 | |
125 | /// ########################################################################### |
126 | |
127 | /// PTXAS is passed -c flag by default when offloading to an NVIDIA device using OpenMP - disable it. |
128 | // RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fnoopenmp-relocatable-target \ |
129 | // RUN: -save-temps -no-canonical-prefixes %s 2>&1 \ |
130 | // RUN: | FileCheck -check-prefix=CHK-PTXAS-NORELO %s |
131 | |
132 | // CHK-PTXAS-NORELO-NOT: ptxas{{.*}}" "-c" |
133 | |
134 | /// ########################################################################### |
135 | |
136 | /// PTXAS is passed -c flag by default when offloading to an NVIDIA device using OpenMP |
137 | /// Check that the flag is passed when -fopenmp-relocatable-target is used. |
138 | // RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-relocatable-target \ |
139 | // RUN: -save-temps -no-canonical-prefixes %s 2>&1 \ |
140 | // RUN: | FileCheck -check-prefix=CHK-PTXAS-RELO %s |
141 | |
142 | // CHK-PTXAS-RELO: ptxas{{.*}}" "-c" |
143 | |
144 | /// ########################################################################### |
145 | |
146 | /// Check that error is not thrown by toolchain when no cuda lib flag is used. |
147 | /// Check that the flag is passed when -fopenmp-relocatable-target is used. |
148 | // RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 \ |
149 | // RUN: -nocudalib -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \ |
150 | // RUN: | FileCheck -check-prefix=CHK-FLAG-NOLIBDEVICE %s |
151 | |
152 | // CHK-FLAG-NOLIBDEVICE-NOT: error:{{.*}}sm_60 |
153 | |
154 | /// ########################################################################### |
155 | |
156 | /// Check that error is not thrown by toolchain when no cuda lib device is found when using -S. |
157 | /// Check that the flag is passed when -fopenmp-relocatable-target is used. |
158 | // RUN: %clang -### -S -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 \ |
159 | // RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \ |
160 | // RUN: | FileCheck -check-prefix=CHK-NOLIBDEVICE %s |
161 | |
162 | // CHK-NOLIBDEVICE-NOT: error:{{.*}}sm_60 |
163 | |
164 | /// ########################################################################### |
165 | |
166 | /// Check that the runtime bitcode library is part of the compile line. Create a bogus |
167 | /// bitcode library and add it to the LIBRARY_PATH. |
168 | // RUN: env LIBRARY_PATH=%S/Inputs/libomptarget %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ |
169 | // RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \ |
170 | // RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \ |
171 | // RUN: | FileCheck -check-prefix=CHK-BCLIB %s |
172 | /// The user can override default detection using --libomptarget-nvptx-path=. |
173 | // RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda --libomptarget-nvptx-path=%S/Inputs/libomptarget \ |
174 | // RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \ |
175 | // RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \ |
176 | // RUN: | FileCheck -check-prefix=CHK-BCLIB %s |
177 | |
178 | // CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-sm_20.bc |
179 | // CHK-BCLIB-NOT: {{error:|warning:}} |
180 | |
181 | /// ########################################################################### |
182 | |
183 | /// Check that the warning is thrown when the libomptarget bitcode library is not found. |
184 | /// Libomptarget requires sm_35 or newer so an sm_20 bitcode library should never exist. |
185 | // RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ |
186 | // RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \ |
187 | // RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \ |
188 | // RUN: | FileCheck -check-prefix=CHK-BCLIB-WARN %s |
189 | |
190 | // CHK-BCLIB-WARN: No library 'libomptarget-nvptx-sm_20.bc' found in the default clang lib directory or in LIBRARY_PATH. Expect degraded performance due to no inlining of runtime functions on target devices. |
191 | |
192 | /// Check that debug info is emitted in dwarf-2 |
193 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O1 --no-cuda-noopt-device-debug 2>&1 \ |
194 | // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s |
195 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 2>&1 \ |
196 | // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s |
197 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --no-cuda-noopt-device-debug 2>&1 \ |
198 | // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s |
199 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g0 2>&1 \ |
200 | // RUN: | FileCheck -check-prefix=NO_DEBUG %s |
201 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb0 -O3 --cuda-noopt-device-debug 2>&1 \ |
202 | // RUN: | FileCheck -check-prefix=NO_DEBUG %s |
203 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -gline-directives-only 2>&1 \ |
204 | // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s |
205 | |
206 | // DEBUG_DIRECTIVES-NOT: warning: debug |
207 | // NO_DEBUG-NOT: warning: debug |
208 | // NO_DEBUG: "-fopenmp-is-device" |
209 | // NO_DEBUG-NOT: "-debug-info-kind= |
210 | // NO_DEBUG: ptxas |
211 | // DEBUG_DIRECTIVES: "-triple" "nvptx64-nvidia-cuda" |
212 | // DEBUG_DIRECTIVES-SAME: "-debug-info-kind=line-directives-only" |
213 | // DEBUG_DIRECTIVES-SAME: "-fopenmp-is-device" |
214 | // DEBUG_DIRECTIVES: ptxas |
215 | // DEBUG_DIRECTIVES: "-lineinfo" |
216 | // NO_DEBUG-NOT: "-g" |
217 | // NO_DEBUG: nvlink |
218 | // NO_DEBUG-NOT: "-g" |
219 | |
220 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --no-cuda-noopt-device-debug 2>&1 \ |
221 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
222 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g 2>&1 \ |
223 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
224 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --cuda-noopt-device-debug 2>&1 \ |
225 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
226 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --cuda-noopt-device-debug 2>&1 \ |
227 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
228 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g2 2>&1 \ |
229 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
230 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb2 -O0 --cuda-noopt-device-debug 2>&1 \ |
231 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
232 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g3 -O3 --cuda-noopt-device-debug 2>&1 \ |
233 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
234 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb3 -O2 --cuda-noopt-device-debug 2>&1 \ |
235 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
236 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -gline-tables-only 2>&1 \ |
237 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
238 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb1 -O2 --cuda-noopt-device-debug 2>&1 \ |
239 | // RUN: | FileCheck -check-prefix=HAS_DEBUG %s |
240 | |
241 | // HAS_DEBUG-NOT: warning: debug |
242 | // HAS_DEBUG: "-triple" "nvptx64-nvidia-cuda" |
243 | // HAS_DEBUG-SAME: "-debug-info-kind={{limited|line-tables-only}}" |
244 | // HAS_DEBUG-SAME: "-dwarf-version=2" |
245 | // HAS_DEBUG-SAME: "-fopenmp-is-device" |
246 | // HAS_DEBUG: ptxas |
247 | // HAS_DEBUG-SAME: "-g" |
248 | // HAS_DEBUG-SAME: "--dont-merge-basicblocks" |
249 | // HAS_DEBUG-SAME: "--return-at-end" |
250 | // HAS_DEBUG: nvlink |
251 | // HAS_DEBUG-SAME: "-g" |
252 | |
253 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode 2>&1 \ |
254 | // RUN: | FileCheck -check-prefix=CUDA_MODE %s |
255 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode -fopenmp-cuda-mode 2>&1 \ |
256 | // RUN: | FileCheck -check-prefix=CUDA_MODE %s |
257 | // CUDA_MODE: clang{{.*}}"-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda" |
258 | // CUDA_MODE-SAME: "-fopenmp-cuda-mode" |
259 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode 2>&1 \ |
260 | // RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s |
261 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode -fno-openmp-cuda-mode 2>&1 \ |
262 | // RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s |
263 | // NO_CUDA_MODE-NOT: "-{{fno-|f}}openmp-cuda-mode" |
264 | |
265 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-force-full-runtime 2>&1 \ |
266 | // RUN: | FileCheck -check-prefix=FULL_RUNTIME %s |
267 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-force-full-runtime -fopenmp-cuda-force-full-runtime 2>&1 \ |
268 | // RUN: | FileCheck -check-prefix=FULL_RUNTIME %s |
269 | // FULL_RUNTIME: clang{{.*}}"-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda" |
270 | // FULL_RUNTIME-SAME: "-fopenmp-cuda-force-full-runtime" |
271 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-force-full-runtime 2>&1 \ |
272 | // RUN: | FileCheck -check-prefix=NO_FULL_RUNTIME %s |
273 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-force-full-runtime -fno-openmp-cuda-force-full-runtime 2>&1 \ |
274 | // RUN: | FileCheck -check-prefix=NO_FULL_RUNTIME %s |
275 | // NO_FULL_RUNTIME-NOT: "-{{fno-|f}}openmp-cuda-force-full-runtime" |
276 | |
277 | // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-teams-reduction-recs-num=2048 2>&1 \ |
278 | // RUN: | FileCheck -check-prefix=CUDA_RED_RECS %s |
279 | // CUDA_RED_RECS: clang{{.*}}"-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda" |
280 | // CUDA_RED_RECS-SAME: "-fopenmp-cuda-teams-reduction-recs-num=2048" |
281 | |