From: 김수진/동작제어Lab(SR)/Engineer/삼성전자 Date: Wed, 11 Apr 2018 01:51:24 +0000 (+0900) Subject: Remove functions used in only ExecutionPlan in ExecutionBuilder (#546) X-Git-Tag: 0.1~342 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62e7fc58979b5f716620d7f177a1cee81ce27e55;p=platform%2Fcore%2Fml%2Fnnfw.git Remove functions used in only ExecutionPlan in ExecutionBuilder (#546) This commit removes functions used in only ExecutionPlan in ExecutionBuilder Signed-off-by: sjsujinkim --- 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: