diff options
author | Matthew Bentham <matthew.bentham@arm.com> | 2022-11-16 10:59:12 +0000 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2022-12-13 12:04:36 +0000 |
commit | b4f5c23e2b815b3d6e26a260ab914fcf32d20afc (patch) | |
tree | 1f8fdbab11df0b6de75abc90c2641d4397eb3bbd /tests/ExecuteNetwork/ArmNNExecutor.cpp | |
parent | b30e6554ad41f21c8326e387aa2c1f8a5d4e6445 (diff) | |
download | armnn-b4f5c23e2b815b3d6e26a260ab914fcf32d20afc.tar.gz |
IVGCVSW-7365 Fix behaviour of --import-inputs-if-aligned in ExecuteNetwork
Move call to 'SetupInputAndOutputs' to after LoadedNetwork is available.
Change-Id: I101e297d1d7b2517011d4ef3f1a4927566845474
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Diffstat (limited to 'tests/ExecuteNetwork/ArmNNExecutor.cpp')
-rw-r--r-- | tests/ExecuteNetwork/ArmNNExecutor.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp index 943d3aad07..9657f05b6d 100644 --- a/tests/ExecuteNetwork/ArmNNExecutor.cpp +++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp @@ -26,7 +26,6 @@ ArmNNExecutor::ArmNNExecutor(const ExecuteNetworkParams& params, armnn::IRuntime auto optNet = OptimizeNetwork(network.get()); m_IOInfo = GetIOInfo(optNet.get()); - SetupInputsAndOutputs(); armnn::ProfilingDetailsMethod profilingDetailsMethod = ProfilingDetailsMethod::Undefined; if (params.m_OutputDetailsOnlyToStdOut) @@ -57,6 +56,8 @@ ArmNNExecutor::ArmNNExecutor(const ExecuteNetworkParams& params, armnn::IRuntime return; } + SetupInputsAndOutputs(); + if (m_Params.m_Iterations > 1) { std::stringstream msg; @@ -415,11 +416,12 @@ void ArmNNExecutor::SetupInputsAndOutputs() } } - if (m_Params.m_ImportInputsIfAligned) - { - m_ImportedInputIds.push_back( - m_Runtime->ImportInputs(m_NetworkId, m_InputTensorsVec.back(), armnn::MemorySource::Malloc)); - } + } + + if (m_Params.m_ImportInputsIfAligned) + { + m_ImportedInputIds.push_back( + m_Runtime->ImportInputs(m_NetworkId, inputTensors, armnn::MemorySource::Malloc)); } m_InputTensorsVec.emplace_back(inputTensors); } |