ArmNN
 21.08
NeonLayerTests_NDK_Bug.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
9 #include <test/UnitTests.hpp>
10 
11 #include <doctest/doctest.h>
12 
13 TEST_SUITE("Compute_ArmComputeNeon")
14 {
15 using namespace armnn;
16 
17 using FactoryType = NeonWorkloadFactory;
18 
19 // ============================================================================
20 // This is a specific subset of NeonLayerTests that can fail because of a known problem
21 // in the Android NDK. https://github.com/android/ndk/issues/1135
22 // We extract them here so then in the case of a debug Android build they can be excluded.
23 // The tests will pass in a release build. The problem has been corrected in NDK r21.
24 
25 // Softmax
26 ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleSoftmaxBeta1, SimpleSoftmaxTest, 1.0f)
27 ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleSoftmaxBeta2, SimpleSoftmaxTest, 2.0f)
28 
29 // LogSoftmax
30 ARMNN_AUTO_TEST_CASE_WITH_THF(LogSoftmaxFloat32_1, LogSoftmaxTest1<DataType::Float32>)
31 
33 
34 ARMNN_AUTO_TEST_CASE_WITH_THF(LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNorm,
36 
37 // ReduceSum
38 ARMNN_AUTO_TEST_CASE_WITH_THF(ReduceSumFloat32, ReduceSumSimpleTest<DataType::Float32>)
39 
40 ARMNN_AUTO_TEST_CASE_WITH_THF(ReduceSumSingleAxisFloat32_3, ReduceSumSingleAxisTest3<DataType::Float32>)
41 
42 #if defined(ARMNNREF_ENABLED)
43 
44 ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f)
45 ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f)
46 
47 #endif
48 
49 }
#define ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(TestName, TestFunction,...)
Definition: UnitTests.hpp:172
Copyright (c) 2021 ARM Limited and Contributors.
TEST_SUITE("Compute_ArmComputeNeon")
LayerTestResult< float, 4 > L2Normalization1dTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory, const armnn::DataLayout layout)
#define ARMNN_AUTO_TEST_CASE_WITH_THF(TestName, TestFunction,...)
Definition: UnitTests.hpp:126
LayerTestResult< float, 2 > CompareSoftmaxTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, armnn::IWorkloadFactory &refWorkloadFactory, const armnn::ITensorHandleFactory &tensorHandleFactory, const armnn::ITensorHandleFactory &refTensorHandleFactory, float beta)
LayerTestResult< float, 2 > LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNormTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< float, 2 > SimpleSoftmaxTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory, float beta)