IVGCVSW-1946: Remove armnn/src from the include paths
[platform/upstream/armnn.git] / src / backends / neon / test / NeonLayerSupportTests.cpp
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5
6 #include <layers/ConvertFp16ToFp32Layer.hpp>
7 #include <layers/ConvertFp32ToFp16Layer.hpp>
8 #include <test/TensorHelpers.hpp>
9
10 #include <backendsCommon/CpuTensorHandle.hpp>
11 #include <neon/NeonWorkloadFactory.hpp>
12 #include <backendsCommon/test/IsLayerSupportedTestImpl.hpp>
13 #include <backendsCommon/test/LayerTests.hpp>
14
15 #include <boost/test/unit_test.hpp>
16
17 #include <string>
18
19 BOOST_AUTO_TEST_SUITE(NeonLayerSupport)
20
21 BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat16Neon)
22 {
23     armnn::NeonWorkloadFactory factory;
24     IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float16>(&factory);
25 }
26
27 BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat32Neon)
28 {
29     armnn::NeonWorkloadFactory factory;
30     IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float32>(&factory);
31 }
32
33 BOOST_AUTO_TEST_CASE(IsLayerSupportedUint8Neon)
34 {
35     armnn::NeonWorkloadFactory factory;
36     IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::QuantisedAsymm8>(&factory);
37 }
38
39 BOOST_AUTO_TEST_CASE(IsConvertFp16ToFp32SupportedNeon)
40 {
41     std::string reasonIfUnsupported;
42
43     bool result = IsConvertLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::ConvertFp16ToFp32Layer,
44       armnn::DataType::Float16, armnn::DataType::Float32>(reasonIfUnsupported);
45
46     BOOST_CHECK(result);
47 }
48
49 BOOST_AUTO_TEST_CASE(IsConvertFp32ToFp16SupportedNeon)
50 {
51     std::string reasonIfUnsupported;
52
53     bool result = IsConvertLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::ConvertFp32ToFp16Layer,
54       armnn::DataType::Float32, armnn::DataType::Float16>(reasonIfUnsupported);
55
56     BOOST_CHECK(result);
57 }
58
59 BOOST_AUTO_TEST_SUITE_END()