aboutsummaryrefslogtreecommitdiff
path: root/delegate/test/DelegateOptionsTest.cpp
diff options
context:
space:
mode:
authorColm Donelan <colm.donelan@arm.com>2024-01-22 10:07:14 +0000
committerTeresaARM <teresa.charlinreyes@arm.com>2024-02-07 15:37:05 +0000
commit7bcae3c835468d9b0770514dc7127f02d47cec5f (patch)
tree03fe2da7324715be89c1c0ba476b083558c158ed /delegate/test/DelegateOptionsTest.cpp
parenta52bca23d225144e92f521341718a70489d5c217 (diff)
downloadarmnn-7bcae3c835468d9b0770514dc7127f02d47cec5f.tar.gz
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 <colm.donelan@arm.com> Change-Id: I6dd0369491c4582b8e2467b911dfd085dddcf576
Diffstat (limited to 'delegate/test/DelegateOptionsTest.cpp')
-rw-r--r--delegate/test/DelegateOptionsTest.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/delegate/test/DelegateOptionsTest.cpp b/delegate/test/DelegateOptionsTest.cpp
index 349e5d0692..7724f916d4 100644
--- a/delegate/test/DelegateOptionsTest.cpp
+++ b/delegate/test/DelegateOptionsTest.cpp
@@ -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
//
@@ -7,6 +7,8 @@
#include <common/include/ProfilingGuid.hpp>
#include <armnnUtils/Filesystem.hpp>
+#include <doctest/doctest.h>
+
namespace armnnDelegate
{
@@ -229,7 +231,13 @@ TEST_CASE ("ArmnnDelegateModelOptions_CpuAcc_Test")
armnn::OptimizerOptionsOpaque optimizerOptions(false, false, false,
false, modelOptions, false);
- armnnDelegate::DelegateOptions delegateOptions(backends, optimizerOptions);
+ std::vector<armnn::BackendId> availableBackends = CaptureAvailableBackends(backends);
+ // It's possible that CpuAcc isn't supported. In that case availableBackends will be empty.
+ if (availableBackends.empty())
+ {
+ return;
+ }
+ armnnDelegate::DelegateOptions delegateOptions(availableBackends, optimizerOptions);
DelegateOptionTest<float>(::tflite::TensorType_FLOAT32,
tensorShape,