aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2021-05-26 18:38:12 +0100
committerFinn Williams <Finn.Williams@arm.com>2021-06-09 17:18:10 +0100
commitb9af86ea42568ade799ee5529137e4756977b6c6 (patch)
tree261003078fd2191b22ee7465e07668cbed666553 /src/armnn/test
parent5b1bcc93820b442bc4035c1e030a8d4a0983df91 (diff)
downloadarmnn-b9af86ea42568ade799ee5529137e4756977b6c6.tar.gz
IVGCVSW-5855 Refactor the reporting of capabilities from backends
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I05fc331a8e91bdcb6b8a2f32cfb555060fc5d797
Diffstat (limited to 'src/armnn/test')
-rw-r--r--src/armnn/test/OptimizerTests.cpp8
-rw-r--r--src/armnn/test/UtilsTests.cpp12
2 files changed, 6 insertions, 14 deletions
diff --git a/src/armnn/test/OptimizerTests.cpp b/src/armnn/test/OptimizerTests.cpp
index fcfff1a807..7fe69a9380 100644
--- a/src/armnn/test/OptimizerTests.cpp
+++ b/src/armnn/test/OptimizerTests.cpp
@@ -615,11 +615,15 @@ public:
BOOST_AUTO_TEST_CASE(BackendCapabilityTest)
{
BackendId backendId = "MockBackend";
+
+ armnn::BackendOptions::BackendOption nonConstWeights{"NonConstWeights", true};
+
// MockBackend does not support the NonConstWeights capability
- BOOST_CHECK(!armnn::IsCapabilitySupported(backendId, armnn::BackendCapability::NonConstWeights));
+ BOOST_CHECK(!armnn::HasCapability(nonConstWeights, backendId));
+ BOOST_CHECK(!armnn::HasCapability("NonConstWeights", backendId));
// MockBackend does not support the AsyncExecution capability
- BOOST_CHECK(!armnn::IsCapabilitySupported(backendId, armnn::BackendCapability::AsyncExecution));
+ BOOST_CHECK(!armnn::GetCapability("AsyncExecution", backendId).has_value());
}
BOOST_AUTO_TEST_CASE(BackendHintTest)
diff --git a/src/armnn/test/UtilsTests.cpp b/src/armnn/test/UtilsTests.cpp
index 77883ba4fb..f2ca95d7bd 100644
--- a/src/armnn/test/UtilsTests.cpp
+++ b/src/armnn/test/UtilsTests.cpp
@@ -321,18 +321,6 @@ BOOST_AUTO_TEST_CASE(LayerSupportHandle)
BOOST_CHECK(layerSupportObject.IsBackendRegistered());
}
-
-BOOST_AUTO_TEST_CASE(IsCapabilitySupported_CpuRef)
-{
- BOOST_CHECK(armnn::IsCapabilitySupported(armnn::Compute::CpuRef, armnn::BackendCapability::NonConstWeights));
-}
-#endif
-
-#if defined(ARMCOMPUTENEON_ENABLED)
-BOOST_AUTO_TEST_CASE(IsCapabilitySupported_CpuAcc)
-{
- BOOST_CHECK(!armnn::IsCapabilitySupported(armnn::Compute::CpuAcc, armnn::BackendCapability::NonConstWeights));
-}
#endif
BOOST_AUTO_TEST_SUITE_END()