Merge Lowered and Subgraph section in Graph (#5122)
author이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Tue, 7 May 2019 04:44:44 +0000 (13:44 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 7 May 2019 04:44:44 +0000 (13:44 +0900)
Subgraph is also part of LOWERED phase so we should not distinguish
these members.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtimes/neurun/core/include/graph/Graph.h

index 81e06a1..ddf461a 100644 (file)
@@ -159,13 +159,6 @@ public:
   operand::LowerInfo *getLowerInfo(const model::OperandIndex &index);
   void setLowerInfo(const model::OperandIndex &index,
                     std::unique_ptr<operand::LowerInfo> &&lower_info);
-
-private:
-  std::unique_ptr<compiler::BackendResolver> _backend_resolver;
-  std::unique_ptr<LowerInfoMap> _lower_info_map;
-
-  // For Subgraph
-public:
   model::operation::SubgraphContext &subg_ctx()
   {
     assert(_subg_ctx);
@@ -174,6 +167,8 @@ public:
   const model::operation::SubgraphContext *subg_ctx() const { return _subg_ctx.get(); }
 
 private:
+  std::unique_ptr<compiler::BackendResolver> _backend_resolver;
+  std::unique_ptr<LowerInfoMap> _lower_info_map;
   // Pass(for Perm) can accept only graph so that Graph has SubgraphContext as a member
   std::unique_ptr<model::operation::SubgraphContext> _subg_ctx;
 };