aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/QuantizationTestHelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/test/QuantizationTestHelper.hpp')
-rw-r--r--delegate/test/QuantizationTestHelper.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/delegate/test/QuantizationTestHelper.hpp b/delegate/test/QuantizationTestHelper.hpp
index 94290288b2..f8a6f8b4ea 100644
--- a/delegate/test/QuantizationTestHelper.hpp
+++ b/delegate/test/QuantizationTestHelper.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
{
@@ -122,11 +118,11 @@ template <typename InputT, typename OutputT>
void QuantizationTest(tflite::BuiltinOperator quantizeOperatorCode,
tflite::TensorType inputTensorType,
tflite::TensorType outputTensorType,
- std::vector<armnn::BackendId>& backends,
std::vector<int32_t>& inputShape,
std::vector<int32_t>& outputShape,
std::vector<InputT>& inputValues,
std::vector<OutputT>& expectedOutputValues,
+ const std::vector<armnn::BackendId>& backends = {},
float quantScale = 1.0f,
int quantOffset = 0)
{
@@ -148,7 +144,7 @@ void QuantizationTest(tflite::BuiltinOperator quantizeOperatorCode,
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(inputValues, 0) == kTfLiteOk);
CHECK(armnnInterpreter.Invoke() == kTfLiteOk);