aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/ReduceTestHelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/test/ReduceTestHelper.hpp')
-rw-r--r--delegate/test/ReduceTestHelper.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/delegate/test/ReduceTestHelper.hpp b/delegate/test/ReduceTestHelper.hpp
index f6acdbc84f..5ec145e9e0 100644
--- a/delegate/test/ReduceTestHelper.hpp
+++ b/delegate/test/ReduceTestHelper.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
{
@@ -145,7 +141,6 @@ std::vector<char> CreateReduceTfLiteModel(tflite::BuiltinOperator reduceOperator
template <typename T>
void ReduceTest(tflite::BuiltinOperator reduceOperatorCode,
tflite::TensorType tensorType,
- std::vector<armnn::BackendId>& backends,
std::vector<int32_t>& input0Shape,
std::vector<int32_t>& input1Shape,
std::vector<int32_t>& expectedOutputShape,
@@ -153,6 +148,7 @@ void ReduceTest(tflite::BuiltinOperator reduceOperatorCode,
std::vector<int32_t>& input1Values,
std::vector<T>& expectedOutputValues,
const bool keepDims,
+ const std::vector<armnn::BackendId>& backends = {},
float quantScale = 1.0f,
int quantOffset = 0)
{
@@ -187,7 +183,7 @@ void ReduceTest(tflite::BuiltinOperator reduceOperatorCode,
std::vector<int32_t> tfLiteOutputShape = tfLiteInterpreter.GetOutputShape(0);
// Setup interpreter with Arm NN Delegate applied.
- auto armnnInterpreter = DelegateTestInterpreter(modelBufferArmNN, backends);
+ auto armnnInterpreter = DelegateTestInterpreter(modelBufferArmNN, CaptureAvailableBackends(backends));
CHECK(armnnInterpreter.AllocateTensors() == kTfLiteOk);
CHECK(armnnInterpreter.FillInputTensor<T>(input0Values, 0) == kTfLiteOk);
CHECK(armnnInterpreter.Invoke() == kTfLiteOk);