diff options
author | arovir01 <Aron.Virginas-Tar@arm.com> | 2018-10-09 18:04:24 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-22 16:57:53 +0100 |
commit | 43095f31edf103d71a8e2420b549d21fd349b49e (patch) | |
tree | 1414f25d8fadd4aa84fbed008743c4672b606b26 /src/backends/neon/test/NeonLayerSupportTests.cpp | |
parent | 3b72db05d6f8df28728b292c8bbd27c402dc8704 (diff) | |
download | armnn-43095f31edf103d71a8e2420b549d21fd349b49e.tar.gz |
IVGCVSW-1988: Refactor backend-specific unit tests
Change-Id: I8eca81d2e0780390eaa837c186ffe1c7d41fdebe
Diffstat (limited to 'src/backends/neon/test/NeonLayerSupportTests.cpp')
-rw-r--r-- | src/backends/neon/test/NeonLayerSupportTests.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/backends/neon/test/NeonLayerSupportTests.cpp b/src/backends/neon/test/NeonLayerSupportTests.cpp new file mode 100644 index 0000000000..db7897fc28 --- /dev/null +++ b/src/backends/neon/test/NeonLayerSupportTests.cpp @@ -0,0 +1,59 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include <armnn/layers/ConvertFp16ToFp32Layer.hpp> +#include <armnn/layers/ConvertFp32ToFp16Layer.hpp> +#include <armnn/test/TensorHelpers.hpp> + +#include <backends/CpuTensorHandle.hpp> +#include <backends/neon/NeonWorkloadFactory.hpp> +#include <backends/test/IsLayerSupportedTestImpl.hpp> +#include <backends/test/LayerTests.hpp> + +#include <boost/test/unit_test.hpp> + +#include <string> + +BOOST_AUTO_TEST_SUITE(NeonLayerSupport) + +BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat16Neon) +{ + armnn::NeonWorkloadFactory factory; + IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float16>(&factory); +} + +BOOST_AUTO_TEST_CASE(IsLayerSupportedFloat32Neon) +{ + armnn::NeonWorkloadFactory factory; + IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::Float32>(&factory); +} + +BOOST_AUTO_TEST_CASE(IsLayerSupportedUint8Neon) +{ + armnn::NeonWorkloadFactory factory; + IsLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::DataType::QuantisedAsymm8>(&factory); +} + +BOOST_AUTO_TEST_CASE(IsConvertFp16ToFp32SupportedNeon) +{ + std::string reasonIfUnsupported; + + bool result = IsConvertLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::ConvertFp16ToFp32Layer, + armnn::DataType::Float16, armnn::DataType::Float32>(reasonIfUnsupported); + + BOOST_CHECK(result); +} + +BOOST_AUTO_TEST_CASE(IsConvertFp32ToFp16SupportedNeon) +{ + std::string reasonIfUnsupported; + + bool result = IsConvertLayerSupportedTests<armnn::NeonWorkloadFactory, armnn::ConvertFp32ToFp16Layer, + armnn::DataType::Float32, armnn::DataType::Float16>(reasonIfUnsupported); + + BOOST_CHECK(result); +} + +BOOST_AUTO_TEST_SUITE_END() |