Skip to content

Commit 9155e51

Browse files
committed
[Driver][test] Add --cuda-path= to some tests
Their exit code is otherwise dependent on whether /usr/local/cuda exists.
1 parent e39bf32 commit 9155e51

13 files changed

+42
-42
lines changed

clang/test/Driver/clang_f_opts.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
// CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
6060

6161
//
62-
// RUN: not %clang -### -x cuda -nocudainc -nocudalib \
63-
// RUN: -c -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 \
62+
// RUN: %clang -### -x cuda -nocudainc -nocudalib \
63+
// RUN: -c -fprofile-sample-use=%S/Inputs/file.prof --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
6464
// RUN: | FileCheck -check-prefix=CHECK-CUDA-SAMPLE-PROFILE %s
6565
// -fprofile-sample-use should not be passed to the GPU compilation
6666
// CHECK-CUDA-SAMPLE-PROFILE: "-cc1"

clang/test/Driver/cuda-arch-translation.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// RUN: | FileCheck -check-prefixes=CUDA,SM61 %s
2929
// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_62 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
3030
// RUN: | FileCheck -check-prefixes=CUDA,SM62 %s
31-
// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_70 %s 2>&1 \
31+
// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_70 --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda %s 2>&1 \
3232
// RUN: | FileCheck -check-prefixes=CUDA,SM70 %s
3333
// RUN: %clang -x hip -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=gfx600 -nogpuinc -nogpulib %s 2>&1 \
3434
// RUN: | FileCheck -check-prefixes=HIP,GFX600 %s

clang/test/Driver/cuda-bad-arch.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// REQUIRES: nvptx-registered-target
44
// REQUIRES: amdgpu-registered-target
55

6-
// RUN: not %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=compute_20 -c %s 2>&1 \
6+
// RUN: not %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=compute_20 -c --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
77
// RUN: | FileCheck -check-prefix BAD %s
88
// RUN: not %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm20 -c %s 2>&1 \
99
// RUN: | FileCheck -check-prefix BAD %s
@@ -22,7 +22,7 @@
2222

2323
// RUN: not %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_20 -c %s 2>&1 \
2424
// RUN: | FileCheck -check-prefix OK %s
25-
// RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_52 -c %s 2>&1 \
25+
// RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_52 -c --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
2626
// RUN: | FileCheck -check-prefix OK %s
2727
// RUN: not %clang -### -x hip -target x86_64-linux-gnu --cuda-gpu-arch=gfx908 -c %s 2>&1 \
2828
// RUN: | FileCheck -check-prefix OK %s

clang/test/Driver/cuda-bindings.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@
190190
// Ensure we output the user's specified name in device-only mode.
191191
//
192192
// RUN: %clang -target powerpc64le-ibm-linux-gnu -### \
193-
// RUN: --cuda-gpu-arch=sm_52 --cuda-device-only -c -o foo.o %s 2>&1 \
193+
// RUN: --cuda-gpu-arch=sm_52 --cuda-device-only -c -o foo.o --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
194194
// RUN: | FileCheck -check-prefix=D_ONLY %s
195195
// RUN: %clang -target powerpc64le-ibm-linux-gnu -### --offload-new-driver \
196-
// RUN: --cuda-gpu-arch=sm_52 --cuda-device-only -c -o foo.o %s 2>&1 \
196+
// RUN: --cuda-gpu-arch=sm_52 --cuda-device-only -c -o foo.o --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
197197
// RUN: | FileCheck -check-prefix=D_ONLY %s
198198
// D_ONLY: "foo.o"
199199

