aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/ShapeTestHelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/test/ShapeTestHelper.hpp')
-rw-r--r--delegate/test/ShapeTestHelper.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/delegate/test/ShapeTestHelper.hpp b/delegate/test/ShapeTestHelper.hpp
index 1d1da2fa51..b9ab58813c 100644
--- a/delegate/test/ShapeTestHelper.hpp
+++ b/delegate/test/ShapeTestHelper.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2021, 2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2021, 2023-2024 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -10,12 +10,8 @@
#include <armnn_delegate.hpp>
#include <DelegateTestInterpreter.hpp>
-#include <flatbuffers/flatbuffers.h>
-#include <tensorflow/lite/kernels/register.h>
#include <tensorflow/lite/version.h>
-#include <doctest/doctest.h>
-
namespace
{
std::vector<char> CreateShapeTfLiteModel(tflite::TensorType inputTensorType,
@@ -104,11 +100,11 @@ std::vector<char> CreateShapeTfLiteModel(tflite::TensorType inputTensorType,
template<typename T, typename K>
void ShapeTest(tflite::TensorType inputTensorType,
tflite::TensorType outputTensorType,
- std::vector<armnn::BackendId>& backends,
std::vector<int32_t>& inputShape,
std::vector<T>& inputValues,
std::vector<K>& expectedOutputValues,
std::vector<int32_t>& expectedOutputShape,
+ const std::vector<armnn::BackendId>& backends = {},
float quantScale = 1.0f,
int quantOffset = 0)
{
@@ -128,7 +124,7 @@ void ShapeTest(tflite::TensorType inputTensorType,
std::vector<int32_t> tfLiteOutputShape = tfLiteInterpreter.GetOutputShape(0);
// Setup interpreter with Arm NN Delegate applied.
- auto armnnInterpreter = DelegateTestInterpreter(modelBuffer, backends);
+ auto armnnInterpreter = DelegateTestInterpreter(modelBuffer, CaptureAvailableBackends(backends));
CHECK(armnnInterpreter.AllocateTensors() == kTfLiteOk);
CHECK(armnnInterpreter.Invoke() == kTfLiteOk);
std::vector<K> armnnOutputValues = armnnInterpreter.GetOutputResult<K>(0);