blob: 175e4b877ce94dd588ad2752531f2439f3675f1a [file] [log] [blame]
Artem Belevich0ff05cd2015-07-13 23:27:56 +00001// Tests CUDA compilation pipeline construction in Driver.
2// REQUIRES: clang-driver
Artem Belevichb73313d2015-07-14 18:49:17 +00003// REQUIRES: x86-registered-target
4// REQUIRES: nvptx-registered-target
Artem Belevich0ff05cd2015-07-13 23:27:56 +00005
Justin Lebar388579f2016-01-13 01:24:35 +00006// Simple compilation case. Compile device-side to PTX assembly and make sure
7// we use it on the host side.
Artem Belevichdf7cd312015-07-16 17:24:18 +00008// RUN: %clang -### -target x86_64-linux-gnu -c %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +00009// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
10// RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
11// RUN: -check-prefix NOLINK %s
Artem Belevich0ff05cd2015-07-13 23:27:56 +000012
Justin Lebar388579f2016-01-13 01:24:35 +000013// Typical compilation + link case.
Artem Belevichdf7cd312015-07-16 17:24:18 +000014// RUN: %clang -### -target x86_64-linux-gnu %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +000015// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
16// RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
17// RUN: -check-prefix LINK %s
Artem Belevich0ff05cd2015-07-13 23:27:56 +000018
Justin Lebar388579f2016-01-13 01:24:35 +000019// Verify that --cuda-host-only disables device-side compilation, but doesn't
20// disable host-side compilation/linking.
Artem Belevichdf7cd312015-07-16 17:24:18 +000021// RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +000022// RUN: | FileCheck -check-prefix NODEVICE -check-prefix HOST \
23// RUN: -check-prefix NOINCLUDES-DEVICE -check-prefix LINK %s
Artem Belevich0ff05cd2015-07-13 23:27:56 +000024
Justin Lebar388579f2016-01-13 01:24:35 +000025// Verify that --cuda-device-only disables host-side compilation and linking.
Artem Belevichdf7cd312015-07-16 17:24:18 +000026// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +000027// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
28// RUN: -check-prefix NOHOST -check-prefix NOLINK %s
Artem Belevich0ff05cd2015-07-13 23:27:56 +000029
Justin Lebardc3c5042016-04-19 02:27:07 +000030// Check that the last of --cuda-compile-host-device, --cuda-host-only, and
31// --cuda-device-only wins.
32
33// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
34// RUN: --cuda-host-only %s 2>&1 \
35// RUN: | FileCheck -check-prefix NODEVICE -check-prefix HOST \
36// RUN: -check-prefix NOINCLUDES-DEVICE -check-prefix LINK %s
37
38// RUN: %clang -### -target x86_64-linux-gnu --cuda-compile-host-device \
39// RUN: --cuda-host-only %s 2>&1 \
40// RUN: | FileCheck -check-prefix NODEVICE -check-prefix HOST \
41// RUN: -check-prefix NOINCLUDES-DEVICE -check-prefix LINK %s
42
43// RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only \
44// RUN: --cuda-device-only %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +000045// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
46// RUN: -check-prefix NOHOST -check-prefix NOLINK %s
Artem Belevich23256752015-09-22 17:23:09 +000047
Justin Lebardc3c5042016-04-19 02:27:07 +000048// RUN: %clang -### -target x86_64-linux-gnu --cuda-compile-host-device \
49// RUN: --cuda-device-only %s 2>&1 \
50// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
51// RUN: -check-prefix NOHOST -check-prefix NOLINK %s
52
53// RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only \
54// RUN: --cuda-compile-host-device %s 2>&1 \
55// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
56// RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
57// RUN: -check-prefix LINK %s
58
59// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
60// RUN: --cuda-compile-host-device %s 2>&1 \
61// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
62// RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
63// RUN: -check-prefix LINK %s
64
Alexander Kornienko2a8c18d2018-04-06 15:14:32 +000065// Verify that --cuda-gpu-arch option passes the correct GPU architecture to
Justin Lebar388579f2016-01-13 01:24:35 +000066// device compilation.
Artem Belevicha424e882016-12-09 22:59:17 +000067// RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_30 -c %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +000068// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
Artem Belevicha424e882016-12-09 22:59:17 +000069// RUN: -check-prefix DEVICE-SM30 -check-prefix HOST \
Justin Lebar388579f2016-01-13 01:24:35 +000070// RUN: -check-prefix INCLUDES-DEVICE -check-prefix NOLINK %s
Artem Belevich0ff05cd2015-07-13 23:27:56 +000071
Justin Lebar388579f2016-01-13 01:24:35 +000072// Verify that there is one device-side compilation per --cuda-gpu-arch args
Artem Belevich0ff05cd2015-07-13 23:27:56 +000073// and that all results are included on the host side.
Artem Belevichf8144ab2015-08-27 18:10:41 +000074// RUN: %clang -### -target x86_64-linux-gnu \
Justin Lebar388579f2016-01-13 01:24:35 +000075// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 -c %s 2>&1 \
Jonas Hahnfelde7681322018-02-28 17:53:46 +000076// RUN: | FileCheck -check-prefixes DEVICE,DEVICE-NOSAVE,DEVICE2 \
77// RUN: -check-prefixes DEVICE-SM30,DEVICE2-SM35 \
78// RUN: -check-prefixes INCLUDES-DEVICE,INCLUDES-DEVICE2 \
79// RUN: -check-prefixes HOST,HOST-NOSAVE,NOLINK %s
Artem Belevich0ff05cd2015-07-13 23:27:56 +000080
Justin Lebar388579f2016-01-13 01:24:35 +000081// Verify that device-side results are passed to the correct tool when
82// -save-temps is used.
Artem Belevichf8144ab2015-08-27 18:10:41 +000083// RUN: %clang -### -target x86_64-linux-gnu -save-temps -c %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +000084// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-SAVE \
85// RUN: -check-prefix HOST -check-prefix HOST-SAVE -check-prefix NOLINK %s
Artem Belevichf8144ab2015-08-27 18:10:41 +000086
Justin Lebar388579f2016-01-13 01:24:35 +000087// Verify that device-side results are passed to the correct tool when
88// -fno-integrated-as is used.
Artem Belevichf8144ab2015-08-27 18:10:41 +000089// RUN: %clang -### -target x86_64-linux-gnu -fno-integrated-as -c %s 2>&1 \
Justin Lebar388579f2016-01-13 01:24:35 +000090// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
91// RUN: -check-prefix HOST -check-prefix HOST-NOSAVE \
92// RUN: -check-prefix HOST-AS -check-prefix NOLINK %s
Artem Belevichf8144ab2015-08-27 18:10:41 +000093
Artem Belevicha424e882016-12-09 22:59:17 +000094// Verify that --[no-]cuda-gpu-arch arguments are handled correctly.
Alexander Kornienko2a8c18d2018-04-06 15:14:32 +000095// a) --no-cuda-gpu-arch=X negates preceding --cuda-gpu-arch=X
Artem Belevicha424e882016-12-09 22:59:17 +000096// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
97// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
98// RUN: --no-cuda-gpu-arch=sm_35 \
99// RUN: -c %s 2>&1 \
100// RUN: | FileCheck -check-prefixes NOARCH-SM20,ARCH-SM30,NOARCH-SM35 %s
101
Alexander Kornienko2a8c18d2018-04-06 15:14:32 +0000102// b) --no-cuda-gpu-arch=X negates more than one preceding --cuda-gpu-arch=X
Artem Belevicha424e882016-12-09 22:59:17 +0000103// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
104// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
105// RUN: --no-cuda-gpu-arch=sm_35 \
106// RUN: -c %s 2>&1 \
107// RUN: | FileCheck -check-prefixes NOARCH-SM20,ARCH-SM30,NOARCH-SM35 %s
108
Alexander Kornienko2a8c18d2018-04-06 15:14:32 +0000109// c) if --no-cuda-gpu-arch=X negates all preceding --cuda-gpu-arch=X
Artem Belevicha424e882016-12-09 22:59:17 +0000110// we default to sm_20 -- same as if no --cuda-gpu-arch were passed.
111// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
112// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
113// RUN: --no-cuda-gpu-arch=sm_35 --no-cuda-gpu-arch=sm_30 \
114// RUN: -c %s 2>&1 \
115// RUN: | FileCheck -check-prefixes ARCH-SM20,NOARCH-SM30,NOARCH-SM35 %s
116
117// d) --no-cuda-gpu-arch=X is a no-op if there's no preceding --cuda-gpu-arch=X
118// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
119// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30\
120// RUN: --no-cuda-gpu-arch=sm_50 \
121// RUN: -c %s 2>&1 \
122// RUN: | FileCheck -check-prefixes NOARCH-SM20,ARCH-SM30,ARCH-SM35 %s
123
124// e) --no-cuda-gpu-arch=X does not affect following --cuda-gpu-arch=X
125// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
126// RUN: --no-cuda-gpu-arch=sm_35 --no-cuda-gpu-arch=sm_30 \
127// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
128// RUN: -c %s 2>&1 \
129// RUN: | FileCheck -check-prefixes NOARCH-SM20,ARCH-SM30,ARCH-SM35 %s
130
131// f) --no-cuda-gpu-arch=all negates all preceding --cuda-gpu-arch=X
132// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
133// RUN: --cuda-gpu-arch=sm_20 --cuda-gpu-arch=sm_30 \
134// RUN: --no-cuda-gpu-arch=all \
135// RUN: --cuda-gpu-arch=sm_35 \
136// RUN: -c %s 2>&1 \
137// RUN: | FileCheck -check-prefixes NOARCH-SM20,NOARCH-SM30,ARCH-SM35 %s
138
139// g) There's no --cuda-gpu-arch=all
140// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
141// RUN: --cuda-gpu-arch=all \
142// RUN: -c %s 2>&1 \
143// RUN: | FileCheck -check-prefix ARCHALLERROR %s
144
Artem Belevichdde3dc22018-04-10 18:38:22 +0000145
146// Verify that --[no-]cuda-include-ptx arguments are handled correctly.
147// a) by default we're including PTX for all GPUs.
148// RUN: %clang -### -target x86_64-linux-gnu \
149// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
150// RUN: -c %s 2>&1 \
151// RUN: | FileCheck -check-prefixes FATBIN-COMMON,PTX-SM35,PTX-SM30 %s
152
153// b) --no-cuda-include-ptx=all disables PTX inclusion for all GPUs
154// RUN: %clang -### -target x86_64-linux-gnu \
155// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
156// RUN: --no-cuda-include-ptx=all \
157// RUN: -c %s 2>&1 \
158// RUN: | FileCheck -check-prefixes FATBIN-COMMON,NOPTX-SM35,NOPTX-SM30 %s
159
160// c) --no-cuda-include-ptx=sm_XX disables PTX inclusion for that GPU only.
161// RUN: %clang -### -target x86_64-linux-gnu \
162// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
163// RUN: --no-cuda-include-ptx=sm_35 \
164// RUN: -c %s 2>&1 \
165// RUN: | FileCheck -check-prefixes FATBIN-COMMON,NOPTX-SM35,PTX-SM30 %s
166// RUN: %clang -### -target x86_64-linux-gnu \
167// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
168// RUN: --no-cuda-include-ptx=sm_30 \
169// RUN: -c %s 2>&1 \
170// RUN: | FileCheck -check-prefixes FATBIN-COMMON,PTX-SM35,NOPTX-SM30 %s
171
172// d) --cuda-include-ptx=all overrides preceding --no-cuda-include-ptx=all
173// RUN: %clang -### -target x86_64-linux-gnu \
174// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
175// RUN: --no-cuda-include-ptx=all --cuda-include-ptx=all \
176// RUN: -c %s 2>&1 \
177// RUN: | FileCheck -check-prefixes FATBIN-COMMON,PTX-SM35,PTX-SM30 %s
178
179// e) --cuda-include-ptx=all overrides preceding --no-cuda-include-ptx=sm_XX
180// RUN: %clang -### -target x86_64-linux-gnu \
181// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
182// RUN: --no-cuda-include-ptx=sm_30 --cuda-include-ptx=all \
183// RUN: -c %s 2>&1 \
184// RUN: | FileCheck -check-prefixes FATBIN-COMMON,PTX-SM35,PTX-SM30 %s
185
186
Artem Belevicha424e882016-12-09 22:59:17 +0000187// ARCH-SM20: "-cc1"{{.*}}"-target-cpu" "sm_20"
188// NOARCH-SM20-NOT: "-cc1"{{.*}}"-target-cpu" "sm_20"
189// ARCH-SM30: "-cc1"{{.*}}"-target-cpu" "sm_30"
190// NOARCH-SM30-NOT: "-cc1"{{.*}}"-target-cpu" "sm_30"
191// ARCH-SM35: "-cc1"{{.*}}"-target-cpu" "sm_35"
192// NOARCH-SM35-NOT: "-cc1"{{.*}}"-target-cpu" "sm_35"
193// ARCHALLERROR: error: Unsupported CUDA gpu architecture: all
194
Justin Lebar388579f2016-01-13 01:24:35 +0000195// Match device-side preprocessor and compiler phases with -save-temps.
196// DEVICE-SAVE: "-cc1" "-triple" "nvptx64-nvidia-cuda"
Petr Hosek7b274542018-08-08 22:23:57 +0000197// DEVICE-SAVE-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
Justin Lebar388579f2016-01-13 01:24:35 +0000198// DEVICE-SAVE-SAME: "-fcuda-is-device"
199// DEVICE-SAVE-SAME: "-x" "cuda"
Artem Belevich5e2a3ec2015-11-17 22:28:40 +0000200
Justin Lebar388579f2016-01-13 01:24:35 +0000201// DEVICE-SAVE: "-cc1" "-triple" "nvptx64-nvidia-cuda"
Petr Hosek7b274542018-08-08 22:23:57 +0000202// DEVICE-SAVE-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
Justin Lebar388579f2016-01-13 01:24:35 +0000203// DEVICE-SAVE-SAME: "-fcuda-is-device"
204// DEVICE-SAVE-SAME: "-x" "cuda-cpp-output"
Artem Belevich5e2a3ec2015-11-17 22:28:40 +0000205
Justin Lebar388579f2016-01-13 01:24:35 +0000206// Match the job that produces PTX assembly.
207// DEVICE: "-cc1" "-triple" "nvptx64-nvidia-cuda"
Petr Hosek7b274542018-08-08 22:23:57 +0000208// DEVICE-NOSAVE-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
Justin Lebar388579f2016-01-13 01:24:35 +0000209// DEVICE-SAME: "-fcuda-is-device"
Artem Belevicha424e882016-12-09 22:59:17 +0000210// DEVICE-SM30-SAME: "-target-cpu" "sm_30"
Justin Lebar21e5d4f2016-01-14 21:41:27 +0000211// DEVICE-SAME: "-o" "[[PTXFILE:[^"]*]]"
Justin Lebar388579f2016-01-13 01:24:35 +0000212// DEVICE-NOSAVE-SAME: "-x" "cuda"
213// DEVICE-SAVE-SAME: "-x" "ir"
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000214
Justin Lebar21e5d4f2016-01-14 21:41:27 +0000215// Match the call to ptxas (which assembles PTX to SASS).
216// DEVICE:ptxas
Artem Belevicha424e882016-12-09 22:59:17 +0000217// DEVICE-SM30-DAG: "--gpu-name" "sm_30"
Justin Lebar21e5d4f2016-01-14 21:41:27 +0000218// DEVICE-DAG: "--output-file" "[[CUBINFILE:[^"]*]]"
219// DEVICE-DAG: "[[PTXFILE]]"
220
Justin Lebar388579f2016-01-13 01:24:35 +0000221// Match another device-side compilation.
222// DEVICE2: "-cc1" "-triple" "nvptx64-nvidia-cuda"
Petr Hosek7b274542018-08-08 22:23:57 +0000223// DEVICE2-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
Justin Lebar388579f2016-01-13 01:24:35 +0000224// DEVICE2-SAME: "-fcuda-is-device"
Artem Belevicha424e882016-12-09 22:59:17 +0000225// DEVICE2-SM35-SAME: "-target-cpu" "sm_35"
Jonas Hahnfelde7681322018-02-28 17:53:46 +0000226// DEVICE2-SAME: "-o" "[[PTXFILE2:[^"]*]]"
Justin Lebar388579f2016-01-13 01:24:35 +0000227// DEVICE2-SAME: "-x" "cuda"
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000228
Jonas Hahnfelde7681322018-02-28 17:53:46 +0000229// Match another call to ptxas.
230// DEVICE2: ptxas
231// DEVICE2-SM35-DAG: "--gpu-name" "sm_35"
232// DEVICE2-DAG: "--output-file" "[[CUBINFILE2:[^"]*]]"
233// DEVICE2-DAG: "[[PTXFILE2]]"
234
Justin Lebar388579f2016-01-13 01:24:35 +0000235// Match no device-side compilation.
236// NODEVICE-NOT: "-cc1" "-triple" "nvptx64-nvidia-cuda"
Paul Robinson4abe94f2016-02-10 02:08:24 +0000237// NODEVICE-NOT: "-fcuda-is-device"
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000238
Justin Lebar21e5d4f2016-01-14 21:41:27 +0000239// INCLUDES-DEVICE:fatbinary
240// INCLUDES-DEVICE-DAG: "--create" "[[FATBINARY:[^"]*]]"
241// INCLUDES-DEVICE-DAG: "--image=profile=sm_{{[0-9]+}},file=[[CUBINFILE]]"
242// INCLUDES-DEVICE-DAG: "--image=profile=compute_{{[0-9]+}},file=[[PTXFILE]]"
Jonas Hahnfelde7681322018-02-28 17:53:46 +0000243// INCLUDES-DEVICE2-DAG: "--image=profile=sm_{{[0-9]+}},file=[[CUBINFILE2]]"
244// INCLUDES-DEVICE2-DAG: "--image=profile=compute_{{[0-9]+}},file=[[PTXFILE2]]"
Justin Lebar21e5d4f2016-01-14 21:41:27 +0000245
Justin Lebar388579f2016-01-13 01:24:35 +0000246// Match host-side preprocessor job with -save-temps.
Petr Hosek7b274542018-08-08 22:23:57 +0000247// HOST-SAVE: "-cc1" "-triple" "x86_64-unknown-linux-gnu"
Justin Lebar388579f2016-01-13 01:24:35 +0000248// HOST-SAVE-SAME: "-aux-triple" "nvptx64-nvidia-cuda"
Paul Robinson4abe94f2016-02-10 02:08:24 +0000249// HOST-SAVE-NOT: "-fcuda-is-device"
Justin Lebar388579f2016-01-13 01:24:35 +0000250// HOST-SAVE-SAME: "-x" "cuda"
Artem Belevichf8144ab2015-08-27 18:10:41 +0000251
Justin Lebar388579f2016-01-13 01:24:35 +0000252// Match host-side compilation.
Petr Hosek7b274542018-08-08 22:23:57 +0000253// HOST: "-cc1" "-triple" "x86_64-unknown-linux-gnu"
Justin Lebar388579f2016-01-13 01:24:35 +0000254// HOST-SAME: "-aux-triple" "nvptx64-nvidia-cuda"
Paul Robinson4abe94f2016-02-10 02:08:24 +0000255// HOST-NOT: "-fcuda-is-device"
Jonas Hahnfelde7681322018-02-28 17:53:46 +0000256// There is only one GPU binary after combining it with fatbinary!
257// INCLUDES-DEVICE2-NOT: "-fcuda-include-gpubinary"
Justin Lebar21e5d4f2016-01-14 21:41:27 +0000258// INCLUDES-DEVICE-SAME: "-fcuda-include-gpubinary" "[[FATBINARY]]"
Jonas Hahnfelde7681322018-02-28 17:53:46 +0000259// There is only one GPU binary after combining it with fatbinary.
260// INCLUDES-DEVICE2-NOT: "-fcuda-include-gpubinary"
Reid Kleckner549ed542019-05-23 18:35:43 +0000261// HOST-SAME: "-o" "[[HOSTOUTPUT:[^"]*]]"
262// HOST-NOSAVE-SAME: "-x" "cuda"
263// HOST-SAVE-SAME: "-x" "cuda-cpp-output"
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000264
Justin Lebar388579f2016-01-13 01:24:35 +0000265// Match external assembler that uses compilation output.
266// HOST-AS: "-o" "{{.*}}.o" "[[HOSTOUTPUT]]"
Artem Belevichf8144ab2015-08-27 18:10:41 +0000267
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000268// Match no GPU code inclusion.
Justin Lebar388579f2016-01-13 01:24:35 +0000269// NOINCLUDES-DEVICE-NOT: "-fcuda-include-gpubinary"
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000270
Justin Lebar388579f2016-01-13 01:24:35 +0000271// Match no host compilation.
272// NOHOST-NOT: "-cc1" "-triple"
Paul Robinson4abe94f2016-02-10 02:08:24 +0000273// NOHOST-NOT: "-x" "cuda"
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000274
Justin Lebar388579f2016-01-13 01:24:35 +0000275// Match linker.
276// LINK: "{{.*}}{{ld|link}}{{(.exe)?}}"
277// LINK-SAME: "[[HOSTOUTPUT]]"
Artem Belevich0ff05cd2015-07-13 23:27:56 +0000278
Justin Lebar388579f2016-01-13 01:24:35 +0000279// Match no linker.
280// NOLINK-NOT: "{{.*}}{{ld|link}}{{(.exe)?}}"
Artem Belevichdde3dc22018-04-10 18:38:22 +0000281
282// FATBIN-COMMON:fatbinary
283// FATBIN-COMMON: "--create" "[[FATBINARY:[^"]*]]"
284// FATBIN-COMMON: "--image=profile=sm_30,file=
285// PTX-SM30: "--image=profile=compute_30,file=
286// NOPTX-SM30-NOT: "--image=profile=compute_30,file=
287// FATBIN-COMMON: "--image=profile=sm_35,file=
288// PTX-SM35: "--image=profile=compute_35,file=
289// NOPTX-SM35-NOT: "--image=profile=compute_35,file=