@@ -219,7 +219,7 @@
219219
// driver.
220220
//
221221
// RUN: %clang -### -target powerpc64le-ibm-linux-gnu --offload-new-driver \
222-
// RUN: -fsyntax-only --offload-arch=sm_70 --offload-arch=sm_52 -c %s 2>&1 \
222+
// RUN: -fsyntax-only --offload-arch=sm_70 --offload-arch=sm_52 -c --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda %s 2>&1 \
223223
// RUN: | FileCheck -check-prefix=SYNTAX-ONLY %s
224224
// SYNTAX-ONLY: "-cc1" "-triple" "nvptx64-nvidia-cuda"{{.*}}"-fsyntax-only"
225225
// SYNTAX-ONLY: "-cc1" "-triple" "nvptx64-nvidia-cuda"{{.*}}"-fsyntax-only"
@@ -229,7 +229,7 @@
229229
// Check to ensure that we can use '-save-temps' when operating in RDC-mode.
230230
//
231231
// RUN: %clang -### -target powerpc64le-ibm-linux-gnu -save-temps --offload-new-driver \
232-
// RUN: -fgpu-rdc --offload-arch=sm_70 --offload-arch=sm_52 -c %s 2>&1 \
232+
// RUN: -fgpu-rdc --offload-arch=sm_70 --offload-arch=sm_52 -c --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda %s 2>&1 \
233233
// RUN: | FileCheck -check-prefix=SAVE-TEMPS %s
234234
// SAVE-TEMPS: "-cc1" "-triple" "nvptx64-nvidia-cuda"{{.*}}"-target-cpu" "sm_52"
235235
// SAVE-TEMPS: "-cc1" "-triple" "nvptx64-nvidia-cuda"{{.*}}"-target-cpu" "sm_70"

clang/test/Driver/cuda-flush-denormals-to-zero.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// -fgpu-flush-denormals-to-zero. This should be translated to
33
// -fdenormal-fp-math-f32=preserve-sign
44

5-
// RUN: not %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fgpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=FTZ %s
6-
// RUN: not %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fno-gpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s
5+
// RUN: %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fgpu-flush-denormals-to-zero -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 | FileCheck -check-prefix=FTZ %s
6+
// RUN: %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fno-gpu-flush-denormals-to-zero -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 | FileCheck -check-prefix=NOFTZ %s
77
// RUN: %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_70 -fgpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=FTZ %s
88
// RUN: %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_70 -fno-gpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s
99

1010
// Test alias options -f[no-]cuda-flush-denormals-to-zero
11-
// RUN: not %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fcuda-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=FTZ %s
12-
// RUN: not %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fno-cuda-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s
11+
// RUN: %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fcuda-flush-denormals-to-zero -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 | FileCheck -check-prefix=FTZ %s
12+
// RUN: %clang -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fno-cuda-flush-denormals-to-zero -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 | FileCheck -check-prefix=NOFTZ %s
1313

1414
// Test explicit argument, with CUDA offload kind
1515
// RUN: %clang -x hip -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=gfx803 -fgpu-flush-denormals-to-zero -nocudainc -nogpulib %s 2>&1 | FileCheck -check-prefix=FTZ %s

clang/test/Driver/cuda-openmp-driver.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
// BINDINGS-DEVICE: # "nvptx64-nvidia-cuda" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[PTX:.+]]"
2828
// BINDINGS-DEVICE: # "nvptx64-nvidia-cuda" - "NVPTX::Assembler", inputs: ["[[PTX]]"], output: "[[CUBIN:.+]]"
2929

30-
// RUN: %clang -### -target x86_64-linux-gnu -nocudalib --cuda-feature=+ptx61 --offload-arch=sm_70 %s 2>&1 | FileCheck -check-prefix MANUAL-FEATURE %s
30+
// RUN: %clang -### -target x86_64-linux-gnu -nocudalib --cuda-feature=+ptx61 --offload-arch=sm_70 --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda %s 2>&1 | FileCheck -check-prefix MANUAL-FEATURE %s
3131
// MANUAL-FEATURE: -cc1{{.*}}-target-feature{{.*}}+ptx61
3232

