From 57d10b7f976b4eddee64e15d563bd040f3331702 Mon Sep 17 00:00:00 2001 From: James Conroy Date: Fri, 25 Oct 2019 09:44:14 +0100 Subject: IVGCVSW-3962 Return 0 for Neon GetExportFlags() * Fixes issue where MemImport workload was being inserted into a graph when changing from a NEON to Ref workload. A MemCopy will now be performed instead. * Improves existing ImportAlignedPointerTest by adding check for expected output. Signed-off-by: James Conroy Change-Id: I606dbbe0166731c62fbe4cc1966c558ade66d6bb --- src/backends/backendsCommon/test/EndToEndTestImpl.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/backends/backendsCommon') diff --git a/src/backends/backendsCommon/test/EndToEndTestImpl.hpp b/src/backends/backendsCommon/test/EndToEndTestImpl.hpp index efaffb9b67..ee9d2bc026 100644 --- a/src/backends/backendsCommon/test/EndToEndTestImpl.hpp +++ b/src/backends/backendsCommon/test/EndToEndTestImpl.hpp @@ -369,6 +369,11 @@ inline void ImportAlignedPointerTest(std::vector backends) std::vector outputData(4); + std::vector expectedOutput + { + 1.0f, 4.0f, 9.0f, 16.0f + }; + InputTensors inputTensors { {0,armnn::ConstTensor(runtime->GetInputTensorInfo(netId, 0), inputData.data())}, @@ -378,8 +383,6 @@ inline void ImportAlignedPointerTest(std::vector backends) {0,armnn::Tensor(runtime->GetOutputTensorInfo(netId, 0), outputData.data())} }; - // The result of the inference is not important, just the fact that there - // should not be CopyMemGeneric workloads. runtime->GetProfiler(netId)->EnableProfiling(true); // Do the inference @@ -394,12 +397,17 @@ inline void ImportAlignedPointerTest(std::vector backends) // Contains ActivationWorkload std::size_t found = dump.find("ActivationWorkload"); BOOST_TEST(found != std::string::npos); + // Contains SyncMemGeneric found = dump.find("SyncMemGeneric"); BOOST_TEST(found != std::string::npos); + // Does not contain CopyMemGeneric found = dump.find("CopyMemGeneric"); BOOST_TEST(found == std::string::npos); + + // Check output is as expected + BOOST_TEST(outputData == expectedOutput); } inline void ImportOnlyWorkload(std::vector backends) -- cgit v1.2.1