From ac5aa1faef759e704d369e8164ea91c6d7049946 Mon Sep 17 00:00:00 2001 From: Nattapat Chaimanowong Date: Wed, 5 Dec 2018 15:17:18 +0000 Subject: IVGCVSW-2315 Add descriptor for Debug Change-Id: I6b26c681989ef815752186f027a245ef8da7aea2 --- src/armnn/LayerSupport.cpp | 3 ++- src/armnn/layers/DebugLayer.cpp | 7 +++++-- src/armnn/layers/DebugLayer.hpp | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/armnn') diff --git a/src/armnn/LayerSupport.cpp b/src/armnn/LayerSupport.cpp index bdcd58a063..298b25c284 100644 --- a/src/armnn/LayerSupport.cpp +++ b/src/armnn/LayerSupport.cpp @@ -170,10 +170,11 @@ 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); + FORWARD_LAYER_SUPPORT_FUNC(backend, IsDebugSupported, input, output, descriptor); } bool IsDivisionSupported(const BackendId& backend, diff --git a/src/armnn/layers/DebugLayer.cpp b/src/armnn/layers/DebugLayer.cpp index c407643742..e83b17ee64 100644 --- a/src/armnn/layers/DebugLayer.cpp +++ b/src/armnn/layers/DebugLayer.cpp @@ -12,20 +12,23 @@ namespace armnn { -DebugLayer::DebugLayer(const char* name) : Layer(1, 1, LayerType::Debug, name) +DebugLayer::DebugLayer(const DebugDescriptor& param, const char* name) + : LayerWithParameters(1, 1, LayerType::Debug, param, name) {} std::unique_ptr DebugLayer::CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const { DebugQueueDescriptor descriptor; + descriptor.m_Parameters.m_LayerName = m_Param.m_LayerName; + descriptor.m_Parameters.m_SlotIndex = m_Param.m_SlotIndex; return factory.CreateDebug(descriptor, PrepInfoAndDesc(descriptor, graph)); } DebugLayer* DebugLayer::Clone(Graph& graph) const { - return CloneBase(graph, GetName()); + return CloneBase(graph, m_Param, GetName()); } void DebugLayer::ValidateTensorShapesFromInputs() diff --git a/src/armnn/layers/DebugLayer.hpp b/src/armnn/layers/DebugLayer.hpp index 39ef9c7ae0..6aaa271807 100644 --- a/src/armnn/layers/DebugLayer.hpp +++ b/src/armnn/layers/DebugLayer.hpp @@ -4,12 +4,12 @@ // #pragma once -#include +#include "LayerWithParameters.hpp" namespace armnn { -class DebugLayer : public Layer +class DebugLayer : public LayerWithParameters { public: virtual std::unique_ptr CreateWorkload(const Graph& graph, @@ -20,7 +20,7 @@ public: void ValidateTensorShapesFromInputs() override; protected: - DebugLayer(const char* name); + DebugLayer(const DebugDescriptor& param, const char* name); ~DebugLayer() = default; }; -- cgit v1.2.1