From 9844021c804c9bc7ce80a1dd0877348f2f06ba7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Wed, 21 Nov 2018 17:27:17 +0900 Subject: [PATCH] Move OperationValidator into compiler (#3662) Move OperationValidator into compiler directory Fix namespace Signed-off-by: Hyeongseok Oh --- runtimes/neurun/src/compiler/Compiler.cc | 4 ++-- .../neurun/src/{codegen => compiler}/OperationValidator.cc | 4 ++-- runtimes/neurun/src/{codegen => compiler}/OperationValidator.h | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) rename runtimes/neurun/src/{codegen => compiler}/OperationValidator.cc (98%) rename runtimes/neurun/src/{codegen => compiler}/OperationValidator.h (90%) diff --git a/runtimes/neurun/src/compiler/Compiler.cc b/runtimes/neurun/src/compiler/Compiler.cc index 6468029..919e1ba 100644 --- a/runtimes/neurun/src/compiler/Compiler.cc +++ b/runtimes/neurun/src/compiler/Compiler.cc @@ -15,12 +15,12 @@ */ #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) { diff --git a/runtimes/neurun/src/codegen/OperationValidator.cc b/runtimes/neurun/src/compiler/OperationValidator.cc similarity index 98% rename from runtimes/neurun/src/codegen/OperationValidator.cc rename to runtimes/neurun/src/compiler/OperationValidator.cc index 9416edf..8c53c4a 100644 --- a/runtimes/neurun/src/codegen/OperationValidator.cc +++ b/runtimes/neurun/src/compiler/OperationValidator.cc @@ -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 diff --git a/runtimes/neurun/src/codegen/OperationValidator.h b/runtimes/neurun/src/compiler/OperationValidator.h similarity index 90% rename from runtimes/neurun/src/codegen/OperationValidator.h rename to runtimes/neurun/src/compiler/OperationValidator.h index a325bb0..6c8d205 100644 --- a/runtimes/neurun/src/codegen/OperationValidator.h +++ b/runtimes/neurun/src/compiler/OperationValidator.h @@ -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__ -- 2.7.4