diff options
author | Nattapat Chaimanowong <nattapat.chaimanowong@arm.com> | 2019-03-26 11:03:26 +0000 |
---|---|---|
committer | nattapat.chaimanowong <nattapat.chaimanowong@arm.com> | 2019-03-26 17:15:21 +0000 |
commit | 964e955d8962590d3ccbaba9784962e895ca656f (patch) | |
tree | 802213a507152d23fec932dfc6405540b97b7ccf /src/armnn/layers | |
parent | 44db7c36c8cf0fc608d3edc2ee0eb04428085218 (diff) | |
download | armnn-964e955d8962590d3ccbaba9784962e895ca656f.tar.gz |
IVGCVSW-2881 Remove DebugDescriptor
* Also update Debug layer to use layer guid information
Change-Id: I9ec1f639299c3f855b670ff031a0e88d685cfc6b
Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com>
Diffstat (limited to 'src/armnn/layers')
-rw-r--r-- | src/armnn/layers/DebugLayer.cpp | 13 | ||||
-rw-r--r-- | src/armnn/layers/DebugLayer.hpp | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/armnn/layers/DebugLayer.cpp b/src/armnn/layers/DebugLayer.cpp index 6fccca677f..34912731cb 100644 --- a/src/armnn/layers/DebugLayer.cpp +++ b/src/armnn/layers/DebugLayer.cpp @@ -12,23 +12,26 @@ namespace armnn { -DebugLayer::DebugLayer(const DebugDescriptor& param, const char* name) - : LayerWithParameters(1, 1, LayerType::Debug, param, name) +DebugLayer::DebugLayer(const char* name) + : Layer(1, 1, LayerType::Debug, name) {} std::unique_ptr<IWorkload> DebugLayer::CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const { + const Layer& prevLayer = GetInputSlot(0).GetConnectedOutputSlot()->GetOwningLayer(); + DebugQueueDescriptor descriptor; - descriptor.m_Parameters.m_LayerName = m_Param.m_LayerName; - descriptor.m_Parameters.m_SlotIndex = m_Param.m_SlotIndex; + descriptor.m_Guid = prevLayer.GetGuid(); + descriptor.m_LayerName = prevLayer.GetNameStr(); + descriptor.m_SlotIndex = GetInputSlot(0).GetConnectedOutputSlot()->CalculateIndexOnOwner(); return factory.CreateDebug(descriptor, PrepInfoAndDesc(descriptor, graph)); } DebugLayer* DebugLayer::Clone(Graph& graph) const { - return CloneBase<DebugLayer>(graph, m_Param, GetName()); + return CloneBase<DebugLayer>(graph, GetName()); } void DebugLayer::ValidateTensorShapesFromInputs() diff --git a/src/armnn/layers/DebugLayer.hpp b/src/armnn/layers/DebugLayer.hpp index bc64541cbe..3bd5a3dae2 100644 --- a/src/armnn/layers/DebugLayer.hpp +++ b/src/armnn/layers/DebugLayer.hpp @@ -4,13 +4,13 @@ // #pragma once -#include "LayerWithParameters.hpp" +#include "Layer.hpp" namespace armnn { /// This layer visualizes the data flowing through the network. -class DebugLayer : public LayerWithParameters<DebugDescriptor> +class DebugLayer : public Layer { public: /// Makes a workload for the Debug type. @@ -32,9 +32,8 @@ public: protected: /// Constructor to create a DebugLayer. - /// @param [in] param DebugDescriptor to configure the debug layer. /// @param [in] name Optional name for the layer. - DebugLayer(const DebugDescriptor& param, const char* name); + DebugLayer(const char* name); /// Default destructor ~DebugLayer() = default; |