1 // 2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #include "NeonWorkloadFactoryHelper.hpp" 7 8 #include <UnitTests.hpp> 9 #include <backendsCommon/test/LayerTests.hpp> 10 #include <neon/NeonWorkloadFactory.hpp> 11 12 #include <doctest/doctest.h> 13 14 TEST_SUITE("Compute_ArmComputeNeon") 15 { 16 using namespace armnn; 17 18 using FactoryType = NeonWorkloadFactory; 19 20 // ============================================================================ 21 // This is a specific subset of NeonLayerTests that can fail because of a known problem 22 // in the Android NDK. https://github.com/android/ndk/issues/1135 23 // We extract them here so then in the case of a debug Android build they can be excluded. 24 // The tests will pass in a release build. The problem has been corrected in NDK r21. 25 26 // Softmax 27 ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleSoftmaxBeta1, SimpleSoftmaxTest, 1.0f) 28 ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleSoftmaxBeta2, SimpleSoftmaxTest, 2.0f) 29 30 // LogSoftmax 31 ARMNN_AUTO_TEST_CASE_WITH_THF(LogSoftmaxFloat32_1, LogSoftmaxTest1<DataType::Float32>) 32 33 ARMNN_AUTO_TEST_CASE_WITH_THF(L2Normalization1dNhwc, L2Normalization1dTest, DataLayout::NHWC) 34 35 ARMNN_AUTO_TEST_CASE_WITH_THF(LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNorm, 36 LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNormTest) 37 38 ARMNN_AUTO_TEST_CASE_WITH_THF(UnidirectionalSequenceLstmLayerNoCifgWithPeepholeWithProjectionWithLayerNorm, 39 UnidirectionalSequenceLstmLayerNoCifgWithPeepholeWithProjectionWithLayerNormTest) 40 41 // ReduceSum 42 ARMNN_AUTO_TEST_CASE_WITH_THF(ReduceSumFloat32, ReduceSumSimpleTest<DataType::Float32>) 43 44 ARMNN_AUTO_TEST_CASE_WITH_THF(ReduceSumSingleAxisFloat32_3, ReduceSumSingleAxisTest3<DataType::Float32>) 45 46 #if defined(ARMNNREF_ENABLED) 47 48 ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f) 49 ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f) 50 51 #endif 52 53 } 54