aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/TransposeTestHelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/test/TransposeTestHelper.hpp')
-rw-r--r--delegate/test/TransposeTestHelper.hpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/delegate/test/TransposeTestHelper.hpp b/delegate/test/TransposeTestHelper.hpp
index d72bb7662e..c4c8ba718f 100644
--- a/delegate/test/TransposeTestHelper.hpp
+++ b/delegate/test/TransposeTestHelper.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
{
std::vector<char> CreateTransposeTfLiteModel(tflite::TensorType tensorType,
@@ -82,13 +78,13 @@ std::vector<char> CreateTransposeTfLiteModel(tflite::TensorType tensorType,
}
template <typename T>
-void TransposeTest(std::vector<armnn::BackendId>& backends,
- std::vector<int32_t>& inputShape,
+void TransposeTest(std::vector<int32_t>& inputShape,
std::vector<int32_t>& inputPermVecShape,
std::vector<int32_t>& outputShape,
std::vector<T>& inputValues,
std::vector<int32_t>& inputPermVec,
- std::vector<T>& expectedOutputValues)
+ std::vector<T>& expectedOutputValues,
+ const std::vector<armnn::BackendId>& backends = {})
{
using namespace delegateTestInterpreter;
@@ -109,7 +105,7 @@ void TransposeTest(std::vector<armnn::BackendId>& backends,
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.FillInputTensor<int32_t>(inputPermVec, 1) == kTfLiteOk);