aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCathal Corbett <cathal.corbett@arm.com>2022-05-24 17:25:57 +0100
committerCathal Corbett <cathal.corbett@arm.com>2022-05-24 17:25:57 +0100
commit5ee069ef6c4e7002ddc19ade8a1fbca7ba027d68 (patch)
tree1434cfcc417f1aba2b4e6ef5d241d3c4e7f06624 /tests
parent51b8c318c884106f03aa46fa6a130827b7bb3d02 (diff)
downloadarmnn-5ee069ef6c4e7002ddc19ade8a1fbca7ba027d68.tar.gz
IVGCVSW-6255 Investigate and fix running mobilebert with the TfLiteDelegate (CpuRef)
* Fixed bug occuring in Ref Gather Workload. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I3ee79f475fd9909bfbd4afb58f698439f26d6d65
Diffstat (limited to 'tests')
-rw-r--r--tests/ExecuteNetwork/ExecuteNetwork.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp
index f0a3d0821e..153fe5bcc7 100644
--- a/tests/ExecuteNetwork/ExecuteNetwork.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp
@@ -110,16 +110,14 @@ int TfLiteDelegateMainImpl(const ExecuteNetworkParams& params, const armnn::IRun
std::cout << "Running on TfLite without ArmNN delegate\n";
}
- // Load (or generate) input data for inference
- armnn::Optional<std::string> dataFile = params.m_GenerateTensorData
- ? armnn::EmptyOptional()
- : armnn::MakeOptional<std::string>(params.m_InputTensorDataFilePaths[0]);
-
const size_t numInputs = params.m_InputNames.size();
-
// Populate input tensor of interpreter
for(unsigned int inputIndex = 0; inputIndex < numInputs; ++inputIndex)
{
+ // Load (or generate) input data for inference
+ armnn::Optional<std::string> dataFile = params.m_GenerateTensorData ? armnn::EmptyOptional() :
+ armnn::MakeOptional<std::string>(params.m_InputTensorDataFilePaths[inputIndex]);
+
int input = tfLiteInterpreter->inputs()[inputIndex];
TfLiteIntArray* inputDims = tfLiteInterpreter->tensor(input)->dims;