Move BackendResolver into compiler (#3671)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 22 Nov 2018 04:45:19 +0000 (13:45 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 22 Nov 2018 04:45:19 +0000 (13:45 +0900)
Move BackendResolver into compiler and fix namespace

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtimes/neurun/src/compiler/BackendResolver.cc [moved from runtimes/neurun/src/codegen/BackendResolver.cc with 94% similarity]
runtimes/neurun/src/compiler/BackendResolver.h [moved from runtimes/neurun/src/codegen/BackendResolver.h with 93% similarity]
runtimes/neurun/src/graph/Graph.cc
runtimes/neurun/src/graph/Graph.h
runtimes/neurun/src/graph/pass/PermutationEliminationPass.cc
runtimes/neurun/src/graph/pass/PermutationInsertionPass.cc

 
 namespace neurun
 {
-namespace codegen
+namespace compiler
 {
 
 // NOT IMPLEMENTED
 
-} // namespace codegen
+} // namespace compiler
 } // namespace neurun
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __NEURUN_CODEGEN_BACKEND_RESOLVER_H__
-#define __NEURUN_CODEGEN_BACKEND_RESOLVER_H__
+#ifndef __NEURUN_COMPILER_BACKEND_RESOLVER_H__
+#define __NEURUN_COMPILER_BACKEND_RESOLVER_H__
 
 #include <set>
 #include <unordered_map>
@@ -28,7 +28,7 @@
 
 namespace neurun
 {
-namespace codegen
+namespace compiler
 {
 
 class BackendResolver
@@ -80,7 +80,7 @@ private:
   std::shared_ptr<backend::BackendManager> _backend_manager;
 };
 
-} // namespace codegen
+} // namespace compiler
 } // namespace neurun
 
-#endif // __NEURUN_CODEGEN_BACKEND_RESOLVER_H__
+#endif // __NEURUN_COMPILER_BACKEND_RESOLVER_H__
index 3278729..aa26e92 100644 (file)
@@ -26,7 +26,7 @@
 #include "operation/LowerInfo.h"
 #include "operand/LowerInfo.h"
 #include "operand/Shape4DConvert.h"
-#include "codegen/BackendResolver.h"
+#include "compiler/BackendResolver.h"
 #include "backend/interface/IConfig.h"
 #include "operation/PermuteNode.h"
 #include "pass/PermutationInsertionPass.h"
@@ -99,7 +99,7 @@ void Graph::lower(void)
           nnfw::make_unique<operand::LowerInfo>(operand::asShape4D(object.shape()));
     });
 
-    _backend_resolver = nnfw::make_unique<codegen::BackendResolver>(_model->operands);
+    _backend_resolver = nnfw::make_unique<compiler::BackendResolver>(_model->operands);
 
     _model->operations.iterate([&](const operation::Index &, operation::Node &node) {
       auto backend = _backend_resolver->getBackend(typeid(node));
index 3b82a6c..0e9029e 100644 (file)
@@ -32,10 +32,10 @@ class Linear;
 
 namespace neurun
 {
-namespace codegen
+namespace compiler
 {
 class BackendResolver;
-} // namespace linear
+} // namespace compiler
 } // namespace neurun
 
 namespace neurun
@@ -121,7 +121,7 @@ public:
   operand::Set &operands() { return _model->operands; } // TODO Remove this non-const accessor
   const operation::Set &operations() const { return _model->operations; }
   operation::Set &operations() { return _model->operations; }
-  const codegen::BackendResolver *backend_resolver() const { return _backend_resolver.get(); }
+  const compiler::BackendResolver *backend_resolver() const { return _backend_resolver.get(); }
 
 private:
   Phase _phase{Phase::BUILDING};
@@ -129,7 +129,7 @@ private:
 
   // For LOWERED phase
 private:
-  std::unique_ptr<codegen::BackendResolver> _backend_resolver;
+  std::unique_ptr<compiler::BackendResolver> _backend_resolver;
 };
 
 } // namespace graph
index aaf5c76..0ed1774 100644 (file)
@@ -20,7 +20,7 @@
 #include "graph/Graph.h"
 #include "backend/interface/IConfig.h"
 #include "logging.h"
-#include "codegen/BackendResolver.h"
+#include "compiler/BackendResolver.h"
 
 namespace neurun
 {
index 23225b0..5d61e74 100644 (file)
@@ -28,7 +28,7 @@
 #include "nnfw/std/memory.h"
 #include "graph/operation/PermuteNode.h"
 #include "graph/operand/Shape4DConvert.h"
-#include "codegen/BackendResolver.h"
+#include "compiler/BackendResolver.h"
 
 namespace neurun
 {