Debian Codegraph @

clang/test/Driver/hip-invalid-target-id.hip

raw
1 // RUN: not %clang -### --target=x86_64-linux-gnu \
2 // RUN: -x hip --offload-arch=gfx908 \
3 // RUN: --offload-arch=gfx908xnack \
4 // RUN: --rocm-path=%S/Inputs/rocm \
5 // RUN: %s 2>&1 | FileCheck -check-prefix=NOPLUS %s
6
7 // NOPLUS: error: unsupported HIP gpu architecture: gfx908xnack
8
9 // RUN: not %clang -### --target=x86_64-linux-gnu \
10 // RUN: -x hip --offload-arch=gfx900 \
11 // RUN: --offload-arch=gfx908:xnack+:xnack+ \
12 // RUN: --rocm-path=%S/Inputs/rocm \
13 // RUN: %s 2>&1 | FileCheck -check-prefix=ORDER %s
14
15 // ORDER: error: invalid target ID 'gfx908:xnack+:xnack+'
16
17 // RUN: not %clang -### --target=x86_64-linux-gnu \
18 // RUN: -x hip --offload-arch=gfx908 \
19 // RUN: --offload-arch=gfx908:unknown+ \
20 // RUN: --offload-arch=gfx908+sramecc+unknown \
21 // RUN: --offload-arch=gfx900+xnack \
22 // RUN: --rocm-path=%S/Inputs/rocm \
23 // RUN: %s 2>&1 | FileCheck -check-prefix=UNK %s
24
25 // UNK: error: unsupported HIP gpu architecture: gfx900+xnack
26
27 // RUN: not %clang -### --target=x86_64-linux-gnu \
28 // RUN: -x hip --offload-arch=gfx908 \
29 // RUN: --offload-arch=gfx908:sramecc+:unknown+ \
30 // RUN: --offload-arch=gfx900+xnack \
31 // RUN: --rocm-path=%S/Inputs/rocm \
32 // RUN: %s 2>&1 | FileCheck -check-prefix=MIXED %s
33
34 // MIXED: error: unsupported HIP gpu architecture: gfx900+xnack
35
36 // RUN: not %clang -### --target=x86_64-linux-gnu \
37 // RUN: -x hip --offload-arch=gfx908 \
38 // RUN: --offload-arch=gfx900:sramecc+ \
39 // RUN: --rocm-path=%S/Inputs/rocm \
40 // RUN: %s 2>&1 | FileCheck -check-prefix=UNSUP %s
41
42 // UNSUP: error: invalid target ID 'gfx900:sramecc+'
43
44 / RUN: not %clang -### --target=x86_64-linux-gnu \
45 // RUN: -x hip --offload-arch=gfx908 \
46 // RUN: --offload-arch=gfx900:xnack \
47 // RUN: --rocm-path=%S/Inputs/rocm \
48 // RUN: %s 2>&1 | FileCheck -check-prefix=NOSIGN %s
49
50 // NOSIGN: error: invalid target ID 'gfx900:xnack'
51
52 // RUN: not %clang -### --target=x86_64-linux-gnu \
53 // RUN: -x hip --offload-arch=gfx908 \
54 // RUN: --offload-arch=gfx900+xnack \
55 // RUN: --rocm-path=%S/Inputs/rocm \
56 // RUN: %s 2>&1 | FileCheck -check-prefix=NOCOLON %s
57
58 // NOCOLON: error: unsupported HIP gpu architecture: gfx900+xnack
59
60 // RUN: not %clang -### --target=x86_64-linux-gnu \
61 // RUN: -x hip --offload-arch=gfx908 \
62 // RUN: --offload-arch=gfx908:xnack+ \
63 // RUN: --rocm-path=%S/Inputs/rocm \
64 // RUN: %s 2>&1 | FileCheck -check-prefix=COMBO %s
65
66 // COMBO: error: invalid offload arch combinations: 'gfx908' and 'gfx908:xnack+'