3333
// RUN: %clang -### -target x86_64-linux-gnu -nocudalib -ccc-print-bindings --offload-link %s 2>&1 \
3434
// RUN: | FileCheck -check-prefix DEVICE-LINK %s
3535

3636
// DEVICE-LINK: "x86_64-unknown-linux-gnu" - "Offload::Linker", inputs: ["[[INPUT:.+]]"], output: "a.out"
3737

38-
// RUN: not %clang -### -target x86_64-linux-gnu -nocudalib --offload-new-driver \
39-
// RUN: --offload-arch=sm_35 --offload-arch=sm_70 %s 2>&1 \
38+
// RUN: %clang -### -target x86_64-linux-gnu -nocudalib --offload-new-driver \
39+
// RUN: --offload-arch=sm_35 --offload-arch=sm_70 --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda %s 2>&1 \
4040
// RUN: | FileCheck -check-prefix GPU-BINARY %s
4141

4242
// GPU-BINARY: fatbinary{{.*}}"--create" "{{.*}}.fatbin"

clang/test/Driver/cuda-options.cu

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@
44

55
// Simple compilation case. Compile device-side to PTX assembly and make sure
66
// we use it on the host side.
7-
// RUN: not %clang -### -target x86_64-linux-gnu -c %s 2>&1 \
7+
// RUN: %clang -### -target x86_64-linux-gnu -c --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
88
// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
99
// RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
1010
// RUN: -check-prefix NOLINK %s
1111

1212
// Typical compilation + link case.
13-
// RUN: not %clang -### -target x86_64-linux-gnu %s 2>&1 \
13+
// RUN: %clang -### -target x86_64-linux-gnu --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
1414
// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
1515
// RUN: -check-prefix HOST -check-prefix INCLUDES-DEVICE \
1616
// RUN: -check-prefix LINK %s
1717

1818
// Verify that --cuda-host-only disables device-side compilation, but doesn't
1919
// disable host-side compilation/linking.
20-
// RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only %s 2>&1 \
20+
// RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
2121
// RUN: | FileCheck -check-prefix NODEVICE -check-prefix HOST \
2222
// RUN: -check-prefix NOINCLUDES-DEVICE -check-prefix LINK %s
2323

2424
// Verify that --cuda-device-only disables host-side compilation and linking.
25-
// RUN: not %clang -### -target x86_64-linux-gnu --cuda-device-only %s 2>&1 \
25+
// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
2626
// RUN: | FileCheck -check-prefix DEVICE -check-prefix DEVICE-NOSAVE \
2727
// RUN: -check-prefix NOHOST -check-prefix NOLINK %s
2828

2929
// Check that the last of --cuda-compile-host-device, --cuda-host-only, and
3030
// --cuda-device-only wins.
3131

3232
// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only \
33-
// RUN: --cuda-host-only %s 2>&1 \
33+
// RUN: --cuda-host-only --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
3434
// RUN: | FileCheck -check-prefix NODEVICE -check-prefix HOST \
3535
// RUN: -check-prefix NOINCLUDES-DEVICE -check-prefix LINK %s
3636

3737
// RUN: %clang -### -target x86_64-linux-gnu --cuda-compile-host-device \
38-
// RUN: --cuda-host-only %s 2>&1 \
38+
// RUN: --cuda-host-only --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
3939
// RUN: | FileCheck -check-prefix NODEVICE -check-prefix HOST \
4040
// RUN: -check-prefix NOINCLUDES-DEVICE -check-prefix LINK %s
4141

@@ -132,7 +132,7 @@
132132
// RUN: --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_30 \
133133
// RUN: --no-cuda-gpu-arch=all \
134134
// RUN: --cuda-gpu-arch=sm_50 \
135-
// RUN: -c %s 2>&1 \
135+
// RUN: -c --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \
136136
// RUN: | FileCheck -check-prefixes NOARCH-SM30,NOARCH-SM35,ARCH-SM50 %s
137137

