• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Checks errors generated by passing a bad value for --cuda-gpu-arch.
2 // REQUIRES: clang-driver
3 // REQUIRES: x86-registered-target
4 // REQUIRES: nvptx-registered-target
5 
6 // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=compute_20 -c %s 2>&1 \
7 // RUN: | FileCheck -check-prefix BAD %s
8 // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm20 -c %s 2>&1 \
9 // RUN: | FileCheck -check-prefix BAD %s
10 // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_19 -c %s 2>&1 \
11 // RUN: | FileCheck -check-prefix BAD %s
12 
13 // BAD: error: Unsupported CUDA gpu architecture
14 
15 // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_20 -c %s 2>&1 \
16 // RUN: | FileCheck -check-prefix OK %s
17 // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_52 -c %s 2>&1 \
18 // RUN: | FileCheck -check-prefix OK %s
19 // RUN: %clang -### -target x86_64-linux-gnu -c %s 2>&1 \
20 // RUN: | FileCheck -check-prefix OK %s
21 
22 // OK-NOT: error: Unsupported CUDA gpu architecture
23