[neurun] Make ChromeTrace trace the entire graph (#9300)
author이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Mon, 2 Dec 2019 02:06:46 +0000 (11:06 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Mon, 2 Dec 2019 02:06:46 +0000 (11:06 +0900)
Make ChromeTrace trace the entire graph

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtime/neurun/core/src/exec/ExecutionObservers.cc

index 46f89fb..03c48b2 100644 (file)
@@ -87,7 +87,7 @@ ChromeTracingObserver::~ChromeTracingObserver() { _recorder.fini(); }
 
 void ChromeTracingObserver::handleBegin(IExecutor *)
 {
-  // TODO Record the run of the entire graph begin
+  _collector.onEvent(EventCollector::Event{EventCollector::Edge::BEGIN, "runtime", "Graph"});
 }
 
 void ChromeTracingObserver::handleBegin(IExecutor *, const model::Subgraph *subgraph,
@@ -108,7 +108,7 @@ void ChromeTracingObserver::handleEnd(IExecutor *, const model::Subgraph *subgra
 
 void ChromeTracingObserver::handleEnd(IExecutor *)
 {
-  // TODO Record the run of the entire graph end
+  _collector.onEvent(EventCollector::Event{EventCollector::Edge::END, "runtime", "Graph"});
 }
 
 std::string ChromeTracingObserver::subgraphTag(const model::Subgraph *subgraph)