diff options
Diffstat (limited to 'delegate/test/GatherTestHelper.hpp')
-rw-r--r-- | delegate/test/GatherTestHelper.hpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/delegate/test/GatherTestHelper.hpp b/delegate/test/GatherTestHelper.hpp index 5d24cdabce..e38b9a5557 100644 --- a/delegate/test/GatherTestHelper.hpp +++ b/delegate/test/GatherTestHelper.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 { @@ -115,7 +111,6 @@ std::vector<char> CreateGatherTfLiteModel(tflite::TensorType tensorType, template<typename T> void GatherTest(tflite::TensorType tensorType, - std::vector<armnn::BackendId>& backends, std::vector<int32_t>& paramsShape, std::vector<int32_t>& indicesShape, std::vector<int32_t>& expectedOutputShape, @@ -123,6 +118,7 @@ void GatherTest(tflite::TensorType tensorType, std::vector<T>& paramsValues, std::vector<int32_t>& indicesValues, std::vector<T>& expectedOutputValues, + const std::vector<armnn::BackendId>& backends = {}, float quantScale = 1.0f, int quantOffset = 0) { @@ -144,7 +140,7 @@ void GatherTest(tflite::TensorType tensorType, 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>(paramsValues, 0) == kTfLiteOk); CHECK(armnnInterpreter.FillInputTensor<int32_t>(indicesValues, 1) == kTfLiteOk); |