brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · ccefedf Raw
81 lines · plain
1// REQUIRES: x86-registered-target2// REQUIRES: amdgpu-registered-target3// UNSUPPORTED: target={{.*}}-aix{{.*}}4 5// RUN: %clang -v --rocm-path=%S/Inputs/rocm 2>&1 \6// RUN:   | FileCheck -check-prefixes=FOUND %s7 8// RUN: env ROCM_PATH=%S/Inputs/rocm %clang -v 2>&1 \9// RUN:   | FileCheck -check-prefixes=FOUND %s10 11// RUN: %clang -v --rocm-path=%S/Inputs/rocm 2>&1 \12// RUN:   --target=amdgcn-amd-amdhsa \13// RUN:   | FileCheck -check-prefixes=FOUND %s14 15// RUN: %clang -v --hip-path=%S/Inputs/rocm 2>&1 \16// RUN:   | FileCheck -check-prefixes=FOUND %s17 18// RUN: env HIP_PATH=%S/Inputs/rocm %clang -v 2>&1 \19// RUN:   | FileCheck -check-prefixes=FOUND %s20 21// RUN: rm -rf %t/Inputs22// RUN: mkdir -p %t/Inputs23// RUN: cp -r %S/Inputs/rocm %t/Inputs24// RUN: mkdir -p %t/Inputs/rocm/share/hip25// RUN: mkdir -p %t/Inputs/rocm/hip26// RUN: mv %t/Inputs/rocm/bin/.hipVersion %t/Inputs/rocm/share/hip/version27// RUN: %clang -v --rocm-path=%t/Inputs/rocm 2>&1 \28// RUN:   | FileCheck -check-prefixes=FOUND %s29// RUN: %clang -v --hip-path=%t/Inputs/rocm 2>&1 \30// RUN:   | FileCheck -check-prefixes=FOUND %s31// RUN: %clang -v --hip-path=%t/Inputs/rocm/hip 2>&1 \32// RUN:   | FileCheck -check-prefixes=HIP-PATH %s33 34// FOUND: Found HIP installation: {{.*Inputs.*rocm}}, version 3.6.20214-a2917cd35// HIP-PATH: Found HIP installation: {{.*Inputs.*rocm.*hip}}, version 3.6.20214-a2917cd36 37// When --rocm-path is set and .hipVersion is not found, use default version38 39// RUN: %clang -v --rocm-path=%S 2>&1 \40// RUN:   | FileCheck -check-prefixes=DEFAULT %s41 42// When --hip-path is set and .hipVersion is not found, use default version43 44// RUN: %clang -v --hip-path=%S 2>&1 \45// RUN:   | FileCheck -check-prefixes=DEFAULT %s46 47// RUN: %clang -v --rocm-path=%S 2>&1 \48// RUN:   --target=amdgcn-amd-amdhsa \49// RUN:   | FileCheck -check-prefixes=DEFAULT %s50 51// DEFAULT: Found HIP installation: {{.*Driver}}, version 3.5.52 53// RUN: %clang -v --rocm-path=%S --hip-version=3.7.0 2>&1 \54// RUN:   | FileCheck -check-prefixes=SPECIFIED %s55 56// RUN: %clang -v --rocm-path=%S --hip-version=3.7.0 2>&1 \57// RUN:   --target=amdgcn-amd-amdhsa \58// RUN:   | FileCheck -check-prefixes=SPECIFIED %s59 60// SPECIFIED: Found HIP installation: {{.*Driver}}, version 3.7.061 62// RUN: %clang -v --rocm-path=%S --hip-version=3.7 2>&1 \63// RUN:   | FileCheck -check-prefixes=SPECIFIED2 %s64 65// SPECIFIED2: Found HIP installation: {{.*Driver}}, version 3.7.066 67// RUN: %clang -v --rocm-path=%S --hip-version=4.0.21025 2>&1 \68// RUN:   | FileCheck -check-prefixes=SPECIFIED3 %s69 70// SPECIFIED3: Found HIP installation: {{.*Driver}}, version 4.0.2102571 72// RUN: %clang -v --rocm-path=%S --hip-version=4 2>&1 \73// RUN:   | FileCheck -check-prefixes=SPECIFIED4 %s74 75// SPECIFIED4: Found HIP installation: {{.*Driver}}, version 4.0.076 77// RUN: not %clang -v --rocm-path=%S --hip-version=x.y 2>&1 \78// RUN:   | FileCheck -check-prefixes=INVALID %s79 80// INVALID: error: invalid value 'x.y' in '--hip-version=x.y'81