aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColm Donelan <Colm.Donelan@arm.com>2021-03-29 14:59:04 +0100
committerColm Donelan <colm.donelan@arm.com>2021-03-29 16:39:36 +0000
commit92c5072f5f6c23fd8bd49907541fa71897cec847 (patch)
tree92405dc4fab65458ebc800798156e5a9cb14fd0e /src
parentecb7bfcec4d6b599acfcc0a509b007f326a6781f (diff)
downloadarmnn-92c5072f5f6c23fd8bd49907541fa71897cec847.tar.gz
IVGCVSW-5676 Fixing build failure in backends jenkins job.
* Adding ref backend "ifdef" around ref test cases in NeonLayerTests_NDK_Bug.cpp * Removing unnecessary includes from NeonLayerTests_NDK_Bug.cpp. * Removing unnecessary include from NeonLayerTests.cpp * Breaking up Backends_Capability_Test into one per backend to allow for conditional compilation. * Remove unnecessary printout in src/backends/neon/test/CMakeLists.txt Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I9a36cd197e684ed55af244e5c998ee67bb8da88c
Diffstat (limited to 'src')
-rw-r--r--src/backends/backendsCommon/test/CompatibilityTests.cpp27
-rw-r--r--src/backends/neon/test/CMakeLists.txt1
-rw-r--r--src/backends/neon/test/NeonLayerTests.cpp2
-rw-r--r--src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp21
4 files changed, 30 insertions, 21 deletions
diff --git a/src/backends/backendsCommon/test/CompatibilityTests.cpp b/src/backends/backendsCommon/test/CompatibilityTests.cpp
index 1c4ff709fa..915a0151d9 100644
--- a/src/backends/backendsCommon/test/CompatibilityTests.cpp
+++ b/src/backends/backendsCommon/test/CompatibilityTests.cpp
@@ -119,15 +119,34 @@ BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(BackendCapability)
-BOOST_AUTO_TEST_CASE(Backends_Capability_Test)
+#if defined(ARMNNREF_ENABLED)
+
+BOOST_AUTO_TEST_CASE(Ref_Backends_Capability_Test)
{
- auto neonBackend = std::make_unique<NeonBackend>();
- auto clBackend = std::make_unique<ClBackend>();
auto refBackend = std::make_unique<RefBackend>();
+ BOOST_CHECK(refBackend->HasCapability(armnn::BackendCapability::NonConstWeights));
+}
+#endif
+
+#if defined(ARMCOMPUTENEON_ENABLED)
+
+BOOST_AUTO_TEST_CASE(Neon_Backends_Capability_Test)
+{
+ auto neonBackend = std::make_unique<NeonBackend>();
BOOST_CHECK(!neonBackend->HasCapability(armnn::BackendCapability::NonConstWeights));
+}
+
+#endif
+
+#if defined(ARMCOMPUTECL_ENABLED)
+
+BOOST_AUTO_TEST_CASE(Cl_Backends_Capability_Test)
+{
+ auto clBackend = std::make_unique<ClBackend>();
BOOST_CHECK(!clBackend->HasCapability(armnn::BackendCapability::NonConstWeights));
- BOOST_CHECK(refBackend->HasCapability(armnn::BackendCapability::NonConstWeights));
}
+#endif
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/backends/neon/test/CMakeLists.txt b/src/backends/neon/test/CMakeLists.txt
index 5c37f1f2a7..d2363add9e 100644
--- a/src/backends/neon/test/CMakeLists.txt
+++ b/src/backends/neon/test/CMakeLists.txt
@@ -38,7 +38,6 @@ if ( INCLUDE_NDK_BUG_TESTS STREQUAL "ON" )
list(APPEND armnnNeonBackendUnitTests_sources
NeonLayerTests_NDK_Bug.cpp
)
- message ( "Added NeonLayerTests_NDK_Bug.cpp" )
else()
endif()
diff --git a/src/backends/neon/test/NeonLayerTests.cpp b/src/backends/neon/test/NeonLayerTests.cpp
index c63f0c286f..f484eadd81 100644
--- a/src/backends/neon/test/NeonLayerTests.cpp
+++ b/src/backends/neon/test/NeonLayerTests.cpp
@@ -11,8 +11,6 @@
#include <neon/NeonLayerSupport.hpp>
#include <neon/NeonWorkloadFactory.hpp>
-#include <reference/RefWorkloadFactory.hpp>
-
#include <backendsCommon/test/ActivationFixture.hpp>
#include <backendsCommon/test/LayerTests.hpp>
diff --git a/src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp b/src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp
index ca6dea9fab..1fef43957d 100644
--- a/src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp
+++ b/src/backends/neon/test/NeonLayerTests_NDK_Bug.cpp
@@ -5,18 +5,8 @@
#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>
+#include <test/UnitTests.hpp>
BOOST_AUTO_TEST_SUITE(Compute_ArmComputeNeon)
@@ -42,13 +32,16 @@ ARMNN_AUTO_TEST_CASE_WITH_THF(L2Normalization1dNhwc, L2Normalization1dTest, Data
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>)
+#if defined(ARMNNREF_ENABLED)
+
+ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f)
+ARMNN_COMPARE_REF_AUTO_TEST_CASE_WITH_THF(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f)
+
+#endif
BOOST_AUTO_TEST_SUITE_END()