From a799ce0ad775829862891dd98d1232638ec8761e Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 12 Sep 2018 20:11:34 +0100 Subject: COMPMID-1564: Add NEDepthwiseConvolution3x3 for QASYMM8 Change-Id: I1f55508af6f220e5f41df7b56daffb4761ed0591 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/148253 Tested-by: bsgcomp Reviewed-by: Isabella Gottardi --- .../NEON/kernels/convolution/depthwise/depthwise.hpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'arm_compute/core/NEON/kernels/convolution/depthwise/depthwise.hpp') diff --git a/arm_compute/core/NEON/kernels/convolution/depthwise/depthwise.hpp b/arm_compute/core/NEON/kernels/convolution/depthwise/depthwise.hpp index 4ca68116db..472c44f97a 100644 --- a/arm_compute/core/NEON/kernels/convolution/depthwise/depthwise.hpp +++ b/arm_compute/core/NEON/kernels/convolution/depthwise/depthwise.hpp @@ -33,6 +33,7 @@ class IDepthwiseConvolution virtual ~IDepthwiseConvolution() = default; virtual int output_size(const int dim_size, const bool padding_same) const = 0; virtual unsigned int get_window(void) const = 0; + virtual void set_offsets(int input_offset, int weights_offset) = 0; virtual void run(const unsigned int start, const unsigned int stop) = 0; }; @@ -179,6 +180,13 @@ class DepthwiseConvolution : public IDepthwiseConvolution >::get_output_size(dim_size, padding_same); } + /** Sets quantization offsets + * + * @param[in] input_offset Input offset + * @param[in] weights_offset Weights offset + */ + void set_offsets(int input_offset, int weights_offset) override; + /** Get the window of work to be performed by an instance of the operator. */ unsigned int get_window(void) const override; @@ -212,7 +220,9 @@ class DepthwiseConvolution : public IDepthwiseConvolution const int row_pad_out_bottom, const int n_tiles, const int n_input_cols, - const int n_output_cols + const int n_output_cols, + const int input_offset, + const int weights_offset ); // Determine the maximum (and minimum) padding values which can be applied @@ -272,7 +282,9 @@ class DepthwiseConvolution : public IDepthwiseConvolution const int _in_pad_bottom, const int _in_pad_right, const int _out_pad_bottom, - const int _out_pad_right + const int _out_pad_right, + const int _input_offset, + const int _weights_offset ); /* Arrays of methods to process tensor tiles. @@ -300,6 +312,7 @@ class DepthwiseConvolution : public IDepthwiseConvolution const int _weight_col_stride, _weight_row_stride; const int _input_col_stride, _input_row_stride, _input_batch_stride; const int _output_col_stride, _output_row_stride, _output_batch_stride; + int _input_offset, _weights_offset; }; } // namespace depthwise -- cgit v1.2.1