From 4ed669ae925db0868523f8d3bfc3566f422b34b0 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: Thu, 22 Nov 2018 12:49:23 +0900 Subject: [PATCH] Move ConstantInitializer into compiler (#3670) Move ConstantInitializer into compiler and fix namespace Signed-off-by: Hyeongseok Oh --- runtimes/neurun/src/compiler/Compiler.cc | 4 ++-- .../src/{codegen => compiler}/ConstantInitializer.cc | 4 ++-- .../neurun/src/{codegen => compiler}/ConstantInitializer.h | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) rename runtimes/neurun/src/{codegen => compiler}/ConstantInitializer.cc (99%) rename runtimes/neurun/src/{codegen => compiler}/ConstantInitializer.h (74%) diff --git a/runtimes/neurun/src/compiler/Compiler.cc b/runtimes/neurun/src/compiler/Compiler.cc index 5c88d43..eaa3522 100644 --- a/runtimes/neurun/src/compiler/Compiler.cc +++ b/runtimes/neurun/src/compiler/Compiler.cc @@ -18,10 +18,10 @@ #include "OperationValidator.h" #include "SubTensorAnalyzer.h" #include "PlanBuilder.h" +#include "ConstantInitializer.h" #include "graph/dumper/Dumper.h" #include "dumper/dot/DotDumper.h" -#include "codegen/ConstantInitializer.h" #include "graph/operation/LowerInfo.h" #include "linear/Linear.h" @@ -87,7 +87,7 @@ void Compiler::compile(void) // TODO Add optimization passes plan_builder.finalize(tensor_builders); - neurun::codegen::ConstantInitializer{graph, plan}(); + ConstantInitializer{graph, plan}(); } } // namespace compiler diff --git a/runtimes/neurun/src/codegen/ConstantInitializer.cc b/runtimes/neurun/src/compiler/ConstantInitializer.cc similarity index 99% rename from runtimes/neurun/src/codegen/ConstantInitializer.cc rename to runtimes/neurun/src/compiler/ConstantInitializer.cc index 1bc19f8..3e39f14 100644 --- a/runtimes/neurun/src/codegen/ConstantInitializer.cc +++ b/runtimes/neurun/src/compiler/ConstantInitializer.cc @@ -30,10 +30,10 @@ namespace neurun { -namespace codegen +namespace compiler { -ConstantInitializer::ConstantInitializer(const graph::Graph &graph, Plan &plan) +ConstantInitializer::ConstantInitializer(const graph::Graph &graph, codegen::Plan &plan) : _graph{graph}, _plan{plan} { } diff --git a/runtimes/neurun/src/codegen/ConstantInitializer.h b/runtimes/neurun/src/compiler/ConstantInitializer.h similarity index 74% rename from runtimes/neurun/src/codegen/ConstantInitializer.h rename to runtimes/neurun/src/compiler/ConstantInitializer.h index 6e4de87..d3ecdd2 100644 --- a/runtimes/neurun/src/codegen/ConstantInitializer.h +++ b/runtimes/neurun/src/compiler/ConstantInitializer.h @@ -14,30 +14,30 @@ * limitations under the License. */ -#ifndef __NEURUN_CODEGEN_CONSTANT_INITIALIZER_H__ -#define __NEURUN_CODEGEN_CONSTANT_INITIALIZER_H__ +#ifndef __NEURUN_COMPILER_CONSTANT_INITIALIZER_H__ +#define __NEURUN_COMPILER_CONSTANT_INITIALIZER_H__ #include "graph/Graph.h" #include "codegen/Plan.h" namespace neurun { -namespace codegen +namespace compiler { class ConstantInitializer { public: - ConstantInitializer(const graph::Graph &graph, Plan &plan); + ConstantInitializer(const graph::Graph &graph, codegen::Plan &plan); void operator()(); private: const graph::Graph &_graph; - Plan &_plan; + codegen::Plan &_plan; }; -} // namespace codegen +} // namespace compiler } // namespace neurun -#endif // __NEURUN_CODEGEN_CONSTANT_INITIALIZER_H__ +#endif // __NEURUN_COMPILER_CONSTANT_INITIALIZER_H__ -- 2.7.4