aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test
diff options
context:
space:
mode:
authorFrancis Murtagh <francis.murtagh@arm.com>2021-01-28 14:25:15 +0000
committerFrancis Murtagh <francis.murtagh@arm.com>2021-01-28 14:28:51 +0000
commit7909c53e3b91f96a12f2d587741575d4d1becdce (patch)
tree4b79f3b6256fd98d0521fb60f70a0a7d4c095cd6 /src/armnn/test
parentbbc876c0b7046d6cc3aa9a8d64f80a755027d0cf (diff)
downloadarmnn-7909c53e3b91f96a12f2d587741575d4d1becdce.tar.gz
IVGCVSW-4874 Provide LayerSupportHandle to frontend users
* Add test for new IsBackendRegistered member function of Handle * Move deprecated messages to new frontend API of LayerSupportHandle * Update delegate to use dot operator for IsXXXLayerSupported Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I70d7166e207a10e4b3583a827ca0dda2169bcba1 !android-nn-driver:4940
Diffstat (limited to 'src/armnn/test')
-rw-r--r--src/armnn/test/UtilsTests.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/armnn/test/UtilsTests.cpp b/src/armnn/test/UtilsTests.cpp
index fb078de32f..7776a2d3cf 100644
--- a/src/armnn/test/UtilsTests.cpp
+++ b/src/armnn/test/UtilsTests.cpp
@@ -5,6 +5,7 @@
#include <boost/test/unit_test.hpp>
+#include <armnn/BackendHelper.hpp>
#include <armnn/Utils.hpp>
#include <armnn/Types.hpp>
#include <armnn/TypesUtils.hpp>
@@ -266,4 +267,17 @@ BOOST_AUTO_TEST_CASE(PermuteQuantizationDim)
BOOST_CHECK(permuted.GetQuantizationDim().value() == 1U);
}
+#if defined(ARMNNREF_ENABLED)
+BOOST_AUTO_TEST_CASE(LayerSupportHandle)
+{
+ auto layerSupportObject = armnn::GetILayerSupportByBackendId("CpuRef");
+ armnn::TensorInfo input;
+ std::string reasonIfUnsupported;
+ // InputLayer always supported for CpuRef
+ BOOST_CHECK_EQUAL(layerSupportObject.IsInputSupported(input, reasonIfUnsupported), true);
+
+ BOOST_CHECK(layerSupportObject.IsBackendRegistered());
+}
+#endif
+
BOOST_AUTO_TEST_SUITE_END()