Home | History | Annotate | Download | only in Driver
      1 // Tests that "sm_XX" gets correctly converted to "compute_YY" when we invoke
      2 // fatbinary.
      3 //
      4 // REQUIRES: clang-driver
      5 // REQUIRES: x86-registered-target
      6 // REQUIRES: nvptx-registered-target
      7 
      8 // CHECK:fatbinary
      9 
     10 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 %s 2>&1 \
     11 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 %s
     12 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_21 %s 2>&1 \
     13 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM21 %s
     14 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_30 %s 2>&1 \
     15 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM30 %s
     16 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_32 %s 2>&1 \
     17 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM32 %s
     18 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_35 %s 2>&1 \
     19 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM35 %s
     20 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_37 %s 2>&1 \
     21 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM37 %s
     22 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_50 %s 2>&1 \
     23 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM50 %s
     24 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_52 %s 2>&1 \
     25 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM52 %s
     26 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_53 %s 2>&1 \
     27 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM53 %s
     28 
     29 // SM20:--image=profile=sm_20{{.*}}--image=profile=compute_20
     30 // SM21:--image=profile=sm_21{{.*}}--image=profile=compute_20
     31 // SM30:--image=profile=sm_30{{.*}}--image=profile=compute_30
     32 // SM32:--image=profile=sm_32{{.*}}--image=profile=compute_32
     33 // SM35:--image=profile=sm_35{{.*}}--image=profile=compute_35
     34 // SM37:--image=profile=sm_37{{.*}}--image=profile=compute_37
     35 // SM50:--image=profile=sm_50{{.*}}--image=profile=compute_50
     36 // SM52:--image=profile=sm_52{{.*}}--image=profile=compute_52
     37 // SM53:--image=profile=sm_53{{.*}}--image=profile=compute_53
     38