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 /src/armnn/LayerSupport.cpp | |
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 'src/armnn/LayerSupport.cpp')
-rw-r--r-- | src/armnn/LayerSupport.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/armnn/LayerSupport.cpp b/src/armnn/LayerSupport.cpp index 320d9cef74..831a846092 100644 --- a/src/armnn/LayerSupport.cpp +++ b/src/armnn/LayerSupport.cpp @@ -186,7 +186,28 @@ bool IsDepthwiseConvolutionSupported(const BackendId& backend, char* reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength) { - FORWARD_LAYER_SUPPORT_FUNC(backend, IsDepthwiseConvolutionSupported, input, output, descriptor, weights, biases); + if (descriptor.m_DilationX == 1 && descriptor.m_DilationY == 1) + { + // Pre 19.05 ArmNN did not have the dilation parameters. + // This version of IsDepthwiseConvolutionSupported is called for backwards-compatibility + FORWARD_LAYER_SUPPORT_FUNC(backend, + IsDepthwiseConvolutionSupported, + input, + output, + descriptor, + weights, + biases); + } + else + { + FORWARD_LAYER_SUPPORT_FUNC(backend, + IsDilatedDepthwiseConvolutionSupported, + input, + output, + descriptor, + weights, + biases); + } } bool IsDequantizeSupported(const BackendId& backend, |