• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// REQUIRES: clang-driver
2// REQUIRES: x86-registered-target
3// REQUIRES: amdgpu-registered-target
4
5// RUN: %clang -v --rocm-path=%S/Inputs/rocm 2>&1 \
6// RUN:   | FileCheck -check-prefixes=FOUND %s
7
8// RUN: %clang -v --rocm-path=%S/Inputs/rocm 2>&1 \
9// RUN:   -target amdgcn-amd-amdhsa \
10// RUN:   | FileCheck -check-prefixes=FOUND %s
11
12// FOUND: Found HIP installation: {{.*Inputs.*rocm}}, version 3.6.20214-a2917cd
13
14// When --rocm-path is set and .hipVersion is not found, use default version
15
16// RUN: %clang -v --rocm-path=%S 2>&1 \
17// RUN:   | FileCheck -check-prefixes=DEFAULT %s
18
19// RUN: %clang -v --rocm-path=%S 2>&1 \
20// RUN:   -target amdgcn-amd-amdhsa \
21// RUN:   | FileCheck -check-prefixes=DEFAULT %s
22
23// DEFAULT: Found HIP installation: {{.*Driver}}, version 3.5.
24
25// RUN: %clang -v --rocm-path=%S --hip-version=3.7.0 2>&1 \
26// RUN:   | FileCheck -check-prefixes=SPECIFIED %s
27
28// RUN: %clang -v --rocm-path=%S --hip-version=3.7.0 2>&1 \
29// RUN:   -target amdgcn-amd-amdhsa \
30// RUN:   | FileCheck -check-prefixes=SPECIFIED %s
31
32// SPECIFIED: Found HIP installation: {{.*Driver}}, version 3.7.0
33
34// RUN: %clang -v --rocm-path=%S --hip-version=3.7 2>&1 \
35// RUN:   | FileCheck -check-prefixes=SPECIFIED2 %s
36
37// SPECIFIED2: Found HIP installation: {{.*Driver}}, version 3.7.0
38
39// RUN: not %clang -v --rocm-path=%S --hip-version=x.y 2>&1 \
40// RUN:   | FileCheck -check-prefixes=INVALID %s
41
42// INVALID: error: invalid value 'x.y' in '--hip-version=x.y'
43