From 7bcae3c835468d9b0770514dc7127f02d47cec5f Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Mon, 22 Jan 2024 10:07:14 +0000 Subject: IVGCVSW-7675 Rework more DelegateUnitTests so backends are subcases. The intent of this change is to remove the per backend test cases in the delegate unit tests. They will be replaced by using DocTest SUBCASES. The sub cases are paramaterized by the available backends. The list of available backends are determined by the compilation flags. Signed-off-by: Colm Donelan Change-Id: I6dd0369491c4582b8e2467b911dfd085dddcf576 --- delegate/test/RedefineTestHelper.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'delegate/test/RedefineTestHelper.hpp') diff --git a/delegate/test/RedefineTestHelper.hpp b/delegate/test/RedefineTestHelper.hpp index c1838e01b1..076925afac 100644 --- a/delegate/test/RedefineTestHelper.hpp +++ b/delegate/test/RedefineTestHelper.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 #include -#include -#include #include -#include - namespace { @@ -263,13 +259,13 @@ std::vector CreateRedefineTfLiteModel( template void RedefineTest(tflite::BuiltinOperator redefineOperatorCode, tflite::TensorType tensorType, - const std::vector& backends, const std::vector& inputShape, std::vector& outputShape, std::vector& inputValues, std::vector& expectedOutputValues, std::vector& additionalData, bool useOption = true, + const std::vector& backends = {}, float quantScale = 1.0f, int quantOffset = 0) { @@ -317,7 +313,7 @@ void RedefineTest(tflite::BuiltinOperator redefineOperatorCode, std::vector 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); -- cgit v1.2.1