PureACL handles operators that generate no kernel (e.g. CONCATENATION) (#2437)
author이상규/동작제어Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Thu, 23 Aug 2018 10:42:55 +0000 (19:42 +0900)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 23 Aug 2018 10:42:55 +0000 (19:42 +0900)
Related Issue: #2431

Dummy stage instance is added for `CONCATENATION` because Profiler assumes
every op inserts a stage.

The output will not show `CONCATENATION` slot because it is based on
runtime execution event. There was no event for `CONCATENATION` at runtime.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
runtimes/pure_arm_compute/src/compilation.cc

index 02afc32..04c99e8 100644 (file)
@@ -1931,6 +1931,9 @@ void Planner::visit(const ::internal::tflite::op::Concat::Node &node)
   }
 
   // NOTE Concat has no actual operation!
+  // However, dummy stage is added because profiler assumes every operation make a stage.
+  auto stage = [](const IAllocationContext &ctx, IExecutionBuilder &builder) {};
+  _builder.addStage(stage);
 }
 
 void Planner::visit(const ::internal::tflite::op::FullyConnected::Node &node)