Add gfx909 to GPU Arch

Subscribers: jholewinski, cfe-commits

Differential Revision: https://reviews.llvm.org/D53558

llvm-svn: 345198
This commit is contained in:
Tim Renouf 2018-10-24 21:19:02 +00:00
parent 9c5bda652c
commit 632f35d495
3 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,7 @@ enum class CudaArch {
GFX902,
GFX904,
GFX906,
GFX909,
LAST,
};
const char *CudaArchToString(CudaArch A);

View File

@ -94,6 +94,8 @@ const char *CudaArchToString(CudaArch A) {
return "gfx904";
case CudaArch::GFX906: // TBA
return "gfx906";
case CudaArch::GFX909: // TBA
return "gfx909";
}
llvm_unreachable("invalid enum");
}
@ -130,6 +132,7 @@ CudaArch StringToCudaArch(llvm::StringRef S) {
.Case("gfx902", CudaArch::GFX902)
.Case("gfx904", CudaArch::GFX904)
.Case("gfx906", CudaArch::GFX906)
.Case("gfx909", CudaArch::GFX909)
.Default(CudaArch::UNKNOWN);
}
@ -241,6 +244,7 @@ CudaVirtualArch VirtualArchForCudaArch(CudaArch A) {
case CudaArch::GFX902:
case CudaArch::GFX904:
case CudaArch::GFX906:
case CudaArch::GFX909:
return CudaVirtualArch::COMPUTE_AMDGCN;
}
llvm_unreachable("invalid enum");
@ -287,6 +291,7 @@ CudaVersion MinVersionForCudaArch(CudaArch A) {
case CudaArch::GFX902:
case CudaArch::GFX904:
case CudaArch::GFX906:
case CudaArch::GFX909:
return CudaVersion::CUDA_70;
}
llvm_unreachable("invalid enum");

View File

@ -190,6 +190,7 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
case CudaArch::GFX902:
case CudaArch::GFX904:
case CudaArch::GFX906:
case CudaArch::GFX909:
case CudaArch::LAST:
break;
case CudaArch::UNKNOWN: