aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/ReverseV2TestHelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/test/ReverseV2TestHelper.hpp')
-rw-r--r--delegate/test/ReverseV2TestHelper.hpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/delegate/test/ReverseV2TestHelper.hpp b/delegate/test/ReverseV2TestHelper.hpp
index 82f0bd700c..eeb0920b25 100644
--- a/delegate/test/ReverseV2TestHelper.hpp
+++ b/delegate/test/ReverseV2TestHelper.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 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>
-
-
namespace
{
std::vector<char> CreateReverseV2TfLiteModel(tflite::BuiltinOperator operatorCode,
@@ -101,13 +97,13 @@ namespace
}
void ReverseV2FP32TestImpl(tflite::BuiltinOperator operatorCode,
- std::vector<armnn::BackendId>& backends,
std::vector<float>& inputValues,
std::vector<int32_t> inputShape,
std::vector<int32_t> axisValues,
std::vector<int32_t> axisShapeDims,
std::vector<float>& expectedOutputValues,
- std::vector<int32_t> expectedOutputShape)
+ std::vector<int32_t> expectedOutputShape,
+ const std::vector<armnn::BackendId>& backends = {})
{
using namespace delegateTestInterpreter;
@@ -128,7 +124,7 @@ namespace
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<float>(inputValues, 0) == kTfLiteOk);
CHECK(armnnInterpreter.FillInputTensor<int32_t>(axisValues, 1) == kTfLiteOk);