From d469faf863f4ecd3ba56f27e51884ef0dfeac7bf Mon Sep 17 00:00:00 2001 From: Nattapat Chaimanowong Date: Mon, 4 Mar 2019 17:10:40 +0000 Subject: IVGCVSW-2783 Fix Deserializer connections for layer with multiple outputs Change-Id: Icb278dfd8900334665432963fa6f6341a461ef3b Signed-off-by: Nattapat Chaimanowong --- src/armnnDeserializer/Deserializer.hpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/armnnDeserializer/Deserializer.hpp') diff --git a/src/armnnDeserializer/Deserializer.hpp b/src/armnnDeserializer/Deserializer.hpp index 4d9c13818b..e837a08aa3 100644 --- a/src/armnnDeserializer/Deserializer.hpp +++ b/src/armnnDeserializer/Deserializer.hpp @@ -9,6 +9,8 @@ #include "armnnDeserializer/IDeserializer.hpp" #include +#include + namespace armnnDeserializer { class Deserializer : public IDeserializer @@ -100,8 +102,8 @@ private: void ParseStridedSlice(GraphPtr graph, unsigned int layerIndex); void ParseSubtraction(GraphPtr graph, unsigned int layerIndex); - void RegisterOutputSlotOfConnection(uint32_t connectionIndex, armnn::IOutputSlot* slot); - void RegisterInputSlotOfConnection(uint32_t connectionIndex, armnn::IInputSlot* slot); + void RegisterOutputSlotOfConnection(uint32_t sourceLayerIndex, armnn::IOutputSlot* slot); + void RegisterInputSlotOfConnection(uint32_t sourceLayerIndex, uint32_t outputSlotIndex, armnn::IInputSlot* slot); void RegisterInputSlots(GraphPtr graph, uint32_t layerIndex, armnn::IConnectableLayer* layer); void RegisterOutputSlots(GraphPtr graph, uint32_t layerIndex, @@ -120,17 +122,14 @@ private: std::vector m_OutputBindings; /// A mapping of an output slot to each of the input slots it should be connected to - /// The outputSlot is from the layer that creates this tensor as one of its outputs - /// The inputSlots are from the layers that use this tensor as one of their inputs - struct Slots + struct SlotsMap { - armnn::IOutputSlot* outputSlot; - std::vector inputSlots; - - Slots() : outputSlot(nullptr) { } + std::vector outputSlots; + std::unordered_map> inputSlots; }; - typedef std::vector Connection; - std::vector m_GraphConnections; + + typedef std::vector Connections; + std::vector m_GraphConnections; }; } //namespace armnnDeserializer -- cgit v1.2.1