forked from OSchip/llvm-project
[clang][AMDGPU] rename sram-ecc as sramecc
As backend renamed sram-ecc to sramecc, this patch makes corresponding change in clang. Differential Revision: https://reviews.llvm.org/D86217
This commit is contained in:
parent
195a7af0ab
commit
40ad476a32
|
@ -79,7 +79,7 @@ def err_drv_cuda_host_arch : Error<"unsupported architecture '%0' for host compi
|
|||
def err_drv_mix_cuda_hip : Error<"Mixed Cuda and HIP compilation is not supported.">;
|
||||
def err_drv_bad_target_id : Error<"Invalid target ID: %0 (A target ID is a processor name "
|
||||
"followed by an optional list of predefined features post-fixed by a plus or minus sign deliminated "
|
||||
"by colon, e.g. 'gfx908:sram-ecc+:xnack-')">;
|
||||
"by colon, e.g. 'gfx908:sramecc+:xnack-')">;
|
||||
def err_drv_bad_offload_arch_combo : Error<"Invalid offload arch combinations: %0 and %1 (For a specific "
|
||||
"processor, a feature should either exist in all offload archs, or not exist in any offload archs)">;
|
||||
def err_drv_invalid_thread_model_for_target : Error<
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace clang {
|
|||
/// Get all feature strings that can be used in target ID for \p Processor.
|
||||
/// Target ID is a processor name with optional feature strings
|
||||
/// postfixed by a plus or minus sign delimited by colons, e.g.
|
||||
/// gfx908:xnack+:sram-ecc-. Each processor have a limited
|
||||
/// gfx908:xnack+:sramecc-. Each processor have a limited
|
||||
/// number of predefined features when showing up in a target ID.
|
||||
const llvm::SmallVector<llvm::StringRef, 4>
|
||||
getAllPossibleTargetIDFeatures(const llvm::Triple &T,
|
||||
|
|
|
@ -666,7 +666,7 @@ def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXa
|
|||
def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>,
|
||||
HelpText<"CUDA offloading device architecture (e.g. sm_35), or HIP offloading target ID in the form of a "
|
||||
"device architecture followed by target ID features delimited by a colon. Each target ID feature "
|
||||
"is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sram-ecc-). May be "
|
||||
"is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sramecc-). May be "
|
||||
"specified more than once.">;
|
||||
def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>,
|
||||
Alias<offload_arch_EQ>;
|
||||
|
@ -2568,9 +2568,9 @@ def mcumode : Flag<["-"], "mcumode">, Group<m_amdgpu_Features_Group>,
|
|||
HelpText<"Specify CU (-mcumode) or WGP (-mno-cumode) wavefront execution mode (AMDGPU only)">;
|
||||
def mno_cumode : Flag<["-"], "mno-cumode">, Group<m_amdgpu_Features_Group>;
|
||||
|
||||
def msram_ecc : Flag<["-"], "msram-ecc">, Group<m_amdgpu_Features_Group>,
|
||||
def msramecc : Flag<["-"], "msramecc">, Group<m_amdgpu_Features_Group>,
|
||||
HelpText<"Specify SRAM ECC mode (AMDGPU only)">;
|
||||
def mno_sram_ecc : Flag<["-"], "mno-sram-ecc">, Group<m_amdgpu_Features_Group>;
|
||||
def mno_sramecc : Flag<["-"], "mno-sramecc">, Group<m_amdgpu_Features_Group>;
|
||||
|
||||
def mwavefrontsize64 : Flag<["-"], "mwavefrontsize64">, Group<m_Group>,
|
||||
HelpText<"Specify wavefront size 64 mode (AMDGPU only)">;
|
||||
|
|
|
@ -26,8 +26,8 @@ getAllPossibleAMDGPUTargetIDFeatures(const llvm::Triple &T,
|
|||
return Ret;
|
||||
auto Features = T.isAMDGCN() ? llvm::AMDGPU::getArchAttrAMDGCN(ProcKind)
|
||||
: llvm::AMDGPU::getArchAttrR600(ProcKind);
|
||||
if (Features & llvm::AMDGPU::FEATURE_SRAM_ECC)
|
||||
Ret.push_back("sram-ecc");
|
||||
if (Features & llvm::AMDGPU::FEATURE_SRAMECC)
|
||||
Ret.push_back("sramecc");
|
||||
if (Features & llvm::AMDGPU::FEATURE_XNACK)
|
||||
Ret.push_back("xnack");
|
||||
return Ret;
|
||||
|
@ -61,7 +61,7 @@ llvm::StringRef getProcessorFromTargetID(const llvm::Triple &T,
|
|||
//
|
||||
// A target ID is a processor name followed by a list of target features
|
||||
// delimited by colon. Each target feature is a string post-fixed by a plus
|
||||
// or minus sign, e.g. gfx908:sram-ecc+:xnack-.
|
||||
// or minus sign, e.g. gfx908:sramecc+:xnack-.
|
||||
static llvm::Optional<llvm::StringRef>
|
||||
parseTargetIDWithFormatCheckingOnly(llvm::StringRef TargetID,
|
||||
llvm::StringMap<bool> *FeatureMap) {
|
||||
|
|
|
@ -44,7 +44,7 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
|
|||
unsigned WavefrontSize;
|
||||
|
||||
/// Target ID is device name followed by optional feature name postfixed
|
||||
/// by plus or minus sign delimitted by colon, e.g. gfx908:xnack+:sram-ecc-.
|
||||
/// by plus or minus sign delimitted by colon, e.g. gfx908:xnack+:sramecc-.
|
||||
/// If the target ID contains feature+, map it to true.
|
||||
/// If the target ID contains feature-, map it to false.
|
||||
/// If the target ID does not contain a feature (default), do not map it.
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
// RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx900:xnack- %s 2>&1 | FileCheck --check-prefix=NO-XNACK %s
|
||||
// NO-XNACK: "-target-feature" "-xnack"
|
||||
|
||||
// RUN: %clang -### -target amdgcn-mesa3d -mcpu=gfx908:sram-ecc+ %s 2>&1 | FileCheck --check-prefix=SRAM-ECC %s
|
||||
// SRAM-ECC: "-target-feature" "+sram-ecc"
|
||||
// RUN: %clang -### -target amdgcn-mesa3d -mcpu=gfx908:sramecc+ %s 2>&1 | FileCheck --check-prefix=SRAM-ECC %s
|
||||
// SRAM-ECC: "-target-feature" "+sramecc"
|
||||
|
||||
// RUN: %clang -### -target amdgcn-amdhsa -mcpu=gfx908:sram-ecc- %s 2>&1 | FileCheck --check-prefix=NO-SRAM-ECC %s
|
||||
// NO-SRAM-ECC: "-target-feature" "-sram-ecc"
|
||||
// RUN: %clang -### -target amdgcn-amdhsa -mcpu=gfx908:sramecc- %s 2>&1 | FileCheck --check-prefix=NO-SRAM-ECC %s
|
||||
// NO-SRAM-ECC: "-target-feature" "-sramecc"
|
||||
|
||||
// RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx1010 -mwavefrontsize64 %s 2>&1 | FileCheck --check-prefix=WAVE64 %s
|
||||
// RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx1010 -mno-wavefrontsize64 -mwavefrontsize64 %s 2>&1 | FileCheck --check-prefix=WAVE64 %s
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
// RUN: not %clang -### -target x86_64-linux-gnu \
|
||||
// RUN: -x hip --offload-arch=gfx908 \
|
||||
// RUN: --offload-arch=gfx908:unknown+ \
|
||||
// RUN: --offload-arch=gfx908+sram-ecc+unknown \
|
||||
// RUN: --offload-arch=gfx908+sramecc+unknown \
|
||||
// RUN: --offload-arch=gfx900+xnack \
|
||||
// RUN: --rocm-path=%S/Inputs/rocm \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=UNK %s
|
||||
|
@ -30,20 +30,20 @@
|
|||
|
||||
// RUN: not %clang -### -target x86_64-linux-gnu \
|
||||
// RUN: -x hip --offload-arch=gfx908 \
|
||||
// RUN: --offload-arch=gfx908:sram-ecc+:unknown+ \
|
||||
// RUN: --offload-arch=gfx908:sramecc+:unknown+ \
|
||||
// RUN: --offload-arch=gfx900+xnack \
|
||||
// RUN: --rocm-path=%S/Inputs/rocm \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=MIXED %s
|
||||
|
||||
// MIXED: error: Invalid target ID: gfx908:sram-ecc+:unknown+
|
||||
// MIXED: error: Invalid target ID: gfx908:sramecc+:unknown+
|
||||
|
||||
// RUN: not %clang -### -target x86_64-linux-gnu \
|
||||
// RUN: -x hip --offload-arch=gfx908 \
|
||||
// RUN: --offload-arch=gfx900:sram-ecc+ \
|
||||
// RUN: --offload-arch=gfx900:sramecc+ \
|
||||
// RUN: --rocm-path=%S/Inputs/rocm \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=UNSUP %s
|
||||
|
||||
// UNSUP: error: Invalid target ID: gfx900:sram-ecc+
|
||||
// UNSUP: error: Invalid target ID: gfx900:sramecc+
|
||||
|
||||
/ RUN: not %clang -### -target x86_64-linux-gnu \
|
||||
// RUN: -x hip --offload-arch=gfx908 \
|
||||
|
|
|
@ -4,50 +4,50 @@
|
|||
|
||||
// RUN: %clang -### -target x86_64-linux-gnu \
|
||||
// RUN: -x hip \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sram-ecc+ \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sramecc+ \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sramecc- \
|
||||
// RUN: --rocm-path=%S/Inputs/rocm \
|
||||
// RUN: %s 2>&1 | FileCheck %s
|
||||
|
||||
// RUN: %clang -### -target x86_64-linux-gnu \
|
||||
// RUN: -x hip \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sram-ecc+ \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sramecc+ \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sramecc- \
|
||||
// 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 \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sram-ecc+ \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sramecc+ \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sramecc- \
|
||||
// RUN: --rocm-path=%S/Inputs/rocm \
|
||||
// RUN: -fgpu-rdc \
|
||||
// RUN: %s 2>&1 | FileCheck --check-prefixes=CHECK %s
|
||||
|
||||
// CHECK: [[CLANG:"[^"]*clang[^"]*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
|
||||
// CHECK-SAME: "-target-cpu" "gfx908"
|
||||
// CHECK-SAME: "-target-feature" "+sram-ecc"
|
||||
// CHECK-SAME: "-target-feature" "+sramecc"
|
||||
// CHECK-SAME: "-target-feature" "+xnack"
|
||||
|
||||
// TMP: [[CLANG:"[^"]*clang[^"]*"]] "-cc1as" "-triple" "amdgcn-amd-amdhsa"
|
||||
// TMP-SAME: "-target-cpu" "gfx908"
|
||||
// TMP-SAME: "-target-feature" "+sram-ecc"
|
||||
// TMP-SAME: "-target-feature" "+sramecc"
|
||||
// TMP-SAME: "-target-feature" "+xnack"
|
||||
|
||||
// CHECK: [[LLD:"[^"]*lld[^"]*"]] {{.*}} "-plugin-opt=mcpu=gfx908"
|
||||
// CHECK-SAME: "-plugin-opt=-mattr=+sram-ecc,+xnack"
|
||||
// CHECK-SAME: "-plugin-opt=-mattr=+sramecc,+xnack"
|
||||
|
||||
// CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
|
||||
// CHECK-SAME: "-target-cpu" "gfx908"
|
||||
// CHECK-SAME: "-target-feature" "-sram-ecc"
|
||||
// CHECK-SAME: "-target-feature" "-sramecc"
|
||||
// CHECK-SAME: "-target-feature" "+xnack"
|
||||
|
||||
// CHECK: [[LLD]] {{.*}} "-plugin-opt=mcpu=gfx908"
|
||||
// CHECK-SAME: "-plugin-opt=-mattr=-sram-ecc,+xnack"
|
||||
// CHECK-SAME: "-plugin-opt=-mattr=-sramecc,+xnack"
|
||||
|
||||
// CHECK: {{"[^"]*clang-offload-bundler[^"]*"}}
|
||||
// CHECK-SAME: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc+:xnack+,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc-:xnack+"
|
||||
// CHECK-SAME: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx908:sramecc+:xnack+,hip-amdgcn-amd-amdhsa-gfx908:sramecc-:xnack+"
|
||||
|
||||
// Check canonicalization and repeating of target ID.
|
||||
|
||||
|
@ -64,9 +64,9 @@
|
|||
// RUN: -x hip \
|
||||
// RUN: --offload-arch=gfx900:xnack- \
|
||||
// RUN: --offload-arch=gfx900:xnack+ \
|
||||
// RUN: --offload-arch=gfx908:sram-ecc+ \
|
||||
// RUN: --offload-arch=gfx908:sram-ecc- \
|
||||
// RUN: --offload-arch=gfx908:sramecc+ \
|
||||
// RUN: --offload-arch=gfx908:sramecc- \
|
||||
// RUN: --offload-arch=gfx906 \
|
||||
// RUN: --rocm-path=%S/Inputs/rocm \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=MULTI %s
|
||||
// MULTI: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx900:xnack+,hip-amdgcn-amd-amdhsa-gfx900:xnack-,hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc+,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc-"
|
||||
// MULTI: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx900:xnack+,hip-amdgcn-amd-amdhsa-gfx900:xnack-,hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx908:sramecc+,hip-amdgcn-amd-amdhsa-gfx908:sramecc-"
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
// NOXNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-xnack"
|
||||
|
||||
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
||||
// RUN: --cuda-gpu-arch=gfx908:sram-ecc+ %s \
|
||||
// RUN: --cuda-gpu-arch=gfx908:sramecc+ %s \
|
||||
// RUN: 2>&1 | FileCheck %s -check-prefix=SRAM
|
||||
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
||||
// RUN: --cuda-gpu-arch=gfx908:sram-ecc- %s \
|
||||
// RUN: --cuda-gpu-arch=gfx908:sramecc- %s \
|
||||
// RUN: 2>&1 | FileCheck %s -check-prefix=NOSRAM
|
||||
|
||||
// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc"
|
||||
// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc"
|
||||
// SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sram-ecc"
|
||||
// NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sram-ecc"
|
||||
// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sramecc"
|
||||
// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sramecc"
|
||||
// SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sramecc"
|
||||
// NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sramecc"
|
||||
|
||||
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
||||
// RUN: --cuda-gpu-arch=gfx1010 %s \
|
||||
|
@ -39,14 +39,14 @@
|
|||
// NOTCUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-cumode"
|
||||
|
||||
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
||||
// RUN: --cuda-gpu-arch=gfx908:xnack+:sram-ecc+ %s \
|
||||
// RUN: --cuda-gpu-arch=gfx908:xnack+:sramecc+ %s \
|
||||
// RUN: 2>&1 | FileCheck %s -check-prefix=ALL3
|
||||
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
||||
// RUN: --cuda-gpu-arch=gfx908:xnack-:sram-ecc- %s \
|
||||
// RUN: --cuda-gpu-arch=gfx908:xnack-:sramecc- %s \
|
||||
// RUN: 2>&1 | FileCheck %s -check-prefix=NOALL3
|
||||
|
||||
// ALL3: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc" "-target-feature" "+xnack"
|
||||
// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc" "-target-feature" "-xnack"
|
||||
// ALL3: {{.*}}clang{{.*}}"-target-feature" "+sramecc" "-target-feature" "+xnack"
|
||||
// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-sramecc" "-target-feature" "-xnack"
|
||||
|
||||
// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
||||
// RUN: --cuda-gpu-arch=gfx1010 %s \
|
||||
|
|
|
@ -21,16 +21,16 @@
|
|||
// UNK: error: Invalid target ID: gfx908:unknown+
|
||||
|
||||
// RUN: not %clang -target amdgcn-amd-amdhsa \
|
||||
// RUN: -mcpu=gfx908:sram-ecc+:unknown+ -nostdlib \
|
||||
// RUN: -mcpu=gfx908:sramecc+:unknown+ -nostdlib \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=MIXED %s
|
||||
|
||||
// MIXED: error: Invalid target ID: gfx908:sram-ecc+:unknown+
|
||||
// MIXED: error: Invalid target ID: gfx908:sramecc+:unknown+
|
||||
|
||||
// RUN: not %clang -target amdgcn-amd-amdhsa \
|
||||
// RUN: -mcpu=gfx900:sram-ecc+ -nostdlib \
|
||||
// RUN: -mcpu=gfx900:sramecc+ -nostdlib \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=UNSUP %s
|
||||
|
||||
// UNSUP: error: Invalid target ID: gfx900:sram-ecc+
|
||||
// UNSUP: error: Invalid target ID: gfx900:sramecc+
|
||||
|
||||
// RUN: not %clang -target amdgcn-amd-amdhsa \
|
||||
// RUN: -mcpu=gfx900:xnack -nostdlib \
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
// REQUIRES: amdgpu-registered-target
|
||||
|
||||
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- -nogpulib -o - %s 2>&1 \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s
|
||||
|
||||
// RUN: %clang -E -dM -target amdgcn-amd-amdpal \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- -nogpulib -o - %s 2>&1 \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s
|
||||
|
||||
// RUN: %clang -E -dM -target amdgcn--mesa3d \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- -nogpulib -o - %s 2>&1 \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefixes=PROC,ID1 %s
|
||||
|
||||
// RUN: %clang -E -dM -target amdgcn-amd-amdhsa \
|
||||
|
@ -25,14 +25,14 @@
|
|||
// PROC-DAG: #define __amdgcn_processor__ "gfx908"
|
||||
|
||||
// ID1-DAG: #define __amdgcn_feature_xnack__ 1
|
||||
// ID1-DAG: #define __amdgcn_feature_sram_ecc__ 0
|
||||
// ID1-DAG: #define __amdgcn_target_id__ "gfx908:sram-ecc-:xnack+"
|
||||
// ID1-DAG: #define __amdgcn_feature_sramecc__ 0
|
||||
// ID1-DAG: #define __amdgcn_target_id__ "gfx908:sramecc-:xnack+"
|
||||
|
||||
// ID2-DAG: #define __amdgcn_target_id__ "gfx908"
|
||||
// ID2-NOT: #define __amdgcn_feature_xnack__
|
||||
// ID2-NOT: #define __amdgcn_feature_sram_ecc__
|
||||
// ID2-NOT: #define __amdgcn_feature_sramecc__
|
||||
|
||||
// NONE-NOT: #define __amdgcn_processor__
|
||||
// NONE-NOT: #define __amdgcn_feature_xnack__
|
||||
// NONE-NOT: #define __amdgcn_feature_sram_ecc__
|
||||
// NONE-NOT: #define __amdgcn_feature_sramecc__
|
||||
// NONE-NOT: #define __amdgcn_target_id__
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
// REQUIRES: amdgpu-registered-target
|
||||
|
||||
// RUN: %clang -E -dM -target x86_64-linux-gnu --cuda-device-only \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sram-ecc- -nogpuinc -nogpulib \
|
||||
// RUN: --offload-arch=gfx908:xnack+:sramecc- -nogpuinc -nogpulib \
|
||||
// RUN: -o - %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK-DAG: #define __amdgcn_processor__ "gfx908"
|
||||
// CHECK-DAG: #define __amdgcn_feature_xnack__ 1
|
||||
// CHECK-DAG: #define __amdgcn_feature_sram_ecc__ 0
|
||||
// CHECK-DAG: #define __amdgcn_target_id__ "gfx908:sram-ecc-:xnack+"
|
||||
// CHECK-DAG: #define __amdgcn_feature_sramecc__ 0
|
||||
// CHECK-DAG: #define __amdgcn_target_id__ "gfx908:sramecc-:xnack+"
|
||||
|
|
|
@ -3,30 +3,30 @@
|
|||
// REQUIRES: amdgpu-registered-target
|
||||
|
||||
// RUN: %clang -### -target amdgcn-amd-amdhsa \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- \
|
||||
// RUN: -nostdlib %s 2>&1 | FileCheck %s
|
||||
|
||||
// RUN: %clang -### -target amdgcn-amd-amdhsa \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- \
|
||||
// RUN: -nostdlib -x ir %s 2>&1 | FileCheck %s
|
||||
|
||||
// RUN: %clang -### -target amdgcn-amd-amdhsa \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- \
|
||||
// RUN: -nostdlib -x assembler %s 2>&1 | FileCheck %s
|
||||
|
||||
// RUN: %clang -### -target amdgcn-amd-amdpal \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- \
|
||||
// RUN: -nostdlib %s 2>&1 | FileCheck %s
|
||||
|
||||
// RUN: %clang -### -target amdgcn--mesa3d \
|
||||
// RUN: -mcpu=gfx908:xnack+:sram-ecc- \
|
||||
// RUN: -mcpu=gfx908:xnack+:sramecc- \
|
||||
// RUN: -nostdlib %s 2>&1 | FileCheck %s
|
||||
|
||||
// RUN: %clang -### -target amdgcn-amd-amdhsa \
|
||||
// RUN: -nostdlib %s 2>&1 | FileCheck -check-prefix=NONE %s
|
||||
|
||||
// CHECK: "-target-cpu" "gfx908"
|
||||
// CHECK-SAME: "-target-feature" "-sram-ecc"
|
||||
// CHECK-SAME: "-target-feature" "-sramecc"
|
||||
// CHECK-SAME: "-target-feature" "+xnack"
|
||||
|
||||
// NONE-NOT: "-target-cpu"
|
||||
|
|
|
@ -125,7 +125,7 @@ enum ArchFeatureKind : uint32_t {
|
|||
FEATURE_XNACK = 1 << 7,
|
||||
|
||||
// Sram-ecc is available.
|
||||
FEATURE_SRAM_ECC = 1 << 8,
|
||||
FEATURE_SRAMECC = 1 << 8,
|
||||
};
|
||||
|
||||
StringRef getArchNameAMDGCN(GPUKind AK);
|
||||
|
|
|
@ -101,8 +101,8 @@ constexpr GPUInfo AMDGCNGPUs[] = {
|
|||
{{"gfx900"}, {"gfx900"}, GK_GFX900, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
|
||||
{{"gfx902"}, {"gfx902"}, GK_GFX902, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
|
||||
{{"gfx904"}, {"gfx904"}, GK_GFX904, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
|
||||
{{"gfx906"}, {"gfx906"}, GK_GFX906, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAM_ECC},
|
||||
{{"gfx908"}, {"gfx908"}, GK_GFX908, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAM_ECC},
|
||||
{{"gfx906"}, {"gfx906"}, GK_GFX906, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAMECC},
|
||||
{{"gfx908"}, {"gfx908"}, GK_GFX908, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAMECC},
|
||||
{{"gfx909"}, {"gfx909"}, GK_GFX909, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
|
||||
{{"gfx90c"}, {"gfx90c"}, GK_GFX90C, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
|
||||
{{"gfx1010"}, {"gfx1010"}, GK_GFX1010, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_XNACK},
|
||||
|
|
Loading…
Reference in New Issue