// // Copyright © 2017 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #include #include #include #include #include #include #include #include #include namespace { bool LayerTypeMatchesTest() { return LayerTypeMatchesTestImpl(Tag()); }; } // anonymous namespace BOOST_AUTO_TEST_SUITE(RefLayerSupported) BOOST_AUTO_TEST_CASE(IsLayerSupportedLayerTypeMatches) { LayerTypeMatchesTest(); } BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat16Reference) { armnn::RefWorkloadFactory factory; IsLayerSupportedTests(&factory); } BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat32Reference) { armnn::RefWorkloadFactory factory; IsLayerSupportedTests(&factory); } BOOST_AUTO_TEST_CASE(IsLayerSupportedUint8Reference) { armnn::RefWorkloadFactory factory; IsLayerSupportedTests(&factory); } BOOST_AUTO_TEST_CASE(IsConvertFp16ToFp32SupportedReference) { std::string reasonIfUnsupported; bool result = IsConvertLayerSupportedTests(reasonIfUnsupported); BOOST_CHECK(result); } BOOST_AUTO_TEST_CASE(IsConvertFp16ToFp32SupportedFp32InputReference) { std::string reasonIfUnsupported; bool result = IsConvertLayerSupportedTests(reasonIfUnsupported); BOOST_CHECK(!result); BOOST_CHECK_EQUAL(reasonIfUnsupported, "Layer is not supported with float32 data type input"); } BOOST_AUTO_TEST_CASE(IsConvertFp16ToFp32SupportedFp16OutputReference) { std::string reasonIfUnsupported; bool result = IsConvertLayerSupportedTests(reasonIfUnsupported); BOOST_CHECK(!result); BOOST_CHECK_EQUAL(reasonIfUnsupported, "Layer is not supported with float16 data type output"); } BOOST_AUTO_TEST_CASE(IsConvertFp32ToFp16SupportedReference) { std::string reasonIfUnsupported; bool result = IsConvertLayerSupportedTests(reasonIfUnsupported); BOOST_CHECK(result); } BOOST_AUTO_TEST_CASE(IsConvertFp32ToFp16SupportedFp16InputReference) { std::string reasonIfUnsupported; bool result = IsConvertLayerSupportedTests(reasonIfUnsupported); BOOST_CHECK(!result); BOOST_CHECK_EQUAL(reasonIfUnsupported, "Layer is not supported with float16 data type input"); } BOOST_AUTO_TEST_CASE(IsConvertFp32ToFp16SupportedFp32OutputReference) { std::string reasonIfUnsupported; bool result = IsConvertLayerSupportedTests(reasonIfUnsupported); BOOST_CHECK(!result); BOOST_CHECK_EQUAL(reasonIfUnsupported, "Layer is not supported with float32 data type output"); } BOOST_AUTO_TEST_SUITE_END()