aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorNattapat Chaimanowong <nattapat.chaimanowong@arm.com>2019-03-26 11:03:26 +0000
committernattapat.chaimanowong <nattapat.chaimanowong@arm.com>2019-03-26 17:15:21 +0000
commit964e955d8962590d3ccbaba9784962e895ca656f (patch)
tree802213a507152d23fec932dfc6405540b97b7ccf /src/armnn
parent44db7c36c8cf0fc608d3edc2ee0eb04428085218 (diff)
downloadarmnn-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')
-rw-r--r--src/armnn/LayerSupport.cpp3
-rw-r--r--src/armnn/NetworkUtils.cpp7
-rw-r--r--src/armnn/layers/DebugLayer.cpp13
-rw-r--r--src/armnn/layers/DebugLayer.hpp7
4 files changed, 14 insertions, 16 deletions
diff --git a/src/armnn/LayerSupport.cpp b/src/armnn/LayerSupport.cpp
index 12b3c403a7..5916488fb5 100644
--- a/src/armnn/LayerSupport.cpp
+++ b/src/armnn/LayerSupport.cpp
@@ -171,11 +171,10 @@ bool IsConvolution2dSupported(const BackendId& backend,
bool IsDebugSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
- const DebugDescriptor& descriptor,
char* reasonIfUnsupported,
size_t reasonIfUnsupportedMaxLength)
{
- FORWARD_LAYER_SUPPORT_FUNC(backend, IsDebugSupported, input, output, descriptor);
+ FORWARD_LAYER_SUPPORT_FUNC(backend, IsDebugSupported, input, output);
}
bool IsDepthwiseConvolutionSupported(const BackendId& backend,
diff --git a/src/armnn/NetworkUtils.cpp b/src/armnn/NetworkUtils.cpp
index a7f89ff222..126b56b084 100644
--- a/src/armnn/NetworkUtils.cpp
+++ b/src/armnn/NetworkUtils.cpp
@@ -86,15 +86,12 @@ std::vector<DebugLayer*> InsertDebugLayerAfter(Graph& graph, Layer& layer)
debugLayers.reserve(layer.GetNumOutputSlots());
// Connect a DebugLayer to each output slot of the layer
- unsigned int outputSlotIndex = 0u;
for (auto&& outputSlot = layer.BeginOutputSlots(); outputSlot != layer.EndOutputSlots(); ++outputSlot)
{
- const std::string layerName(layer.GetName());
- const std::string debugName = std::string("DebugLayerAfter") + layerName;
+ const std::string debugName = std::string("DebugLayerAfter") + layer.GetNameStr();
- const DebugDescriptor descriptor(layerName, outputSlotIndex++);
DebugLayer* debugLayer =
- graph.InsertNewLayer<DebugLayer>(*outputSlot, descriptor, debugName.c_str());
+ graph.InsertNewLayer<DebugLayer>(*outputSlot, debugName.c_str());
// Sets output tensor info for the debug layer.
TensorInfo debugInfo = debugLayer->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo();
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;