blob: db7897fc2837ae0c6ff4901e4c089c81ce2b19a4 [file] [log] [blame]
arovir0143095f32018-10-09 18:04:24 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include <armnn/layers/ConvertFp16ToFp32Layer.hpp>
7#include <armnn/layers/ConvertFp32ToFp16Layer.hpp>
8#include <armnn/test/TensorHelpers.hpp>
9
10#include <backends/CpuTensorHandle.hpp>
11#include <backends/neon/NeonWorkloadFactory.hpp>
12#include <backends/test/IsLayerSupportedTestImpl.hpp>
13#include <backends/test/LayerTests.hpp>
14
15#include <boost/test/unit_test.hpp>
16
17#include <string>
18
19BOOST_AUTO_TEST_SUITE(NeonLayerSupport)
20
21BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat16Neon)
22{
23 armnn::NeonWorkloadFactory factory;
24 IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float16>(&factory);
25}
26
27BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat32Neon)
28{
29 armnn::NeonWorkloadFactory factory;
30 IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float32>(&factory);
31}
32
33BOOST_AUTO_TEST_CASE(IsLayerSupportedUint8Neon)
34{
35 armnn::NeonWorkloadFactory factory;
36 IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::QuantisedAsymm8>(&factory);
37}
38
39BOOST_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
49BOOST_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
59BOOST_AUTO_TEST_SUITE_END()