[PATCH] D53472: Add gfx904 and gfx906 to GPU Arch

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 20 05:04:12 PDT 2018


yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added a subscriber: jholewinski.

https://reviews.llvm.org/D53472

Files:
  include/clang/Basic/Cuda.h
  lib/Basic/Cuda.cpp
  lib/Basic/Targets/NVPTX.cpp


Index: lib/Basic/Targets/NVPTX.cpp
===================================================================
--- lib/Basic/Targets/NVPTX.cpp
+++ lib/Basic/Targets/NVPTX.cpp
@@ -188,6 +188,8 @@
       case CudaArch::GFX810:
       case CudaArch::GFX900:
       case CudaArch::GFX902:
+      case CudaArch::GFX904:
+      case CudaArch::GFX906:
       case CudaArch::LAST:
         break;
       case CudaArch::UNKNOWN:
Index: lib/Basic/Cuda.cpp
===================================================================
--- lib/Basic/Cuda.cpp
+++ lib/Basic/Cuda.cpp
@@ -90,6 +90,10 @@
     return "gfx900";
   case CudaArch::GFX902: // TBA
     return "gfx902";
+  case CudaArch::GFX904: // TBA
+    return "gfx904";
+  case CudaArch::GFX906: // TBA
+    return "gfx906";
   }
   llvm_unreachable("invalid enum");
 }
@@ -124,6 +128,8 @@
       .Case("gfx810", CudaArch::GFX810)
       .Case("gfx900", CudaArch::GFX900)
       .Case("gfx902", CudaArch::GFX902)
+      .Case("gfx904", CudaArch::GFX904)
+      .Case("gfx906", CudaArch::GFX906)
       .Default(CudaArch::UNKNOWN);
 }
 
@@ -233,6 +239,8 @@
   case CudaArch::GFX810:
   case CudaArch::GFX900:
   case CudaArch::GFX902:
+  case CudaArch::GFX904:
+  case CudaArch::GFX906:
     return CudaVirtualArch::COMPUTE_AMDGCN;
   }
   llvm_unreachable("invalid enum");
@@ -277,6 +285,8 @@
   case CudaArch::GFX810:
   case CudaArch::GFX900:
   case CudaArch::GFX902:
+  case CudaArch::GFX904:
+  case CudaArch::GFX906:
     return CudaVersion::CUDA_70;
   }
   llvm_unreachable("invalid enum");
Index: include/clang/Basic/Cuda.h
===================================================================
--- include/clang/Basic/Cuda.h
+++ include/clang/Basic/Cuda.h
@@ -62,6 +62,8 @@
   GFX810,
   GFX900,
   GFX902,
+  GFX904,
+  GFX906,
   LAST,
 };
 const char *CudaArchToString(CudaArch A);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53472.170311.patch
Type: text/x-patch
Size: 1825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181020/1ab2a59c/attachment-0001.bin>


More information about the cfe-commits mailing list