brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 3f0bdd3 Raw
42 lines · plain
1// Checks errors generated by passing a bad value for --cuda-gpu-arch.2 3// 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 \4// RUN: | FileCheck -check-prefix BAD %s5// RUN: not %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=sm20 -c %s 2>&1 \6// RUN: | FileCheck -check-prefix BAD %s7// RUN: not %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=sm_19 -c %s 2>&1 \8// RUN: | FileCheck -check-prefix BAD %s9// RUN: not %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=gfx900 -c %s 2>&1 \10// RUN: | FileCheck -check-prefix BAD %s11 12// BAD: error: unsupported CUDA gpu architecture13 14// RUN: not %clang -### -v --target=x86_64-linux-gnu --cuda-gpu-arch=sm_21 \15// RUN:   --cuda-path=%S/Inputs/CUDA_90/usr/local/cuda %s 2>&1 \16// RUN: | FileCheck -check-prefix BAD_CUDA9 %s17 18// BAD_CUDA9: GPU arch sm_21 is supported by CUDA versions between 7.0 and 8.019 20// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -nogpuinc --cuda-gpu-arch=sm_52 -c --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \21// RUN: | FileCheck -check-prefix OK %s22// RUN: %clang -### -x hip --target=x86_64-linux-gnu -nogpulib -nogpuinc --cuda-gpu-arch=gfx908 -c %s 2>&1 \23// RUN: | FileCheck -check-prefix OK %s24// RUN: %clang -### -x hip --target=x86_64-linux-gnu -nogpulib -nogpuinc --cuda-gpu-arch=gfx90a -c %s 2>&1 \25// RUN: | FileCheck -check-prefix OK %s26// RUN: %clang -### -x hip --target=x86_64-linux-gnu -nogpulib -nogpuinc --cuda-gpu-arch=gfx942 -c %s 2>&1 \27// RUN: | FileCheck -check-prefix OK %s28// RUN: %clang -### -x hip --target=x86_64-linux-gnu -nogpulib -nogpuinc --cuda-gpu-arch=gfx1250 -c %s 2>&1 \29// RUN: | FileCheck -check-prefix OK %s30// RUN: %clang -### -x hip --target=x86_64-linux-gnu -nogpulib -nogpuinc --cuda-gpu-arch=gfx1251 -c %s 2>&1 \31// RUN: | FileCheck -check-prefix OK %s32 33// We don't allow using NVPTX/AMDGCN for host compilation.34// RUN: not %clang -### --no-offload-new-driver --cuda-host-only --target=nvptx-nvidia-cuda -nogpulib -nogpuinc -c %s 2>&1 \35// RUN: | FileCheck -check-prefix HOST_NVPTX %s36// RUN: not %clang -### --no-offload-new-driver --cuda-host-only --target=amdgcn-amd-amdhsa -nogpulib -nogpuinc -c %s 2>&1 \37// RUN: | FileCheck -check-prefix HOST_AMDGCN %s38 39// OK-NOT: error: Unsupported CUDA gpu architecture40// HOST_NVPTX: error: unsupported architecture 'nvptx' for host compilation41// HOST_AMDGCN: error: unsupported architecture 'amdgcn' for host compilation42