From 23969e8b538ce09489b108fb9efdde9af7f97a3f Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Wed, 18 Nov 2020 14:17:04 +0000 Subject: IVGCVSW-5558 'Output all zeroes using EthosNAcc backend when falling back to CpuRef' Signed-off-by: Sadik Armagan Change-Id: I0c3ece5baf587e6cc22dfbec7ff98bd3573e0243 --- src/armnn/LoadedNetwork.cpp | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/armnn/LoadedNetwork.cpp b/src/armnn/LoadedNetwork.cpp index b5a1b392b4..7ef7f5f2f8 100644 --- a/src/armnn/LoadedNetwork.cpp +++ b/src/armnn/LoadedNetwork.cpp @@ -673,29 +673,24 @@ void LoadedNetwork::EnqueueOutput(const BindableLayer& layer, ITensorHandle* ten } if (needMemCopy) { - const Layer& connectedLayer = layer.GetInputSlots()[0].GetConnectedOutputSlot()->GetOwningLayer(); - // Do not add MemCopy Layer if OutputLayer is already connected the MemCopy Layer - if (connectedLayer.GetType() != LayerType::MemCopy) - { - // If we got here then we didn't export the memory, so add an output workload which performs a memcopy. - outputQueueDescriptor.m_Inputs.push_back(inputTensorHandle); - info.m_InputTensorInfos.push_back(inputTensorInfo); + // If we got here then we didn't export the memory, so add an output workload which performs a memcopy. + outputQueueDescriptor.m_Inputs.push_back(inputTensorHandle); + info.m_InputTensorInfos.push_back(inputTensorInfo); - std::unique_ptr outputWorkload = - std::make_unique(outputQueueDescriptor, info); - ARMNN_ASSERT_MSG(outputWorkload, "No output workload created"); + std::unique_ptr outputWorkload = + std::make_unique(outputQueueDescriptor, info); + ARMNN_ASSERT_MSG(outputWorkload, "No output workload created"); - std::unique_ptr timelineUtils = - TimelineUtilityMethods::GetTimelineUtils(m_ProfilingService); - if (timelineUtils) - { - // Add Output Workload to the post-optimisation network structure - AddWorkloadStructure(timelineUtils, outputWorkload, layer); - timelineUtils->Commit(); - } - - m_OutputQueue.push_back(move(outputWorkload)); + std::unique_ptr timelineUtils = + TimelineUtilityMethods::GetTimelineUtils(m_ProfilingService); + if (timelineUtils) + { + // Add Output Workload to the post-optimisation network structure + AddWorkloadStructure(timelineUtils, outputWorkload, layer); + timelineUtils->Commit(); } + + m_OutputQueue.push_back(move(outputWorkload)); } } -- cgit v1.2.1