aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/RedefineTestHelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/test/RedefineTestHelper.hpp')
-rw-r--r--delegate/test/RedefineTestHelper.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/delegate/test/RedefineTestHelper.hpp b/delegate/test/RedefineTestHelper.hpp
index c1838e01b1..076925afac 100644
--- a/delegate/test/RedefineTestHelper.hpp
+++ b/delegate/test/RedefineTestHelper.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020, 2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2020, 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
{
@@ -263,13 +259,13 @@ std::vector<char> CreateRedefineTfLiteModel(
template <typename T>
void RedefineTest(tflite::BuiltinOperator redefineOperatorCode,
tflite::TensorType tensorType,
- const std::vector<armnn::BackendId>& backends,
const std::vector<int32_t>& inputShape,
std::vector<int32_t>& outputShape,
std::vector<T>& inputValues,
std::vector<T>& expectedOutputValues,
std::vector<int32_t>& additionalData,
bool useOption = true,
+ const std::vector<armnn::BackendId>& backends = {},
float quantScale = 1.0f,
int quantOffset = 0)
{
@@ -317,7 +313,7 @@ void RedefineTest(tflite::BuiltinOperator redefineOperatorCode,
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.FillInputTensor<T>(inputValues, 0) == kTfLiteOk);
CHECK(armnnInterpreter.Invoke() == kTfLiteOk);