aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/test/RefLayerSupportTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/reference/test/RefLayerSupportTests.cpp')
-rw-r--r--src/backends/reference/test/RefLayerSupportTests.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/backends/reference/test/RefLayerSupportTests.cpp b/src/backends/reference/test/RefLayerSupportTests.cpp
index 2c7e17da43..0d99b3e66f 100644
--- a/src/backends/reference/test/RefLayerSupportTests.cpp
+++ b/src/backends/reference/test/RefLayerSupportTests.cpp
@@ -14,6 +14,7 @@
#include <backendsCommon/test/IsLayerSupportedTestImpl.hpp>
#include <boost/test/unit_test.hpp>
+#include <boost/algorithm/string/trim.hpp>
#include <string>
@@ -130,4 +131,28 @@ BOOST_AUTO_TEST_CASE(IsConvertFp32ToFp16SupportedFp32OutputReference)
BOOST_CHECK_EQUAL(reasonIfUnsupported, "Layer is not supported with float32 data type output");
}
+BOOST_AUTO_TEST_CASE(IsLayerSupportedMeanDimensionsReference)
+{
+ std::string reasonIfUnsupported;
+
+ bool result = IsMeanLayerSupportedTests<armnn::RefWorkloadFactory,
+ armnn::DataType::Float32, armnn::DataType::Float32>(reasonIfUnsupported);
+
+ BOOST_CHECK(result);
+}
+
+BOOST_AUTO_TEST_CASE(IsLayerNotSupportedMeanDimensionsReference)
+{
+ std::string reasonIfUnsupported;
+
+ bool result = IsMeanLayerNotSupportedTests<armnn::RefWorkloadFactory,
+ armnn::DataType::Float32, armnn::DataType::Float32>(reasonIfUnsupported);
+
+ BOOST_CHECK(!result);
+
+ boost::algorithm::trim(reasonIfUnsupported);
+ BOOST_CHECK_EQUAL(reasonIfUnsupported,
+ "Reference Mean: Expected 4 dimensions but got 2 dimensions instead, for the 'output' tensor.");
+}
+
BOOST_AUTO_TEST_SUITE_END()