138138
// g) There's no --cuda-gpu-arch=all

clang/test/Driver/cuda-output-asm.cu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
// REQUIRES: x86-registered-target
44
// REQUIRES: nvptx-registered-target
55

6-
// RUN: not %clang -### -S -target x86_64-linux-gnu --cuda-gpu-arch=sm_20 %s 2>&1 \
6+
// RUN: %clang -### -S --target=x86_64-linux-gnu --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
77
// RUN: | FileCheck -check-prefix HOST -check-prefix SM20 %s
8-
// RUN: %clang -### -S -target x86_64-linux-gnu --cuda-host-only -o foo.s %s 2>&1 \
8+
// RUN: %clang -### -S --target=x86_64-linux-gnu --cuda-host-only -o foo.s --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
99
// RUN: | FileCheck -check-prefix HOST %s
10-
// RUN: not %clang -### -S -target x86_64-linux-gnu --cuda-gpu-arch=sm_20 \
11-
// RUN: --cuda-device-only -o foo.s %s 2>&1 \
10+
// RUN: %clang -### -S --target=x86_64-linux-gnu --cuda-gpu-arch=sm_20 \
11+
// RUN: --cuda-device-only -o foo.s --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
1212
// RUN: | FileCheck -check-prefix SM20 %s
13-
// RUN: not %clang -### -S -target x86_64-linux-gnu --cuda-gpu-arch=sm_20 \
14-
// RUN: --cuda-gpu-arch=sm_30 --cuda-device-only %s 2>&1 \
13+
// RUN: %clang -### -S --target=x86_64-linux-gnu --cuda-gpu-arch=sm_20 \
14+
// RUN: --cuda-gpu-arch=sm_30 --cuda-device-only --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
1515
// RUN: | FileCheck -check-prefix SM20 -check-prefix SM30 %s
1616

1717
// HOST-DAG: "-cc1" "-triple" "x86_64-unknown-linux-gnu"

clang/test/Driver/fbasic-block-sections.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// RUN: not %clang -### -target x86_64 -fbasic-block-sections=list %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s
1111
// RUN: %clang -### -target x86_64 -fbasic-block-sections=list= %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NULL-LIST %s
1212
// RUN: %clang -### -target x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s
13-
// RUN: not %clang -### -x cuda -nocudainc -nocudalib -target x86_64 -fbasic-block-sections=all %s -c 2>&1 \
13+
// RUN: %clang -### -x cuda -nocudainc -nocudalib --target=x86_64 -fbasic-block-sections=all --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s -c 2>&1 \
1414
// RUN: | FileCheck -check-prefix=CHECK-CUDA %s
1515

1616
//

clang/test/Driver/lto.cu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
// llvm-bc and llvm-ll outputs need to match regular suffixes
3131
// (unfortunately).
32-
// RUN: not %clangxx %s -nocudainc -nocudalib -flto -save-temps -### 2> %t
32+
// RUN: %clangxx %s -nocudainc -nocudalib -flto -save-temps --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda -### 2> %t
3333
// RUN: FileCheck -check-prefix=CHECK-COMPILELINK-SUFFIXES < %t %s
3434
//
3535
// CHECK-COMPILELINK-SUFFIXES: "-o" "[[CPP:.*lto-host.*\.cui]]" "-x" "cuda" "{{.*}}lto.cu"
@@ -63,11 +63,11 @@
6363
// NO-LLVMGOLD-NOT: "-plugin" "{{.*}}{{[/\\]}}LLVMgold.{{dll|dylib|so}}"
6464

