From 62e7fc58979b5f716620d7f177a1cee81ce27e55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EA=B9=80=EC=88=98=EC=A7=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Wed, 11 Apr 2018 10:51:24 +0900 Subject: [PATCH] Remove functions used in only ExecutionPlan in ExecutionBuilder (#546) This commit removes functions used in only ExecutionPlan in ExecutionBuilder Signed-off-by: sjsujinkim --- src/runtime/ref/nn/runtime/ExecutionBuilder.cpp | 22 ---------------------- src/runtime/ref/nn/runtime/ExecutionBuilder.h | 19 ------------------- 2 files changed, 41 deletions(-) diff --git a/src/runtime/ref/nn/runtime/ExecutionBuilder.cpp b/src/runtime/ref/nn/runtime/ExecutionBuilder.cpp index 7560768..2c8d380 100644 --- a/src/runtime/ref/nn/runtime/ExecutionBuilder.cpp +++ b/src/runtime/ref/nn/runtime/ExecutionBuilder.cpp @@ -72,18 +72,6 @@ int ModelArgumentInfo::setFromMemory(const Operand& operand, const ANeuralNetwor return ANEURALNETWORKS_NO_ERROR; } -#if 0 // REF-ANN -int ModelArgumentInfo::setFromTemporaryMemory(const Operand& operand, - uint32_t poolIndex, uint32_t offset) { - dimensions = operand.dimensions; - state = ModelArgumentInfo::MEMORY; - locationAndLength = - {.poolIndex = poolIndex, .offset = offset, .length = sizeOfData(operand)}; - buffer = nullptr; - return ANEURALNETWORKS_NO_ERROR; -} - -#endif int ModelArgumentInfo::updateDimensionInfo(const Operand& operand, const ANeuralNetworksOperandType* newType) { if (newType == nullptr) { @@ -482,16 +470,6 @@ void StepExecutor::mapInputOrOutput(const ModelArgumentInfo& builderInputOrOutpu } } -int StepExecutor::setInputOrOutputFromTemporaryMemory(const Operand& inputOrOutputOperand, - const Memory* memory, uint32_t offset, - ModelArgumentInfo* inputOrOutputInfo) { - // Should be similar to - // ExecutionBuilder::setInputFromMemory() - // ExecutionBuilder::setOutputFromMemory() - - uint32_t poolIndex = mMemories.add(memory); - return inputOrOutputInfo->setFromTemporaryMemory(inputOrOutputOperand, poolIndex, offset); -} #endif // REF-ANN int StepExecutor::startCompute(sp* synchronizationCallback) { #if 0 // REF-ANN diff --git a/src/runtime/ref/nn/runtime/ExecutionBuilder.h b/src/runtime/ref/nn/runtime/ExecutionBuilder.h index 9b34855..c6dd929 100644 --- a/src/runtime/ref/nn/runtime/ExecutionBuilder.h +++ b/src/runtime/ref/nn/runtime/ExecutionBuilder.h @@ -67,9 +67,6 @@ struct ModelArgumentInfo { uint32_t length); int setFromMemory(const Operand& operand, const ANeuralNetworksOperandType* type, uint32_t poolIndex, uint32_t offset, uint32_t length); -#if 0 // REF-ANN - int setFromTemporaryMemory(const Operand& operand, uint32_t poolIndex, uint32_t offset); -#endif int updateDimensionInfo(const Operand& operand, const ANeuralNetworksOperandType* newType); }; @@ -150,18 +147,6 @@ public: &mOutputs[executorIndex]); } - // The input or output is assumed to have the size of the - // corresponding operand. - int setInputFromTemporaryMemory(uint32_t inputIndex, const Memory* memory, uint32_t offset) { - return setInputOrOutputFromTemporaryMemory(mModel->getInputOperand(inputIndex), - memory, offset, - &mInputs.at(inputIndex)); - } - int setOutputFromTemporaryMemory(uint32_t outputIndex, const Memory* memory, uint32_t offset) { - return setInputOrOutputFromTemporaryMemory(mModel->getOutputOperand(outputIndex), - memory, offset, - &mOutputs.at(outputIndex)); - } #endif // REF-ANN // Executes using the (driver, preparedModel) specified at construction time. int startCompute(sp* synchronizationCallback); @@ -179,10 +164,6 @@ private: void mapInputOrOutput(const ModelArgumentInfo& builderInputOrOutput, ModelArgumentInfo* executorInputOrOutput); - int setInputOrOutputFromTemporaryMemory(const Operand& inputOrOutputOperand, - const Memory* memory, uint32_t offset, - ModelArgumentInfo* inputOrOutputInfo); - // describes the full (possibly multiple-"step") execution #endif // REF-ANN private: -- 2.7.4