2020-05-05 11:22:06 +08:00
|
|
|
// REQUIRES: clang-driver
|
|
|
|
// REQUIRES: x86-registered-target
|
|
|
|
// REQUIRES: amdgpu-registered-target
|
|
|
|
|
|
|
|
// RUN: %clang -### -target x86_64-linux-gnu \
|
|
|
|
// RUN: -x hip \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: --offload-arch=gfx908:xnack+:sramecc+ \
|
|
|
|
// RUN: --offload-arch=gfx908:xnack+:sramecc- \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
// RUN: %clang -### -target x86_64-linux-gnu \
|
|
|
|
// RUN: -x hip \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: --offload-arch=gfx908:xnack+:sramecc+ \
|
|
|
|
// RUN: --offload-arch=gfx908:xnack+:sramecc- \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: -save-temps \
|
|
|
|
// RUN: %s 2>&1 | FileCheck --check-prefixes=CHECK,TMP %s
|
|
|
|
|
|
|
|
// RUN: %clang -### -target x86_64-linux-gnu \
|
|
|
|
// RUN: -x hip \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: --offload-arch=gfx908:xnack+:sramecc+ \
|
|
|
|
// RUN: --offload-arch=gfx908:xnack+:sramecc- \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: -fgpu-rdc \
|
|
|
|
// RUN: %s 2>&1 | FileCheck --check-prefixes=CHECK %s
|
|
|
|
|
2021-04-24 06:52:49 +08:00
|
|
|
// CHECK: [[CLANG:"[^"]*clang[^"]*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
|
2020-05-05 11:22:06 +08:00
|
|
|
// CHECK-SAME: "-target-cpu" "gfx908"
|
2020-12-08 06:31:28 +08:00
|
|
|
// CHECK-SAME: "-target-feature" "+sramecc"
|
2020-05-05 11:22:06 +08:00
|
|
|
// CHECK-SAME: "-target-feature" "+xnack"
|
|
|
|
|
2021-04-24 06:52:49 +08:00
|
|
|
// TMP: [[CLANG:"[^"]*clang[^"]*"]] "-cc1as" "-triple" "amdgcn-amd-amdhsa"
|
2020-05-05 11:22:06 +08:00
|
|
|
// TMP-SAME: "-target-cpu" "gfx908"
|
2020-12-08 06:31:28 +08:00
|
|
|
// TMP-SAME: "-target-feature" "+sramecc"
|
2020-05-05 11:22:06 +08:00
|
|
|
// TMP-SAME: "-target-feature" "+xnack"
|
|
|
|
|
2020-08-19 12:21:54 +08:00
|
|
|
// CHECK: [[LLD:"[^"]*lld[^"]*"]] {{.*}} "-plugin-opt=mcpu=gfx908"
|
2020-12-08 06:31:28 +08:00
|
|
|
// CHECK-SAME: "-plugin-opt=-mattr=+sramecc,+xnack"
|
2020-05-05 11:22:06 +08:00
|
|
|
|
2021-04-24 06:52:49 +08:00
|
|
|
// CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
|
2020-05-05 11:22:06 +08:00
|
|
|
// CHECK-SAME: "-target-cpu" "gfx908"
|
2020-12-08 06:31:28 +08:00
|
|
|
// CHECK-SAME: "-target-feature" "-sramecc"
|
2020-05-05 11:22:06 +08:00
|
|
|
// CHECK-SAME: "-target-feature" "+xnack"
|
|
|
|
|
2020-08-19 12:21:54 +08:00
|
|
|
// CHECK: [[LLD]] {{.*}} "-plugin-opt=mcpu=gfx908"
|
2020-12-08 06:31:28 +08:00
|
|
|
// CHECK-SAME: "-plugin-opt=-mattr=-sramecc,+xnack"
|
2020-05-05 11:22:06 +08:00
|
|
|
|
|
|
|
// CHECK: {{"[^"]*clang-offload-bundler[^"]*"}}
|
2020-10-28 02:10:02 +08:00
|
|
|
// CHECK-SAME: "-targets=host-x86_64-unknown-linux,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc+:xnack+,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc-:xnack+"
|
2020-05-05 11:22:06 +08:00
|
|
|
|
|
|
|
// Check canonicalization and repeating of target ID.
|
|
|
|
|
|
|
|
// RUN: %clang -### -target x86_64-linux-gnu \
|
|
|
|
// RUN: -x hip \
|
|
|
|
// RUN: --offload-arch=fiji \
|
|
|
|
// RUN: --offload-arch=gfx803 \
|
|
|
|
// RUN: --offload-arch=fiji \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=FIJI %s
|
2020-10-28 02:10:02 +08:00
|
|
|
// FIJI: "-targets=host-x86_64-unknown-linux,hipv4-amdgcn-amd-amdhsa--gfx803"
|
2020-05-05 11:22:06 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -target x86_64-linux-gnu \
|
|
|
|
// RUN: -x hip \
|
|
|
|
// RUN: --offload-arch=gfx900:xnack- \
|
|
|
|
// RUN: --offload-arch=gfx900:xnack+ \
|
2020-12-08 06:31:28 +08:00
|
|
|
// RUN: --offload-arch=gfx908:sramecc+ \
|
|
|
|
// RUN: --offload-arch=gfx908:sramecc- \
|
2020-05-05 11:22:06 +08:00
|
|
|
// RUN: --offload-arch=gfx906 \
|
|
|
|
// RUN: --rocm-path=%S/Inputs/rocm \
|
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=MULTI %s
|
2020-10-28 02:10:02 +08:00
|
|
|
// MULTI: "-targets=host-x86_64-unknown-linux,hipv4-amdgcn-amd-amdhsa--gfx900:xnack+,hipv4-amdgcn-amd-amdhsa--gfx900:xnack-,hipv4-amdgcn-amd-amdhsa--gfx906,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc+,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc-"
|