2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
6 #include "NeonWorkloadFactoryHelper.hpp"
8 #include <layers/ConvertFp16ToFp32Layer.hpp>
9 #include <layers/ConvertFp32ToFp16Layer.hpp>
10 #include <test/TensorHelpers.hpp>
12 #include <backendsCommon/CpuTensorHandle.hpp>
13 #include <neon/NeonWorkloadFactory.hpp>
14 #include <backendsCommon/test/IsLayerSupportedTestImpl.hpp>
15 #include <backendsCommon/test/LayerTests.hpp>
17 #include <boost/test/unit_test.hpp>
21 BOOST_AUTO_TEST_SUITE(NeonLayerSupport)
23 BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat16Neon)
25 armnn::NeonWorkloadFactory factory =
26 NeonWorkloadFactoryHelper::GetFactory(NeonWorkloadFactoryHelper::GetMemoryManager());
27 IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float16>(&factory);
30 BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat32Neon)
32 armnn::NeonWorkloadFactory factory =
33 NeonWorkloadFactoryHelper::GetFactory(NeonWorkloadFactoryHelper::GetMemoryManager());
34 IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float32>(&factory);
37 BOOST_AUTO_TEST_CASE(IsLayerSupportedUint8Neon)
39 armnn::NeonWorkloadFactory factory =
40 NeonWorkloadFactoryHelper::GetFactory(NeonWorkloadFactoryHelper::GetMemoryManager());
41 IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::QuantisedAsymm8>(&factory);
44 BOOST_AUTO_TEST_CASE(IsConvertFp16ToFp32SupportedNeon)
46 std::string reasonIfUnsupported;
48 bool result = IsConvertLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::ConvertFp16ToFp32Layer,
49 armnn::DataType::Float16, armnn::DataType::Float32>(reasonIfUnsupported);
54 BOOST_AUTO_TEST_CASE(IsConvertFp32ToFp16SupportedNeon)
56 std::string reasonIfUnsupported;
58 bool result = IsConvertLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::ConvertFp32ToFp16Layer,
59 armnn::DataType::Float32, armnn::DataType::Float16>(reasonIfUnsupported);
64 BOOST_AUTO_TEST_CASE(IsMeanSupportedNeon)
66 std::string reasonIfUnsupported;
68 bool result = IsMeanLayerSupportedTests<armnn::NeonWorkloadFactory,
69 armnn::DataType::Float32, armnn::DataType::Float32>(reasonIfUnsupported);
74 BOOST_AUTO_TEST_SUITE_END()