[exo] Remove redundant steps of type and shape inference (#8695)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Fri, 1 Nov 2019 07:14:01 +0000 (16:14 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Fri, 1 Nov 2019 07:14:01 +0000 (16:14 +0900)
This removes redundant steps of type and shape inference.

Note that convert() and optimize() has already performed type and shape inference.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
compiler/exo/src/Circle/CircleExporterImpl.cpp
compiler/exo/src/TFLite/TFLExporterImpl.cpp

index 7251e3c..c31d844 100644 (file)
@@ -19,8 +19,6 @@
 #include "Convert.h"
 #include "TFLOptimize.h"
 
-#include "CircleTypeInference.h"
-#include "ShapeInference.h"
 #include "CircleTensorExporter.h"
 #include "CircleOperationExporter.h"
 #include "CircleExporterUtils.h"
@@ -128,14 +126,6 @@ void CircleExporter::Impl::exportGraph(loco::Graph *graph)
     optimize(graph);
   }
 
-  // Infer the type of each node
-  TypeInference::run(graph);
-  // TypeInference::get(node) now works
-
-  // Infer the shape of each node
-  ShapeInference::run(graph);
-  // ShapeInference::get(node) now works
-
   _builder.Clear();
 
   SerializedModelData gd;
index ef02264..44ae4a1 100644 (file)
@@ -19,8 +19,6 @@
 #include "Convert.h"
 #include "TFLOptimize.h"
 
-#include "TFLTypeInference.h"
-#include "ShapeInference.h"
 #include "TFLTensorExporter.h"
 #include "TFLOperationExporter.h"
 #include "TFLExporterUtils.h"
@@ -126,14 +124,6 @@ void TFLExporter::Impl::exportGraph(loco::Graph *graph)
     optimize(graph);
   }
 
-  // Infer the type of each node
-  TypeInference::run(graph);
-  // TypeInference::get(node) now works
-
-  // Infer the shape of each node
-  ShapeInference::run(graph);
-  // ShapeInference::get(node) now works
-
   _builder.Clear();
 
   SerializedModelData gd;