2020-05-05 11:22:06 +08:00
|
|
|
// REQUIRES: clang-driver
|
|
|
|
// REQUIRES: x86-registered-target
|
|
|
|
// REQUIRES: amdgpu-registered-target
|
|
|
|
|
2020-09-27 11:29:57 +08:00
|
|
|
// RUN: not %clang -### -target x86_64-linux-gnu \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: -x hip --offload-arch=gfx908 \
|
|
|
|
// RUN: --offload-arch=gfx908xnack \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=NOPLUS %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// NOPLUS: error: invalid target ID 'gfx908xnack'
|
2020-05-05 11:22:06 +08:00
|
|
|
|
2020-09-27 11:29:57 +08:00
|
|
|
// RUN: not %clang -### -target x86_64-linux-gnu \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: -x hip --offload-arch=gfx900 \
|
|
|
|
// RUN: --offload-arch=gfx908:xnack+:xnack+ \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=ORDER %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// ORDER: error: invalid target ID 'gfx908:xnack+:xnack+'
|
2020-05-05 11:22:06 +08:00
|
|
|
|
2020-09-27 11:29:57 +08:00
|
|
|
// RUN: not %clang -### -target x86_64-linux-gnu \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: -x hip --offload-arch=gfx908 \
|
|
|
|
// RUN: --offload-arch=gfx908:unknown+ \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: --offload-arch=gfx908+sramecc+unknown \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: --offload-arch=gfx900+xnack \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=UNK %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// UNK: error: invalid target ID 'gfx908:unknown+'
|
2020-05-05 11:22:06 +08:00
|
|
|
|
2020-09-27 11:29:57 +08:00
|
|
|
// RUN: not %clang -### -target x86_64-linux-gnu \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: -x hip --offload-arch=gfx908 \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: --offload-arch=gfx908:sramecc+:unknown+ \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: --offload-arch=gfx900+xnack \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=MIXED %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// MIXED: error: invalid target ID 'gfx908:sramecc+:unknown+'
|
2020-05-05 11:22:06 +08:00
|
|
|
|
2020-09-27 11:29:57 +08:00
|
|
|
// RUN: not %clang -### -target x86_64-linux-gnu \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: -x hip --offload-arch=gfx908 \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: --offload-arch=gfx900:sramecc+ \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=UNSUP %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// UNSUP: error: invalid target ID 'gfx900:sramecc+'
|
2020-05-05 11:22:06 +08:00
|
|
|
|
2020-09-27 11:29:57 +08:00
|
|
|
/ RUN: not %clang -### -target x86_64-linux-gnu \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: -x hip --offload-arch=gfx908 \
|
|
|
|
// RUN: --offload-arch=gfx900:xnack \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=NOSIGN %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// NOSIGN: error: invalid target ID 'gfx900:xnack'
|
2020-05-05 11:22:06 +08:00
|
|
|
|
2020-09-27 11:29:57 +08:00
|
|
|
// RUN: not %clang -### -target x86_64-linux-gnu \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: -x hip --offload-arch=gfx908 \
|
|
|
|
// RUN: --offload-arch=gfx900+xnack \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=NOCOLON %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// NOCOLON: error: invalid target ID 'gfx900+xnack'
|
2020-05-05 11:22:06 +08:00
|
|
|
|
|
|
|
// RUN: not %clang -### -target x86_64-linux-gnu \
|
|
|
|
// RUN: -x hip --offload-arch=gfx908 \
|
|
|
|
// RUN: --offload-arch=gfx908:xnack+ \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=COMBO %s
|
|
|
|
|
2021-08-05 19:04:03 +08:00
|
|
|
// COMBO: error: invalid offload arch combinations: 'gfx908' and 'gfx908:xnack+'
|