[Beignet] [PATCH 2/3] KBL: add kabylake backend support.

Yang Rong rong.r.yang at intel.com
Tue Aug 2 07:36:22 UTC 2016


Kabylake is almost same as skylake, derived it from GEN9.

Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
 backend/src/CMakeLists.txt                 |   4 +++
 backend/src/backend/.gen_program.cpp.swp   | Bin 0 -> 32768 bytes
 backend/src/backend/gen10_context.cpp      |  31 ++++++++++++++++++
 backend/src/backend/gen10_context.hpp      |  49 +++++++++++++++++++++++++++++
 backend/src/backend/gen10_encoder.cpp      |  33 +++++++++++++++++++
 backend/src/backend/gen10_encoder.hpp      |  40 +++++++++++++++++++++++
 backend/src/backend/gen_insn_selection.cpp |  10 ++++++
 backend/src/backend/gen_insn_selection.hpp |   7 +++++
 backend/src/backend/gen_program.cpp        |  15 +++++++--
 9 files changed, 186 insertions(+), 3 deletions(-)
 create mode 100644 backend/src/backend/.gen_program.cpp.swp
 create mode 100644 backend/src/backend/gen10_context.cpp
 create mode 100644 backend/src/backend/gen10_context.hpp
 create mode 100644 backend/src/backend/gen10_encoder.cpp
 create mode 100644 backend/src/backend/gen10_encoder.hpp

diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt
index 41eb5ec..f368ae1 100644
--- a/backend/src/CMakeLists.txt
+++ b/backend/src/CMakeLists.txt
@@ -116,6 +116,8 @@ set (GBE_SRC
     backend/gen8_context.cpp
     backend/gen9_context.hpp
     backend/gen9_context.cpp
+    backend/gen10_context.hpp
+    backend/gen10_context.cpp
     backend/gen_program.cpp
     backend/gen_program.hpp
     backend/gen_program.h
@@ -133,6 +135,8 @@ set (GBE_SRC
     backend/gen8_encoder.cpp
     backend/gen9_encoder.hpp
     backend/gen9_encoder.cpp
+    backend/gen10_encoder.hpp
+    backend/gen10_encoder.cpp
     )
 
 set (GBE_LINK_LIBRARIES
diff --git a/backend/src/backend/.gen_program.cpp.swp b/backend/src/backend/.gen_program.cpp.swp
new file mode 100644
index 0000000000000000000000000000000000000000..72261df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<!@d(pe^y>lsPFEzWnBxaqBB4xW(Y#quyCiX5Dd+C*vIkU~|
z at piQ?FHS;tV|<rOvo06yHH`TlmUUCs>@k#lIyLTjE3tJ(#&p|qx2HCAT}e}>hF$%i
zB;eM?T@^H$;zgTx&bsNG>c3dKHvx57s^k5yCDJ(B4)rZyd4->8f!!pl)!@Oy(FC%~
zq;)+X#u<anD(<&<xs(FYS~=v-Q6!GUn77)qZ;fWD$=37DJbN*1=8C9W<VE-;(KJH0
zS5|N5qOyB{5x9e{OJqKi8<n*pqGNnn`rVE8b&jizc}A!G>a(~++%@iDsI(D~7e$)N
z-1{QQBMVcMFS*!~zMG}C<!-lSDnr-HZ{b+eHln?<vv&l6VMaXE!Gm1Hj9(2Bwcc&n
zorBx!pon!_UQ%P_DkjwSLU4U{n6Os6=SP1}TIyynoVRVzdRIjB%(-S9t-2FAXPoz;
rw#&vjW4sTwgx$PT+Y-iiAA*UH*qsQ*0o{G*C4%F2qUYkbJE{F&@Oo+}

literal 0
HcmV?d00001

diff --git a/backend/src/backend/gen10_context.cpp b/backend/src/backend/gen10_context.cpp
new file mode 100644
index 0000000..a8dc316
--- /dev/null
+++ b/backend/src/backend/gen10_context.cpp
@@ -0,0 +1,31 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * \file gen9_context.cpp
+ */
+
+#include "backend/gen10_context.hpp"
+#include "backend/gen_insn_selection.hpp"
+
+namespace gbe
+{
+  void Gen10Context::newSelection(void) {
+    this->sel = GBE_NEW(Selection10, *this);
+  }
+}
diff --git a/backend/src/backend/gen10_context.hpp b/backend/src/backend/gen10_context.hpp
new file mode 100644
index 0000000..87dbffc
--- /dev/null
+++ b/backend/src/backend/gen10_context.hpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * \file gen10_context.hpp
+ */
+#ifndef __GBE_gen10_CONTEXT_HPP__
+#define __GBE_gen10_CONTEXT_HPP__
+
+#include "backend/gen9_context.hpp"
+#include "backend/gen10_encoder.hpp"
+
+namespace gbe
+{
+  /* This class is used to implement the HSW
+     specific logic for context. */
+  class Gen10Context : public Gen9Context
+  {
+  public:
+    virtual ~Gen10Context(void) { };
+    Gen10Context(const ir::Unit &unit, const std::string &name, uint32_t deviceID, bool relaxMath = false)
+            : Gen9Context(unit, name, deviceID, relaxMath) {
+    };
+
+  protected:
+    virtual GenEncoder* generateEncoder(void) {
+      return GBE_NEW(Gen10Encoder, this->simdWidth, 10, deviceID);
+    }
+
+  private:
+    virtual void newSelection(void);
+  };
+}
+#endif /* __GBE_GEN10_CONTEXT_HPP__ */
diff --git a/backend/src/backend/gen10_encoder.cpp b/backend/src/backend/gen10_encoder.cpp
new file mode 100644
index 0000000..0550e9f
--- /dev/null
+++ b/backend/src/backend/gen10_encoder.cpp
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) Intel Corp.  2006.  All Rights Reserved.
+ Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
+ develop this 3D driver.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice (including the
+ next paragraph) shall be included in all copies or substantial
+ portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ **********************************************************************/
+
+#include "backend/gen10_encoder.hpp"
+
+namespace gbe
+{
+
+} /* End of the name space. */
diff --git a/backend/src/backend/gen10_encoder.hpp b/backend/src/backend/gen10_encoder.hpp
new file mode 100644
index 0000000..5e1265e
--- /dev/null
+++ b/backend/src/backend/gen10_encoder.hpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * \file gen10_context.hpp
+ */
+#ifndef __GBE_GEN10_ENCODER_HPP__
+#define __GBE_GEN10_ENCODER_HPP__
+
+#include "backend/gen9_encoder.hpp"
+
+namespace gbe
+{
+  /* This class is used to implement the SKL
+     specific logic for encoder. */
+  class Gen10Encoder : public Gen9Encoder
+  {
+  public:
+    virtual ~Gen10Encoder(void) { }
+
+    Gen10Encoder(uint32_t simdWidth, uint32_t gen, uint32_t deviceID)
+         : Gen9Encoder(simdWidth, gen, deviceID) { }
+  };
+}
+#endif /* __GBE_GEN10_ENCODER_HPP__ */
diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
index e342161..69959e9 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -2523,6 +2523,16 @@ extern bool OCL_DEBUGINFO; // first defined by calling BVAR in program.cpp
     opt_features = SIOF_LOGICAL_SRCMOD | SIOF_OP_MOV_LONG_REG_RESTRICT;
   }
 
+  Selection10::Selection10(GenContext &ctx) : Selection(ctx) {
+    this->opaque->setHas32X32Mul(true);
+    this->opaque->setHasLongType(true);
+    this->opaque->setHasDoubleType(true);
+    this->opaque->setLdMsgOrder(LD_MSG_ORDER_SKL);
+    this->opaque->setSlowByteGather(false);
+    this->opaque->setHasHalfType(true);
+    opt_features = SIOF_LOGICAL_SRCMOD;
+  }
+
   void Selection::Opaque::TYPED_WRITE(GenRegister *msgs, uint32_t msgNum,
                                       uint32_t bti, bool is3D) {
     uint32_t elemID = 0;
diff --git a/backend/src/backend/gen_insn_selection.hpp b/backend/src/backend/gen_insn_selection.hpp
index b481de8..4a43eb6 100644
--- a/backend/src/backend/gen_insn_selection.hpp
+++ b/backend/src/backend/gen_insn_selection.hpp
@@ -355,6 +355,13 @@ namespace gbe
       SelectionBxt(GenContext &ctx);
   };
 
+  class Selection10 : public Selection
+  {
+    public:
+      /*! Initialize internal structures used for the selection */
+      Selection10(GenContext &ctx);
+  };
+
 } /* namespace gbe */
 
 #endif /*  __GEN_INSN_SELECTION_HPP__ */
diff --git a/backend/src/backend/gen_program.cpp b/backend/src/backend/gen_program.cpp
index ade0157..6bd6c2b 100644
--- a/backend/src/backend/gen_program.cpp
+++ b/backend/src/backend/gen_program.cpp
@@ -50,6 +50,7 @@
 #include "backend/gen75_context.hpp"
 #include "backend/gen8_context.hpp"
 #include "backend/gen9_context.hpp"
+#include "backend/gen10_context.hpp"
 #include "backend/gen_defs.hpp"
 #include "backend/gen/gen_mesa_disasm.h"
 #include "backend/gen_reg_allocation.hpp"
@@ -100,7 +101,7 @@ namespace gbe {
     uint32_t insn_version = 0;
     if (IS_GEN7(deviceID) || IS_GEN75(deviceID))
       insn_version = 7;
-    else if (IS_GEN8(deviceID) || IS_GEN9(deviceID))
+    else if (IS_GEN8(deviceID) || IS_GEN9(deviceID) || IS_GEN10(deviceID))
       insn_version = 8;
 
     for (uint32_t i = 0; i < insnNum;) {
@@ -186,6 +187,8 @@ namespace gbe {
       ctx = GBE_NEW(Gen9Context, unit, name, deviceID, relaxMath);
     } else if (IS_BROXTON(deviceID)) {
       ctx = GBE_NEW(BxtContext, unit, name, deviceID, relaxMath);
+    } else if (IS_KABYLAKE(deviceID)) {
+      ctx = GBE_NEW(Gen10Context, unit, name, deviceID, relaxMath);
     }
     GBE_ASSERTM(ctx != NULL, "Fail to create the gen context\n");
 
@@ -239,6 +242,7 @@ namespace gbe {
     GBHI_BDW = 4,
     GBHI_SKL = 5,
     GBHI_BXT = 6,
+    GBHI_KBL = 7,
     GBHI_MAX,
   };
 #define GEN_BINARY_VERSION  1
@@ -249,7 +253,8 @@ namespace gbe {
                                               {GEN_BINARY_VERSION, 'G','E', 'N', 'C', 'C', 'H', 'V'},
                                               {GEN_BINARY_VERSION, 'G','E', 'N', 'C', 'B', 'D', 'W'},
                                               {GEN_BINARY_VERSION, 'G','E', 'N', 'C', 'S', 'K', 'L'},
-                                              {GEN_BINARY_VERSION, 'G','E', 'N', 'C', 'B', 'X', 'T'}
+                                              {GEN_BINARY_VERSION, 'G','E', 'N', 'C', 'B', 'X', 'T'},
+                                              {GEN_BINARY_VERSION, 'G','E', 'N', 'C', 'K', 'B', 'T'}
                                               };
 
 #define FILL_GEN_HEADER(binary, index)  do {int i = 0; do {*(binary+i) = gen_binary_header[index][i]; i++; }while(i < GEN_BINARY_HEADER_LENGTH);}while(0)
@@ -284,6 +289,7 @@ namespace gbe {
 #define MATCH_BDW_HEADER(binary) genHeaderCompare(binary, GBHI_BDW)
 #define MATCH_SKL_HEADER(binary) genHeaderCompare(binary, GBHI_SKL)
 #define MATCH_BXT_HEADER(binary) genHeaderCompare(binary, GBHI_BXT)
+#define MATCH_KBL_HEADER(binary) genHeaderCompare(binary, GBHI_KBL)
 
 #define MATCH_DEVICE(deviceID, binary) ((IS_IVYBRIDGE(deviceID) && MATCH_IVB_HEADER(binary)) ||  \
                                       (IS_IVYBRIDGE(deviceID) && MATCH_IVB_HEADER(binary)) ||  \
@@ -292,7 +298,8 @@ namespace gbe {
                                       (IS_BROADWELL(deviceID) && MATCH_BDW_HEADER(binary)) ||  \
                                       (IS_CHERRYVIEW(deviceID) && MATCH_CHV_HEADER(binary)) ||  \
                                       (IS_SKYLAKE(deviceID) && MATCH_SKL_HEADER(binary)) || \
-                                      (IS_BROXTON(deviceID) && MATCH_BXT_HEADER(binary)) \
+                                      (IS_BROXTON(deviceID) && MATCH_BXT_HEADER(binary)) || \
+                                      (IS_KABYLAKE(deviceID) && MATCH_KBL_HEADER(binary)) \
                                       )
 
   static gbe_program genProgramNewFromBinary(uint32_t deviceID, const char *binary, size_t size) {
@@ -392,6 +399,8 @@ namespace gbe {
         FILL_SKL_HEADER(*binary);
       }else if(IS_BROXTON(prog->deviceID)){
         FILL_BXT_HEADER(*binary);
+      }else if(IS_KABYLAKE(prog->deviceID)){
+        FILL_SKL_HEADER(*binary);
       }else {
         free(*binary);
         *binary = NULL;
-- 
2.1.4



More information about the Beignet mailing list