From 7909c53e3b91f96a12f2d587741575d4d1becdce Mon Sep 17 00:00:00 2001 From: Francis Murtagh Date: Thu, 28 Jan 2021 14:25:15 +0000 Subject: 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 Change-Id: I70d7166e207a10e4b3583a827ca0dda2169bcba1 !android-nn-driver:4940 --- src/armnn/test/UtilsTests.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/armnn/test/UtilsTests.cpp') 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 +#include #include #include #include @@ -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() -- cgit v1.2.1