diff options
author | Usama Arif <usama.arif@arm.com> | 2019-04-08 17:30:48 +0100 |
---|---|---|
committer | Pablo Marquez <pablo.tello@arm.com> | 2019-04-18 10:07:37 +0000 |
commit | e73686ac797be2d19cd9bed26d690e1431e3d848 (patch) | |
tree | 84a65c520b3a7b3e0abef03b48f8bbc0882e1fa4 /src/runtime/NEON/functions/NEDepthwiseConvolutionLayer.cpp | |
parent | 6631ac22efdb75438e8f35e836ae9f17cfd40c86 (diff) | |
download | ComputeLibrary-e73686ac797be2d19cd9bed26d690e1431e3d848.tar.gz |
COMPMID-2047: Add support for dilation in CLDepthwiseConvolution.
Change-Id: I3106aa34bd168985a56791613d95072756be6e9b
Signed-off-by: Usama Arif <usama.arif@arm.com>
Reviewed-on: https://review.mlplatform.org/c/958
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEDepthwiseConvolutionLayer.cpp')
-rw-r--r-- | src/runtime/NEON/functions/NEDepthwiseConvolutionLayer.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/runtime/NEON/functions/NEDepthwiseConvolutionLayer.cpp b/src/runtime/NEON/functions/NEDepthwiseConvolutionLayer.cpp index 4f632a20a0..4c602b3640 100644 --- a/src/runtime/NEON/functions/NEDepthwiseConvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEDepthwiseConvolutionLayer.cpp @@ -182,8 +182,11 @@ void NEDepthwiseConvolutionLayer3x3::configure(ITensor *input, const ITensor *biases, ITensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier, - const ActivationLayerInfo &act_info) + const ActivationLayerInfo &act_info, + const Size2D &dilation) { + ARM_COMPUTE_ERROR_ON(dilation.x() != 1 || dilation.y() != 1); + ARM_COMPUTE_UNUSED(dilation); ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::F16, DataType::F32); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights); @@ -222,10 +225,12 @@ Status NEDepthwiseConvolutionLayer3x3::validate(const ITensorInfo *input const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier, - const ActivationLayerInfo &act_info) + const ActivationLayerInfo &act_info, + const Size2D &dilation) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights, output); ARM_COMPUTE_RETURN_ERROR_ON(input->data_layout() == DataLayout::UNKNOWN); + ARM_COMPUTE_RETURN_ERROR_ON(dilation.x() != 1 || dilation.y() != 1); if(biases != nullptr) { @@ -347,10 +352,12 @@ NEDepthwiseConvolutionLayer::NEDepthwiseConvolutionLayer() } void NEDepthwiseConvolutionLayer::configure(ITensor *input, const ITensor *weights, const ITensor *biases, ITensor *output, const PadStrideInfo &conv_info, - unsigned int depth_multiplier, const ActivationLayerInfo &act_info) + unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation) { const unsigned int channel_idx = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::CHANNEL); ARM_COMPUTE_UNUSED(channel_idx); + ARM_COMPUTE_ERROR_ON(dilation.x() != 1 || dilation.y() != 1); + ARM_COMPUTE_UNUSED(dilation); ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::F16, DataType::F32); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights); @@ -480,10 +487,11 @@ void NEDepthwiseConvolutionLayer::configure(ITensor *input, const ITensor *weigh } Status NEDepthwiseConvolutionLayer::validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, - unsigned int depth_multiplier, const ActivationLayerInfo &act_info) + unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights, output); ARM_COMPUTE_RETURN_ERROR_ON(input->data_layout() == DataLayout::UNKNOWN); + ARM_COMPUTE_RETURN_ERROR_ON(dilation.x() != 1 || dilation.y() != 1); const unsigned int width_idx = get_data_layout_dimension_index(input->data_layout(), DataLayoutDimension::WIDTH); const unsigned int height_idx = get_data_layout_dimension_index(input->data_layout(), DataLayoutDimension::HEIGHT); |