aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCathal Corbett <cathal.corbett@arm.com>2022-10-20 16:01:35 +0100
committerCathal Corbett <cathal.corbett@arm.com>2022-10-25 09:32:51 +0000
commit6c95836e894f88c4bab6b22f974341f0dd2dddaa (patch)
treecb57fdd7b7e438ddf2162402f28ea838182d9c84
parent2d273bf8487f455117b5d5d28c304b9c663feb51 (diff)
downloadarmnn-6c95836e894f88c4bab6b22f974341f0dd2dddaa.tar.gz
IVGCVSW-7282 Issues in ExNet when iterations and number of inputs do not match
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ib30fc633a10b6ff8090b50314278fe5dc46fb250
-rw-r--r--tests/ExecuteNetwork/ArmNNExecutor.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp
index 330a239763..fe8443791b 100644
--- a/tests/ExecuteNetwork/ArmNNExecutor.cpp
+++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp
@@ -304,6 +304,17 @@ void ArmNNExecutor::SetupInputsAndOutputs()
" not compatible with number of inputs: " + std::to_string(noOfInputs));
}
noInputSets = inputFilePaths / noOfInputs;
+ // use the same inputSet per iteration or
+ // there should be a 1:1 mapping between inputSets and iterations
+ if (noInputSets != 1 ||
+ noInputSets != m_Params.m_Iterations)
+ {
+ LogAndThrow("The input model accepts " + std::to_string(noOfInputs) + " inputs. "
+ + std::to_string(inputFilePaths) + " input-tensor-data file paths have been provided. "
+ "ExecuteNetwork expects to perform " + std::to_string(noInputSets) + " inference(s) but "
+ "the iterations number provided is " + std::to_string(m_Params.m_Iterations) + "."
+ "Please amend the iterations or input-tensor-data parameter.");
+ }
if (noInputSets != 1 && m_Params.m_ReuseBuffers)
{
LogAndThrow("Specifying multiple sets of inputs not compatible with ReuseBuffers");