Move OperationValidator into compiler (#3662)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Wed, 21 Nov 2018 08:27:17 +0000 (17:27 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 21 Nov 2018 08:27:17 +0000 (17:27 +0900)
Move OperationValidator into compiler directory
Fix namespace

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtimes/neurun/src/compiler/Compiler.cc
runtimes/neurun/src/compiler/OperationValidator.cc [moved from runtimes/neurun/src/codegen/OperationValidator.cc with 98% similarity]
runtimes/neurun/src/compiler/OperationValidator.h [moved from runtimes/neurun/src/codegen/OperationValidator.h with 90% similarity]

index 6468029..919e1ba 100644 (file)
  */
 
 #include "Compiler.h"
+#include "OperationValidator.h"
 #include "SubTensorAnalyzer.h"
 
 #include "graph/dumper/Dumper.h"
 #include "dumper/dot/DotDumper.h"
 #include "codegen/IPlanBuilder.h"
-#include "codegen/OperationValidator.h"
 #include "codegen/PlanBuilder.h"
 #include "codegen/ConstantInitializer.h"
 #include "graph/operation/LowerInfo.h"
@@ -72,7 +72,7 @@ void Compiler::compile(void)
 
   neurun::codegen::PlanBuilder plan_builder{plan};
 
-  linear->accept(neurun::codegen::OperationValidator{operands});
+  linear->accept(OperationValidator{operands});
 
   // Plan building
   linear->iterate([&](const neurun::graph::operation::Node *node) {
@@ -26,7 +26,7 @@
 
 namespace neurun
 {
-namespace codegen
+namespace compiler
 {
 
 void OperationValidator::visit(const graph::operation::Conv2DNode &)
@@ -123,5 +123,5 @@ void OperationValidator::visit(const graph::operation::AddNode &)
   // DO NOTHING
 }
 
-} // namespace codegen
+} // namespace compiler
 } // namespace neurun
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __NEURUN_CODEGEN_OPERATION_VALIDATOR_H__
-#define __NEURUN_CODEGEN_OPERATION_VALIDATOR_H__
+#ifndef __NEURUN_COMPILER_OPERATION_VALIDATOR_H__
+#define __NEURUN_COMPILER_OPERATION_VALIDATOR_H__
 
 #include "graph/operation/NodeVisitor.h"
 
@@ -32,7 +32,7 @@ class Set;
 
 namespace neurun
 {
-namespace codegen
+namespace compiler
 {
 
 class OperationValidator : public graph::operation::NodeVisitor
@@ -56,7 +56,7 @@ private:
   const neurun::graph::operand::Set &_ctx;
 };
 
-} // namespace codegen
+} // namespace compiler
 } // namespace neurun
 
-#endif // __NEURUN_CODEGEN_OPERATION_VALIDATOR_H__
+#endif // __NEURUN_COMPILER_OPERATION_VALIDATOR_H__