• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:prefix

2 // REQUIRES: clang-driver
3 // REQUIRES: x86-registered-target
4 // REQUIRES: nvptx-registered-target
6 // Simple compilation case. Compile device-side to PTX assembly and make sure
8 // RUN: %clang -### -target x86_64-linux-gnu -c %s 2>&1 \
9 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
10 // RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
11 // RUN: -check-prefix NOLINK %s
14 // RUN: %clang -### -target x86_64-linux-gnu %s 2>&1 \
15 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
16 // RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
17 // RUN: -check-prefix LINK %s
19 // Verify that --cuda-host-only disables device-side compilation, but doesn't
20 // disable host-side compilation/linking.
21 // RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only %s 2>&1 \
22 // RUN: | FileCheck -check-prefix NODEVICE -check-prefix HOST \
23 // RUN: -check-prefix NOINCLUDES-DEVICE -check-prefix LINK %s
25 // Verify that --cuda-device-only disables host-side compilation and linking.
26 // RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only %s 2>&1 \
27 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
28 // RUN: -check-prefix NOHOST -check-prefix NOLINK %s
30 // Check that the last of --cuda-compile-host-device, --cuda-host-only, and
31 // --cuda-device-only wins.
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
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
43 // RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only \
44 // RUN: --cuda-device-only %s 2>&1 \
45 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
46 // RUN: -check-prefix NOHOST -check-prefix NOLINK %s
48 // 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
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
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
65 // Verify that --cuda-gpu-arch option passes the correct GPU archtecture to
67 // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_35 -c %s 2>&1 \
68 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
69 // RUN: -check-prefix DEVICE-SM35 -check-prefix HOST \
70 // RUN: -check-prefix INCLUDES-DEVICE -check-prefix NOLINK %s
72 // Verify that there is one device-side compilation per --cuda-gpu-arch args
74 // RUN: %clang -### -target x86_64-linux-gnu \
75 // RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 -c %s 2>&1 \
76 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
77 // RUN: -check-prefix DEVICE2 -check-prefix DEVICE-SM35 \
78 // RUN: -check-prefix DEVICE2-SM30 -check-prefix HOST \
79 // RUN: -check-prefix HOST-NOSAVE -check-prefix INCLUDES-DEVICE \
80 // RUN: -check-prefix NOLINK %s
82 // Verify that device-side results are passed to the correct tool when
83 // -save-temps is used.
84 // RUN: %clang -### -target x86_64-linux-gnu -save-temps -c %s 2>&1 \
85 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-SAVE \
86 // RUN: -check-prefix HOST -check-prefix HOST-SAVE -check-prefix NOLINK %s
88 // Verify that device-side results are passed to the correct tool when
89 // -fno-integrated-as is used.
90 // RUN: %clang -### -target x86_64-linux-gnu -fno-integrated-as -c %s 2>&1 \
91 // RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
92 // RUN: -check-prefix HOST -check-prefix HOST-NOSAVE \
93 // RUN: -check-prefix HOST-AS -check-prefix NOLINK %s
95 // Match device-side preprocessor and compiler phases with -save-temps.
96 // DEVICE-SAVE: "-cc1" "-triple" "nvptx64-nvidia-cuda"
97 // DEVICE-SAVE-SAME: "-aux-triple" "x86_64--linux-gnu"
98 // DEVICE-SAVE-SAME: "-fcuda-is-device"
99 // DEVICE-SAVE-SAME: "-x" "cuda"
101 // DEVICE-SAVE: "-cc1" "-triple" "nvptx64-nvidia-cuda"
102 // DEVICE-SAVE-SAME: "-aux-triple" "x86_64--linux-gnu"
103 // DEVICE-SAVE-SAME: "-fcuda-is-device"
104 // DEVICE-SAVE-SAME: "-x" "cuda-cpp-output"
107 // DEVICE: "-cc1" "-triple" "nvptx64-nvidia-cuda"
108 // DEVICE-NOSAVE-SAME: "-aux-triple" "x86_64--linux-gnu"
109 // DEVICE-SAME: "-fcuda-is-device"
110 // DEVICE-SM35-SAME: "-target-cpu" "sm_35"
111 // DEVICE-SAME: "-o" "[[PTXFILE:[^"]*]]"
112 // DEVICE-NOSAVE-SAME: "-x" "cuda"
113 // DEVICE-SAVE-SAME: "-x" "ir"
117 // DEVICE-SM35-DAG: "--gpu-name" "sm_35"
118 // DEVICE-DAG: "--output-file" "[[CUBINFILE:[^"]*]]"
119 // DEVICE-DAG: "[[PTXFILE]]"
121 // Match another device-side compilation.
122 // DEVICE2: "-cc1" "-triple" "nvptx64-nvidia-cuda"
123 // DEVICE2-SAME: "-aux-triple" "x86_64--linux-gnu"
124 // DEVICE2-SAME: "-fcuda-is-device"
125 // DEVICE2-SM30-SAME: "-target-cpu" "sm_30"
126 // DEVICE2-SAME: "-o" "[[GPUBINARY2:[^"]*]]"
127 // DEVICE2-SAME: "-x" "cuda"
129 // Match no device-side compilation.
130 // NODEVICE-NOT: "-cc1" "-triple" "nvptx64-nvidia-cuda"
131 // NODEVICE-NOT: "-fcuda-is-device"
133 // INCLUDES-DEVICE:fatbinary
134 // INCLUDES-DEVICE-DAG: "--create" "[[FATBINARY:[^"]*]]"
135 // INCLUDES-DEVICE-DAG: "--image=profile=sm_{{[0-9]+}},file=[[CUBINFILE]]"
136 // INCLUDES-DEVICE-DAG: "--image=profile=compute_{{[0-9]+}},file=[[PTXFILE]]"
138 // Match host-side preprocessor job with -save-temps.
139 // HOST-SAVE: "-cc1" "-triple" "x86_64--linux-gnu"
140 // HOST-SAVE-SAME: "-aux-triple" "nvptx64-nvidia-cuda"
141 // HOST-SAVE-NOT: "-fcuda-is-device"
142 // HOST-SAVE-SAME: "-x" "cuda"
144 // Match host-side compilation.
145 // HOST: "-cc1" "-triple" "x86_64--linux-gnu"
146 // HOST-SAME: "-aux-triple" "nvptx64-nvidia-cuda"
147 // HOST-NOT: "-fcuda-is-device"
148 // HOST-SAME: "-o" "[[HOSTOUTPUT:[^"]*]]"
149 // HOST-NOSAVE-SAME: "-x" "cuda"
150 // HOST-SAVE-SAME: "-x" "cuda-cpp-output"
151 // INCLUDES-DEVICE-SAME: "-fcuda-include-gpubinary" "[[FATBINARY]]"
154 // HOST-AS: "-o" "{{.*}}.o" "[[HOSTOUTPUT]]"
157 // NOINCLUDES-DEVICE-NOT: "-fcuda-include-gpubinary"
160 // NOHOST-NOT: "-cc1" "-triple"
161 // NOHOST-NOT: "-x" "cuda"
165 // LINK-SAME: "[[HOSTOUTPUT]]"
168 // NOLINK-NOT: "{{.*}}{{ld|link}}{{(.exe)?}}"