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/ShapeTestHelper.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'delegate/test/ShapeTestHelper.hpp') diff --git a/delegate/test/ShapeTestHelper.hpp b/delegate/test/ShapeTestHelper.hpp index 1d1da2fa51..b9ab58813c 100644 --- a/delegate/test/ShapeTestHelper.hpp +++ b/delegate/test/ShapeTestHelper.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2021, 2023 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2021, 2023-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -10,12 +10,8 @@ #include #include -#include -#include #include -#include - namespace { std::vector CreateShapeTfLiteModel(tflite::TensorType inputTensorType, @@ -104,11 +100,11 @@ std::vector CreateShapeTfLiteModel(tflite::TensorType inputTensorType, template void ShapeTest(tflite::TensorType inputTensorType, tflite::TensorType outputTensorType, - std::vector& backends, std::vector& inputShape, std::vector& inputValues, std::vector& expectedOutputValues, std::vector& expectedOutputShape, + const std::vector& backends = {}, float quantScale = 1.0f, int quantOffset = 0) { @@ -128,7 +124,7 @@ void ShapeTest(tflite::TensorType inputTensorType, 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.Invoke() == kTfLiteOk); std::vector armnnOutputValues = armnnInterpreter.GetOutputResult(0); -- cgit v1.2.1