diff options
author | Pablo Tello <pablo.tello@arm.com> | 2019-04-26 17:58:13 +0100 |
---|---|---|
committer | Pablo Tello <pablo.tello@arm.com> | 2019-05-13 16:51:35 +0100 |
commit | f0bd68386cc8598f702b1df2d1ba60094e6a9d97 (patch) | |
tree | 4e5a0d2f58bbd7fb095f24bee8932970d14e52a8 /include/armnn | |
parent | 3f9119a115bfaaf0ad89a46d00e7b9da844aca22 (diff) | |
download | armnn-f0bd68386cc8598f702b1df2d1ba60094e6a9d97.tar.gz |
MLCE-101: Adding dilation support in conv and dconv
Added support for dilation in DepthwiseConvolution2d in the
Neon and CL backends.
Change-Id: Ie1522b498c07f80d6efcf9dc79e926c8cfa06ca5
Signed-off-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'include/armnn')
-rw-r--r-- | include/armnn/Descriptors.hpp | 12 | ||||
-rw-r--r-- | include/armnn/ILayerSupport.hpp | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/armnn/Descriptors.hpp b/include/armnn/Descriptors.hpp index 42b017f4cc..cf31599ed1 100644 --- a/include/armnn/Descriptors.hpp +++ b/include/armnn/Descriptors.hpp @@ -274,6 +274,8 @@ struct Convolution2dDescriptor , m_PadBottom(0) , m_StrideX(0) , m_StrideY(0) + , m_DilationX(1) + , m_DilationY(1) , m_BiasEnabled(false) , m_DataLayout(DataLayout::NCHW) {} @@ -290,6 +292,10 @@ struct Convolution2dDescriptor uint32_t m_StrideX; /// Stride value when proceeding through input for the height dimension. uint32_t m_StrideY; + /// Dilation along x axis + uint32_t m_DilationX; + /// Dilation along y axis + uint32_t m_DilationY; /// Enable/disable bias. bool m_BiasEnabled; /// The data layout to be used (NCHW, NHWC). @@ -306,6 +312,8 @@ struct DepthwiseConvolution2dDescriptor , m_PadBottom(0) , m_StrideX(0) , m_StrideY(0) + , m_DilationX(1) + , m_DilationY(1) , m_BiasEnabled(false) , m_DataLayout(DataLayout::NCHW) {} @@ -322,6 +330,10 @@ struct DepthwiseConvolution2dDescriptor uint32_t m_StrideX; /// Stride value when proceeding through input for the height dimension. uint32_t m_StrideY; + /// Dilation along x axis + uint32_t m_DilationX; + /// Dilation along y axis + uint32_t m_DilationY; /// Enable/disable bias. bool m_BiasEnabled; /// The data layout to be used (NCHW, NHWC). diff --git a/include/armnn/ILayerSupport.hpp b/include/armnn/ILayerSupport.hpp index dc843029c5..b8e48c8704 100644 --- a/include/armnn/ILayerSupport.hpp +++ b/include/armnn/ILayerSupport.hpp @@ -87,6 +87,14 @@ public: const DetectionPostProcessDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsDilatedDepthwiseConvolutionSupported( + const TensorInfo& input, + const TensorInfo& output, + const DepthwiseConvolution2dDescriptor& descriptor, + const TensorInfo& weights, + const Optional<TensorInfo>& biases, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsDivisionSupported(const TensorInfo& input0, const TensorInfo& input1, const TensorInfo& output, |