From a802c6724c52230d42d93a40a3a8a349484032ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EA=B9=80=EC=9A=A9=EC=84=AD/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 26 Jul 2019 16:32:40 +0900 Subject: [PATCH] [neurun] Remove unnecessary methods of ITensorBuilder (#5923) Remove unnecessary methods of ITensorBuilder, cpu/TensorBuilder and TemplTensorBuilder Signed-off-by: Yongseop Kim --- .../neurun/backend/acl_common/TemplTensorBuilder.h | 62 ---------------------- runtimes/neurun/backend/cpu/TensorBuilder.cc | 37 ------------- runtimes/neurun/backend/cpu/TensorBuilder.h | 8 --- .../neurun/core/include/backend/ITensorBuilder.h | 8 --- 4 files changed, 115 deletions(-) diff --git a/runtimes/neurun/backend/acl_common/TemplTensorBuilder.h b/runtimes/neurun/backend/acl_common/TemplTensorBuilder.h index 93b3f11..f10b342 100644 --- a/runtimes/neurun/backend/acl_common/TemplTensorBuilder.h +++ b/runtimes/neurun/backend/acl_common/TemplTensorBuilder.h @@ -77,14 +77,6 @@ public: void preVisit(const model::Operation &node) override; void postVisit(const model::Operation &node) override; - // TODO Consider removing after #5642 fixes - void registerModelObject(const model::OperandIndex &ind, const model::Operand &obj) override; - void markConstant(const model::OperandIndex &ind) override; - bool isConstant(const model::OperandIndex &ind) override; - void deallocateConstants(void) override; - void notifyFirstUseIf(const model::OperandIndex &ind) override; - void notifyLastUseIf(const model::OperandIndex &ind) override; - std::unique_ptr releaseMemoryManager(void) override; std::shared_ptr at(const ::neurun::model::OperandIndex &ind); @@ -559,60 +551,6 @@ void TemplTensorBuilder::validate(vo [](std::pair it) { return it.second == 0; })); } -// TODO Consider removing after #5642 fixes -template -void TemplTensorBuilder::registerModelObject( - const model::OperandIndex &ind, const model::Operand &obj) -{ - // TODO Fill this - (void)ind; - (void)obj; -} - -// TODO Consider removing after #5642 fixes -template -void TemplTensorBuilder::markConstant( - const model::OperandIndex &ind) -{ - // TODO Fill this - (void)ind; -} - -// TODO Consider removing after #5642 fixes -template -bool TemplTensorBuilder::isConstant( - const model::OperandIndex &ind) -{ - // TODO Fill this - (void)ind; - return false; -} - -// TODO Consider removing after #5642 fixes -template -void TemplTensorBuilder::deallocateConstants() -{ - // TODO Fill this -} - -// TODO Consider removing after #5642 fixes -template -void TemplTensorBuilder::notifyFirstUseIf( - const model::OperandIndex &ind) -{ - // TODO Fill this - (void)ind; -} - -// TODO Consider removing after #5642 fixes -template -void TemplTensorBuilder::notifyLastUseIf( - const model::OperandIndex &ind) -{ - // TODO Fill this - (void)ind; -} - } // namespace acl_common } // namespace backend } // namespace neurun diff --git a/runtimes/neurun/backend/cpu/TensorBuilder.cc b/runtimes/neurun/backend/cpu/TensorBuilder.cc index dd8d1ba..17115e5 100644 --- a/runtimes/neurun/backend/cpu/TensorBuilder.cc +++ b/runtimes/neurun/backend/cpu/TensorBuilder.cc @@ -95,43 +95,6 @@ std::unique_ptr TensorBuilder::releaseMemoryManager(void) return std::move(_mem_mgr); } -void TensorBuilder::registerModelObject(const model::OperandIndex &ind, const model::Operand &obj) -{ - // TODO Fill this - (void)ind; - (void)obj; -} - -void TensorBuilder::markConstant(const model::OperandIndex &ind) -{ - // TODO Fill this - (void)ind; -} - -bool TensorBuilder::isConstant(const model::OperandIndex &ind) -{ - // TODO Fill this - (void)ind; - return false; -} - -void TensorBuilder::deallocateConstants(void) -{ - // DO NOTHING -} - -void TensorBuilder::notifyFirstUseIf(const model::OperandIndex &ind) -{ - VERBOSE(CPU_TensorBuilder) << "notifyFirstUseIf()... skip operand #" << ind.value() << std::endl; - // DO NOTHING -} - -void TensorBuilder::notifyLastUseIf(const model::OperandIndex &ind) -{ - VERBOSE(CPU_TensorBuilder) << "notifyLastUseIf()... skip operand #" << ind.value() << std::endl; - // DO NOTHING -} - } // namespace cpu } // namespace backend } // namespace neurun diff --git a/runtimes/neurun/backend/cpu/TensorBuilder.h b/runtimes/neurun/backend/cpu/TensorBuilder.h index 463cbd6..67187fc 100644 --- a/runtimes/neurun/backend/cpu/TensorBuilder.h +++ b/runtimes/neurun/backend/cpu/TensorBuilder.h @@ -71,14 +71,6 @@ public: void preVisit(const model::Operation &) override {} void postVisit(const model::Operation &) override {} - // TODO Consider removing after #5642 fixes - void registerModelObject(const model::OperandIndex &ind, const model::Operand &obj) override; - void markConstant(const model::OperandIndex &ind) override; - bool isConstant(const model::OperandIndex &ind) override; - void deallocateConstants(void) override; - void notifyFirstUseIf(const model::OperandIndex &) override; - void notifyLastUseIf(const model::OperandIndex &) override; - std::unique_ptr releaseMemoryManager(void) override; std::shared_ptr at(const ::neurun::model::OperandIndex &ind); diff --git a/runtimes/neurun/core/include/backend/ITensorBuilder.h b/runtimes/neurun/core/include/backend/ITensorBuilder.h index f2650b1..8c70366 100644 --- a/runtimes/neurun/core/include/backend/ITensorBuilder.h +++ b/runtimes/neurun/core/include/backend/ITensorBuilder.h @@ -65,14 +65,6 @@ struct ITensorBuilder virtual void preVisit(const model::Operation &) = 0; virtual void postVisit(const model::Operation &) = 0; - // TODO Consider removing after #5642 fixes - virtual void registerModelObject(const model::OperandIndex &, const model::Operand &) = 0; - virtual void markConstant(const model::OperandIndex &) = 0; - virtual bool isConstant(const model::OperandIndex &) = 0; - virtual void deallocateConstants(void) = 0; - virtual void notifyFirstUseIf(const model::OperandIndex &) = 0; - virtual void notifyLastUseIf(const model::OperandIndex &) = 0; - virtual std::unique_ptr releaseMemoryManager(void) = 0; }; -- 2.7.4