6565
// -flto passes along an explicit debugger tuning argument.
66-
// RUN: not %clangxx -nocudainc -nocudalib \
67-
// RUN: --target=x86_64-unknown-linux -### %s -flto -glldb 2> %t
66+
// RUN: %clangxx -nocudainc -nocudalib \
67+
// RUN: --target=x86_64-unknown-linux -### %s -flto -glldb --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda 2> %t
6868
// RUN: FileCheck -check-prefix=CHECK-TUNING-LLDB < %t %s
69-
// RUN: not %clangxx -nocudainc -nocudalib \
70-
// RUN: --target=x86_64-unknown-linux -### %s -flto -g 2> %t
69+
// RUN: %clangxx -nocudainc -nocudalib \
70+
// RUN: --target=x86_64-unknown-linux -### %s -flto -g --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda 2> %t
7171
// RUN: FileCheck -check-prefix=CHECK-NO-TUNING < %t %s
7272
//
7373
// CHECK-TUNING-LLDB: "-plugin-opt=-debugger-tune=lldb"

clang/test/Driver/nvptx-cuda-system-arch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
// EMPTY-OUTPUT: error: cannot determine nvptx64 architecture: No NVIDIA GPU detected in the system; consider passing it via '--offload-arch'
2727

2828
// case when nvptx-arch does not return anything with successful execution
29-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_sm_70 -x cuda %s 2>&1 \
29+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_sm_70 -x cuda --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda %s 2>&1 \
3030
// RUN: | FileCheck %s --check-prefix=ARCH-sm_70
31-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --offload-new-driver --nvptx-arch-tool=%t/nvptx_arch_sm_70 -x cuda %s 2>&1 \
31+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --offload-new-driver --nvptx-arch-tool=%t/nvptx_arch_sm_70 -x cuda --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda %s 2>&1 \
3232
// RUN: | FileCheck %s --check-prefix=ARCH-sm_70
3333
// ARCH-sm_70: "-cc1" "-triple" "nvptx64-nvidia-cuda"{{.*}}"-target-cpu" "sm_70"

clang/test/Driver/openmp-offload-gpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@
231231
// TRIPLE: "-target-cpu" "sm_35"
232232

233233
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
234-
// RUN: -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_52 \
234+
// RUN: -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_52 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \
235235
// RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc %s 2>&1 \
236236
// RUN: | FileCheck %s
237237
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
238-
// RUN: --offload-arch=sm_52 \
238+
// RUN: --offload-arch=sm_52 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \
239239
// RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc %s 2>&1 \
240240
// RUN: | FileCheck %s
241241

@@ -336,7 +336,7 @@
336336
// RUN: --offload-device-only -E -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-DEVICE-ONLY-PP
337337
// CHECK-DEVICE-ONLY-PP: "nvptx64-nvidia-cuda" - "clang", inputs: ["[[INPUT:.*]]"], output: "-"
338338

339-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp --offload-arch=sm_52 \
339+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp --offload-arch=sm_52 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \
340340
// RUN: -foffload-lto %s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBRARY %s
341341

342342
// CHECK-LTO-LIBRARY: {{.*}}-lomptarget{{.*}}-lomptarget.devicertl

clang/test/Driver/opt-record.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// RUN: %clang -### -c -fsave-optimization-record %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O
77
// RUN: %clang -### -save-temps -c -fsave-optimization-record %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O
88
// RUN: %clang -### -fsave-optimization-record %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O
9-
// RUN: %clang -### -S -fsave-optimization-record -x cuda -nocudainc -nocudalib %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
10-
// RUN: not %clang -### -fsave-optimization-record -x cuda -nocudainc -nocudalib %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
9+
// RUN: %clang -### -S -fsave-optimization-record -x cuda -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
10+
// RUN: %clang -### -fsave-optimization-record -x cuda -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
1111
// RUN: %clang -### -S -o FOO -fsave-optimization-record -foptimization-record-file=BAR.txt %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ
1212
// RUN: %clang -### -S -o FOO -foptimization-record-file=BAR.txt %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ
1313
// RUN: %clang -### -S -o FOO -foptimization-record-file=BAR.txt -fno-save-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-FOPT-DISABLE

0 commit comments

Comments
 (0)