From 699bd79cf039fa9a779317f339b343630a0ea62f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 24 Jun 2019 17:03:40 +0900 Subject: [PATCH] [Interp] Fix input/output setting (#5456) Replace input/output tensor setting instead of using insert for multiple inference using one interpreter type executor Signed-off-by: Hyeongseok Oh --- runtimes/neurun/core/src/exec/interp/ExecManager.cc | 8 ++++---- tests/nnapi/nnapi_gtest.skip.noarch.interp | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/runtimes/neurun/core/src/exec/interp/ExecManager.cc b/runtimes/neurun/core/src/exec/interp/ExecManager.cc index f2c940f..eecb701 100644 --- a/runtimes/neurun/core/src/exec/interp/ExecManager.cc +++ b/runtimes/neurun/core/src/exec/interp/ExecManager.cc @@ -43,7 +43,7 @@ void ExecManager::setInput(const neurun::model::IOIndex &index, const neurun::mo auto input_tensor = std::make_shared(info); input_tensor->setData(std::make_shared( reinterpret_cast(buffer), length)); - _tensor_map.insert({input_index, input_tensor}); + _tensor_map[input_index] = input_tensor; } void ExecManager::setInput(const neurun::model::IOIndex &index, const void *buffer, size_t length) @@ -59,7 +59,7 @@ void ExecManager::setInput(const neurun::model::IOIndex &index, const void *buff auto input_tensor = std::make_shared(info); input_tensor->setData(std::make_shared( reinterpret_cast(buffer), length)); - _tensor_map.insert({input_index, input_tensor}); + _tensor_map[input_index] = input_tensor; } void ExecManager::setOutput(const neurun::model::IOIndex &index, @@ -77,7 +77,7 @@ void ExecManager::setOutput(const neurun::model::IOIndex &index, auto output_tensor = std::make_shared(info); output_tensor->setBuffer( std::make_shared(reinterpret_cast(buffer), length)); - _tensor_map.insert({output_index, output_tensor}); + _tensor_map[output_index] = output_tensor; } void ExecManager::setOutput(const neurun::model::IOIndex &index, void *buffer, size_t length) @@ -93,7 +93,7 @@ void ExecManager::setOutput(const neurun::model::IOIndex &index, void *buffer, s auto output_tensor = std::make_shared(info); output_tensor->setBuffer( std::make_shared(reinterpret_cast(buffer), length)); - _tensor_map.insert({output_index, output_tensor}); + _tensor_map[output_index] = output_tensor; } void ExecManager::execute(void) diff --git a/tests/nnapi/nnapi_gtest.skip.noarch.interp b/tests/nnapi/nnapi_gtest.skip.noarch.interp index 2fd2966..185f699 100644 --- a/tests/nnapi/nnapi_gtest.skip.noarch.interp +++ b/tests/nnapi/nnapi_gtest.skip.noarch.interp @@ -71,7 +71,3 @@ GeneratedTests.transpose_conv* GeneratedTests.pack* GeneratedTests.unpack* GeneratedTests.logical_not_ex* -# Irregular test failure -GeneratedTests.conv_1* -GeneratedTests.conv_3* -GeneratedTests.depthwise_conv -- 2.7.4