diff options
author | Colm Donelan <Colm.Donelan@arm.com> | 2021-03-24 14:51:31 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2021-03-25 09:13:55 +0000 |
commit | ade8c1daab87abf628c42a0bbc002193d7ac40f6 (patch) | |
tree | 6df07d11a9a2fb7a38ffc496b82182ea6886fe1c /src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp | |
parent | f0a6dec75832604d5ab18242dc216852821a8279 (diff) | |
download | armnn-ade8c1daab87abf628c42a0bbc002193d7ac40f6.tar.gz |
IVGCVSW-5676 Eliminating some Neon unit tests for debug builds.
* Creating a new NeonLayerTests_NDK_Bug test class.
* Moving a subset of tests effected by an NDK bug from NeonLayerTests
into NeonLayerTests_NDK_Bug.
* Excluding NeonLayerTests_NDK_Bug from the build if it's an Android
debug build and NDK is less than r21.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: Icb16d8bbb784fb0357deef281d7aa713e11af8ac
Diffstat (limited to 'src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp')
-rw-r--r-- | src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp b/src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp new file mode 100644 index 0000000000..ca6dea9fab --- /dev/null +++ b/src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp @@ -0,0 +1,54 @@ +// +// Copyright © 2021 Arm Ltd and Contributors. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "NeonWorkloadFactoryHelper.hpp" + +#include <test/TensorHelpers.hpp> +#include <test/UnitTests.hpp> + +#include <neon/NeonLayerSupport.hpp> +#include <neon/NeonWorkloadFactory.hpp> + +#include <reference/RefWorkloadFactory.hpp> + +#include <backendsCommon/test/ActivationFixture.hpp> +#include <backendsCommon/test/LayerTests.hpp> + +#include <boost/test/unit_test.hpp> + +BOOST_AUTO_TEST_SUITE(Compute_ArmComputeNeon) + +using namespace armnn; + +using FactoryType = NeonWorkloadFactory; + +// ============================================================================ +// This is a specific subset of NeonLayerTests that can fail because of a known problem +// in the Android NDK. https://github.com/android/ndk/issues/1135 +// We extract them here so then in the case of a debug Android build they can be excluded. +// The tests will pass in a release build. The problem has been corrected in NDK r21. + +// Softmax +ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleSoftmaxBeta1, SimpleSoftmaxTest, 1.0f) +ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleSoftmaxBeta2, SimpleSoftmaxTest, 2.0f) + +// LogSoftmax +ARMNN_AUTO_TEST_CASE_WITH_THF(LogSoftmaxFloat32_1, LogSoftmaxTest1<DataType::Float32>) + +ARMNN_AUTO_TEST_CASE_WITH_THF(L2Normalization1dNhwc, L2Normalization1dTest, DataLayout::NHWC) + +ARMNN_AUTO_TEST_CASE_WITH_THF(LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNorm, + LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNormTest) + +ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f) +ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f) + +// ReduceSum +ARMNN_AUTO_TEST_CASE_WITH_THF(ReduceSumFloat32, ReduceSumSimpleTest<DataType::Float32>) + +ARMNN_AUTO_TEST_CASE_WITH_THF(ReduceSumSingleAxisFloat32_3, ReduceSumSingleAxisTest3<DataType::Float32>) + + +BOOST_AUTO_TEST_SUITE_END() |