From 7db85b251cbe4f481ec6a445548460e4d90f109d Mon Sep 17 00:00:00 2001 From: Kevin May Date: Tue, 1 Oct 2019 10:52:10 +0100 Subject: IVGCVSW-3922 Fix Arm NN build issue - memory access violation * Only run breaking test if Ref backend is available Signed-off-by: Kevin May Change-Id: I64850c902f7b900fe9f50d357c283c9a2bf73c19 --- .../test/optimizations/PermuteAndBatchToSpaceAsDepthToSpaceTests.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/armnn') diff --git a/src/armnn/test/optimizations/PermuteAndBatchToSpaceAsDepthToSpaceTests.cpp b/src/armnn/test/optimizations/PermuteAndBatchToSpaceAsDepthToSpaceTests.cpp index ec1dd511c9..74ee18b482 100644 --- a/src/armnn/test/optimizations/PermuteAndBatchToSpaceAsDepthToSpaceTests.cpp +++ b/src/armnn/test/optimizations/PermuteAndBatchToSpaceAsDepthToSpaceTests.cpp @@ -81,6 +81,9 @@ BOOST_AUTO_TEST_CASE(PermuteAndBatchToSpaceAsDepthToSpaceOptimizerTest) BOOST_TEST(CheckRelatedLayers(graph, testRelatedLayers)); } +// This unit test needs the reference backend, it's not available if the reference backend is not built +#if defined(ARMNNREF_ENABLED) + /// Tests that a optimization performed by PermuteAndBatchToSpaceAsDepthToSpace does not change the behaviour /// of the network (i.e. it still produces the correct output). BOOST_AUTO_TEST_CASE(PermuteAndBatchToSpaceAsDepthToSpaceCorrectnessTest) @@ -88,7 +91,6 @@ BOOST_AUTO_TEST_CASE(PermuteAndBatchToSpaceAsDepthToSpaceCorrectnessTest) INetworkPtr network = CreateTestNetwork(); IRuntimePtr runtime = IRuntime::Create(IRuntime::CreationOptions()); - IOptimizedNetworkPtr optimizedNetwork = Optimize(*network, { Compute::CpuRef }, runtime->GetDeviceSpec()); // Confirm that the optimization has actually taken place @@ -128,5 +130,6 @@ BOOST_AUTO_TEST_CASE(PermuteAndBatchToSpaceAsDepthToSpaceCorrectnessTest) }; BOOST_TEST(outputData == expectedOutput); } +#endif BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file -- cgit v1.2.1