diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2020-11-18 14:17:04 +0000 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2020-11-18 15:38:10 +0000 |
commit | 23969e8b538ce09489b108fb9efdde9af7f97a3f (patch) | |
tree | 34267428042ea488d715688298d17c9e2548a252 /src/armnn/LoadedNetwork.cpp | |
parent | 3812fbc78080a9b2493deeaf210d9580417c6c1c (diff) | |
download | armnn-23969e8b538ce09489b108fb9efdde9af7f97a3f.tar.gz |
IVGCVSW-5558 'Output all zeroes using EthosNAcc backend when falling back to CpuRef'
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I0c3ece5baf587e6cc22dfbec7ff98bd3573e0243
Diffstat (limited to 'src/armnn/LoadedNetwork.cpp')
-rw-r--r-- | src/armnn/LoadedNetwork.cpp | 35 |
1 files 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<IWorkload> outputWorkload = - std::make_unique<CopyMemGenericWorkload>(outputQueueDescriptor, info); - ARMNN_ASSERT_MSG(outputWorkload, "No output workload created"); + std::unique_ptr<IWorkload> outputWorkload = + std::make_unique<CopyMemGenericWorkload>(outputQueueDescriptor, info); + ARMNN_ASSERT_MSG(outputWorkload, "No output workload created"); - std::unique_ptr<TimelineUtilityMethods> 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<TimelineUtilityMethods> 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)); } } |