aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/PadTestHelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/test/PadTestHelper.hpp')
-rw-r--r--delegate/test/PadTestHelper.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/delegate/test/PadTestHelper.hpp b/delegate/test/PadTestHelper.hpp
index fefcec60a7..f5434740f3 100644
--- a/delegate/test/PadTestHelper.hpp
+++ b/delegate/test/PadTestHelper.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
{
@@ -160,7 +156,6 @@ std::vector<char> CreatePadTfLiteModel(
template <typename T>
void PadTest(tflite::BuiltinOperator padOperatorCode,
tflite::TensorType tensorType,
- const std::vector<armnn::BackendId>& backends,
const std::vector<int32_t>& inputShape,
const std::vector<int32_t>& paddingShape,
std::vector<int32_t>& outputShape,
@@ -168,6 +163,7 @@ void PadTest(tflite::BuiltinOperator padOperatorCode,
std::vector<int32_t>& paddingDim,
std::vector<T>& expectedOutputValues,
T paddingValue,
+ const std::vector<armnn::BackendId>& backends = {},
float quantScale = 1.0f,
int quantOffset = 0,
tflite::MirrorPadMode paddingMode = tflite::MirrorPadMode_SYMMETRIC)
@@ -193,7 +189,7 @@ void PadTest(tflite::BuiltinOperator padOperatorCode,
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);