[exo-tflite] Enabling OperationExporter to handle TFLNode (#7001)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Thu, 29 Aug 2019 00:30:55 +0000 (09:30 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 29 Aug 2019 00:30:55 +0000 (09:30 +0900)
This enables OperationExporter to handle TFLNode

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
compiler/exo-tflite/src/OperationExporter.cpp

index d5b0c8a..f0108ec 100644 (file)
@@ -18,6 +18,7 @@
 #include "ExporterUtils.h"
 #include "ShapeInference.h"
 
+#include "Dialect/IR/TFLNode.h"
 #include "Dialect/IR/TFLNodes.h"
 #include "Dialect/IR/TFLNodeVisitor.h"
 
@@ -628,10 +629,15 @@ void exportNode(loco::Node *node, flatbuffers::FlatBufferBuilder &builder,
   }
 
   if (auto canonical_node = dynamic_cast<loco::CanonicalNode *>(node))
-  {
+  { // TODO Consider removing this later
     OperationExporter exporter{builder, data};
     canonical_node->accept(&exporter);
   }
+  else if (auto tfl_node = dynamic_cast<locoex::TFLNode *>(node))
+  {
+    OperationExporter exporter{builder, data};
+    tfl_node->accept(&exporter);
+  }
   else if (dynamic_cast<locoex::COpNode *>(node))
   {
     OperationExporter exporter{builder, data};