[Interp] Fix input/output setting (#5456)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 24 Jun 2019 08:03:40 +0000 (17:03 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Mon, 24 Jun 2019 08:03:40 +0000 (17:03 +0900)
Replace input/output tensor setting instead of using insert for multiple inference using one interpreter type executor

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtimes/neurun/core/src/exec/interp/ExecManager.cc
tests/nnapi/nnapi_gtest.skip.noarch.interp

index f2c940f..eecb701 100644 (file)
@@ -43,7 +43,7 @@ void ExecManager::setInput(const neurun::model::IOIndex &index, const neurun::mo
   auto input_tensor = std::make_shared<ROTensor>(info);
   input_tensor->setData(std::make_shared<const model::ExternalData>(
       reinterpret_cast<const uint8_t *>(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<ROTensor>(info);
   input_tensor->setData(std::make_shared<const model::ExternalData>(
       reinterpret_cast<const uint8_t *>(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<Tensor>(info);
   output_tensor->setBuffer(
       std::make_shared<ExternalBuffer>(reinterpret_cast<uint8_t *>(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<Tensor>(info);
   output_tensor->setBuffer(
       std::make_shared<ExternalBuffer>(reinterpret_cast<uint8_t *>(buffer), length));
-  _tensor_map.insert({output_index, output_tensor});
+  _tensor_map[output_index] = output_tensor;
 }
 
 void ExecManager::execute(void)
index 2fd2966..185f699 100644 (file)
@@ -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