[exo-tflite] Attaching progress reporter into convert_to_TFLNodes() (#7280)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Mon, 9 Sep 2019 03:42:48 +0000 (12:42 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 9 Sep 2019 03:42:48 +0000 (12:42 +0900)
This attaches progress reporter into the phase of convert_to_TFLNodes().

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

index a04123d..de0e3d5 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "TypeInferencePass.h"
 #include "ShapeInferencePass.h"
+#include "ProgressReporter.h"
 
 #include <loco.h>
 #include <loco/Service/ShapeInference.h>
@@ -71,7 +72,10 @@ void convert_to_TFLNodes(loco::Graph *graph)
     // TODO Add optimization passes
   }
 
-  logo::PhaseRunner<logo::PhaseStrategy::Restart> phase_runner{graph};
+  logo::PhaseRunner<logo::PhaseStrategy::Saturate> phase_runner{graph};
+
+  ProgressReporter prog(graph, logo::PhaseStrategy::Saturate);
+  phase_runner.attach(&prog);
   phase_runner.run(phase);
 
   // TODO Assert if all canonical nodes are converted to TFL node