forked from OSchip/llvm-project
[AMDGPU] gfx908 clang target
Differential Revision: https://reviews.llvm.org/D64430 llvm-svn: 365528
This commit is contained in:
parent
2ea514c566
commit
0cfd75a07d
|
@ -64,6 +64,7 @@ enum class CudaArch {
|
|||
GFX902,
|
||||
GFX904,
|
||||
GFX906,
|
||||
GFX908,
|
||||
GFX909,
|
||||
LAST,
|
||||
};
|
||||
|
|
|
@ -109,6 +109,8 @@ const char *CudaArchToString(CudaArch A) {
|
|||
return "gfx904";
|
||||
case CudaArch::GFX906: // TBA
|
||||
return "gfx906";
|
||||
case CudaArch::GFX908: // TBA
|
||||
return "gfx908";
|
||||
case CudaArch::GFX909: // TBA
|
||||
return "gfx909";
|
||||
}
|
||||
|
@ -147,6 +149,7 @@ CudaArch StringToCudaArch(llvm::StringRef S) {
|
|||
.Case("gfx902", CudaArch::GFX902)
|
||||
.Case("gfx904", CudaArch::GFX904)
|
||||
.Case("gfx906", CudaArch::GFX906)
|
||||
.Case("gfx908", CudaArch::GFX908)
|
||||
.Case("gfx909", CudaArch::GFX909)
|
||||
.Default(CudaArch::UNKNOWN);
|
||||
}
|
||||
|
@ -259,6 +262,7 @@ CudaVirtualArch VirtualArchForCudaArch(CudaArch A) {
|
|||
case CudaArch::GFX902:
|
||||
case CudaArch::GFX904:
|
||||
case CudaArch::GFX906:
|
||||
case CudaArch::GFX908:
|
||||
case CudaArch::GFX909:
|
||||
return CudaVirtualArch::COMPUTE_AMDGCN;
|
||||
}
|
||||
|
@ -306,6 +310,7 @@ CudaVersion MinVersionForCudaArch(CudaArch A) {
|
|||
case CudaArch::GFX902:
|
||||
case CudaArch::GFX904:
|
||||
case CudaArch::GFX906:
|
||||
case CudaArch::GFX908:
|
||||
case CudaArch::GFX909:
|
||||
return CudaVersion::CUDA_70;
|
||||
}
|
||||
|
|
|
@ -152,6 +152,12 @@ bool AMDGPUTargetInfo::initFeatureMap(
|
|||
Features["gfx10-insts"] = true;
|
||||
Features["s-memrealtime"] = true;
|
||||
break;
|
||||
case GK_GFX908:
|
||||
Features["dot3-insts"] = true;
|
||||
Features["dot4-insts"] = true;
|
||||
Features["dot5-insts"] = true;
|
||||
Features["dot6-insts"] = true;
|
||||
LLVM_FALLTHROUGH;
|
||||
case GK_GFX906:
|
||||
Features["dl-insts"] = true;
|
||||
Features["dot1-insts"] = true;
|
||||
|
|
|
@ -191,6 +191,7 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
|
|||
case CudaArch::GFX902:
|
||||
case CudaArch::GFX904:
|
||||
case CudaArch::GFX906:
|
||||
case CudaArch::GFX908:
|
||||
case CudaArch::GFX909:
|
||||
case CudaArch::LAST:
|
||||
break;
|
||||
|
|
|
@ -4928,6 +4928,7 @@ void CGOpenMPRuntimeNVPTX::checkArchForUnifiedAddressing(
|
|||
case CudaArch::GFX902:
|
||||
case CudaArch::GFX904:
|
||||
case CudaArch::GFX906:
|
||||
case CudaArch::GFX908:
|
||||
case CudaArch::GFX909:
|
||||
case CudaArch::UNKNOWN:
|
||||
break;
|
||||
|
@ -4982,6 +4983,7 @@ static std::pair<unsigned, unsigned> getSMsBlocksPerSM(CodeGenModule &CGM) {
|
|||
case CudaArch::GFX902:
|
||||
case CudaArch::GFX904:
|
||||
case CudaArch::GFX906:
|
||||
case CudaArch::GFX908:
|
||||
case CudaArch::GFX909:
|
||||
case CudaArch::UNKNOWN:
|
||||
break;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx904 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX904 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx906 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX906 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx908 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX908 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1010 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1010 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1011 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1011 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1012 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1012 %s
|
||||
|
@ -15,6 +16,7 @@
|
|||
|
||||
// GFX904: "target-features"="+16-bit-insts,+ci-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX906: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX908: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX1010: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX1011: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX1012: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
|
|
|
@ -175,6 +175,7 @@
|
|||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx902 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX902 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx904 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX904 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx906 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX906 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx908 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX908 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx909 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX909 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1010 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1011 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1011 %s
|
||||
|
@ -195,6 +196,7 @@
|
|||
// GFX902-DAG: #define FP_FAST_FMA 1
|
||||
// GFX904-DAG: #define FP_FAST_FMA 1
|
||||
// GFX906-DAG: #define FP_FAST_FMA 1
|
||||
// GFX908-DAG: #define FP_FAST_FMA 1
|
||||
// GFX909-DAG: #define FP_FAST_FMA 1
|
||||
// GFX1010-DAG: #define FP_FAST_FMA 1
|
||||
// GFX1011-DAG: #define FP_FAST_FMA 1
|
||||
|
@ -215,6 +217,7 @@
|
|||
// GFX902-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX904-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX906-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX908-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX909-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX1010-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX1011-DAG: #define FP_FAST_FMAF 1
|
||||
|
@ -239,6 +242,7 @@
|
|||
// GFX902-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX904-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX906-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX908-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX909-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX1010-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX1011-DAG: #define __HAS_FMAF__ 1
|
||||
|
@ -259,6 +263,7 @@
|
|||
// GFX902-DAG: #define __HAS_FP64__ 1
|
||||
// GFX904-DAG: #define __HAS_FP64__ 1
|
||||
// GFX906-DAG: #define __HAS_FP64__ 1
|
||||
// GFX908-DAG: #define __HAS_FP64__ 1
|
||||
// GFX909-DAG: #define __HAS_FP64__ 1
|
||||
// GFX1010-DAG: #define __HAS_FP64__ 1
|
||||
// GFX1011-DAG: #define __HAS_FP64__ 1
|
||||
|
@ -279,6 +284,7 @@
|
|||
// GFX902-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX904-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX906-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX908-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX909-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX1010-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX1011-DAG: #define __HAS_LDEXPF__ 1
|
||||
|
@ -299,6 +305,7 @@
|
|||
// GFX902-DAG: #define __gfx902__ 1
|
||||
// GFX904-DAG: #define __gfx904__ 1
|
||||
// GFX906-DAG: #define __gfx906__ 1
|
||||
// GFX908-DAG: #define __gfx908__ 1
|
||||
// GFX909-DAG: #define __gfx909__ 1
|
||||
// GFX1010-DAG: #define __gfx1010__ 1
|
||||
// GFX1011-DAG: #define __gfx1011__ 1
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
// RUN: %clang -### -target amdgcn -mcpu=gfx902 %s 2>&1 | FileCheck --check-prefix=GFX902 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx904 %s 2>&1 | FileCheck --check-prefix=GFX904 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx906 %s 2>&1 | FileCheck --check-prefix=GFX906 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx908 %s 2>&1 | FileCheck --check-prefix=GFX908 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx909 %s 2>&1 | FileCheck --check-prefix=GFX909 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefix=GFX1010 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1011 %s 2>&1 | FileCheck --check-prefix=GFX1011 %s
|
||||
|
@ -121,6 +122,7 @@
|
|||
// GFX902: "-target-cpu" "gfx902"
|
||||
// GFX904: "-target-cpu" "gfx904"
|
||||
// GFX906: "-target-cpu" "gfx906"
|
||||
// GFX908: "-target-cpu" "gfx908"
|
||||
// GFX909: "-target-cpu" "gfx909"
|
||||
// GFX1010: "-target-cpu" "gfx1010"
|
||||
// GFX1011: "-target-cpu" "gfx1011"
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
// RUN: | FileCheck -check-prefix OK %s
|
||||
// RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_52 -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix OK %s
|
||||
// RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=gfx908 -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix OK %s
|
||||
// RUN: %clang -### -target x86_64-linux-gnu -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix OK %s
|
||||
|
||||
|
|
Loading…
Reference in New Issue