aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-06-26 17:20:16 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit13edbff0820c3b41e7dd766db5a9d6ff65fcda2a (patch)
treeb17fbea676fe0a77153b1610f88ebc6faa30e023 /arm_compute/core
parent238cfc06ed377045df9b76c2047081d27ab9ff66 (diff)
downloadComputeLibrary-13edbff0820c3b41e7dd766db5a9d6ff65fcda2a.tar.gz
COMPMID-432 - Extended Convolution Layer to support rectangular kernels
Change-Id: I99be1efede4de6dd63ce103fb11196c413757621 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79252 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'arm_compute/core')
-rw-r--r--arm_compute/core/CL/kernels/CLCol2ImKernel.h2
-rw-r--r--arm_compute/core/CL/kernels/CLIm2ColKernel.h19
-rw-r--r--arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h2
-rw-r--r--arm_compute/core/NEON/kernels/NEIm2ColKernel.h18
4 files changed, 21 insertions, 20 deletions
diff --git a/arm_compute/core/CL/kernels/CLCol2ImKernel.h b/arm_compute/core/CL/kernels/CLCol2ImKernel.h
index 9d445e3004..d391cac889 100644
--- a/arm_compute/core/CL/kernels/CLCol2ImKernel.h
+++ b/arm_compute/core/CL/kernels/CLCol2ImKernel.h
@@ -66,7 +66,7 @@ public:
/** Set the input and output of the kernel.
*
- * @param[in] input The input tensor to convert. Data types supported: F16, F32
+ * @param[in] input The input tensor to convert. Data types supported: F16/F32
* @param[out] output The output tensor. 3 lower dimensions represent a single output [width, height, OFM],
* while the rest represent batch of outputs. Data types supported: Same as @p input
* @param[in] convolved_dims Output convolved dimensions.
diff --git a/arm_compute/core/CL/kernels/CLIm2ColKernel.h b/arm_compute/core/CL/kernels/CLIm2ColKernel.h
index d2224b53e1..b3b5cd8e80 100644
--- a/arm_compute/core/CL/kernels/CLIm2ColKernel.h
+++ b/arm_compute/core/CL/kernels/CLIm2ColKernel.h
@@ -29,6 +29,7 @@
namespace arm_compute
{
class ICLTensor;
+class Size2D;
/** Interface for the im2col reshape kernel.
*
@@ -67,15 +68,15 @@ public:
CLIm2ColKernel &operator=(CLIm2ColKernel &&) = default;
/** Set the input and output of the kernel.
*
- * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM],
- * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F16, F32
- * @param[out] output The output tensor. First 2 lower dimensions represent a transform of each 3D input,
- * while every dimension above represents a batch. Data types supported: Same as @p input
- * @param[in] convolved_dims The convolved output dimensions.
- * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
- * @param[in] has_bias In case biases are provided expands the matrix with 1.
+ * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM],
+ * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F16/F32
+ * @param[out] output The output tensor. First 2 lower dimensions represent a transform of each 3D input,
+ * while every dimension above represents a batch. Data types supported: Same as @p input
+ * @param[in] kernel_dims The kernel dimensions (width and height).
+ * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
+ * @param[in] has_bias In case biases are provided expands the matrix with 1.
*/
- void configure(const ICLTensor *input, ICLTensor *output, std::pair<unsigned int, unsigned int> convolved_dims, const PadStrideInfo &conv_info, bool has_bias);
+ void configure(const ICLTensor *input, ICLTensor *output, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias);
// Inherited methods overridden:
void run(const Window &window, cl::CommandQueue &queue) override;
@@ -101,8 +102,6 @@ private:
const ICLTensor *_input;
ICLTensor *_output;
std::pair<unsigned int, unsigned int> _convolved_dims;
- PadStrideInfo _conv_info;
- int _kernel_size;
unsigned int _num_elems_processed_per_iteration;
Im2ColFunction _run_func;
};
diff --git a/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h b/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h
index 0d00f0e00e..8732c6094b 100644
--- a/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h
+++ b/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h
@@ -63,4 +63,4 @@ private:
ICLTensor *_output;
};
}
-#endif /*__ARM_COMPUTE_CLWEIGHTSRESHAPEKERNEL_H__ */
+#endif /*__ARM_COMPUTE_CLWEIGHTSRESHAPEKERNEL_H__ */ \ No newline at end of file
diff --git a/arm_compute/core/NEON/kernels/NEIm2ColKernel.h b/arm_compute/core/NEON/kernels/NEIm2ColKernel.h
index e219ce2e0e..9b8b98b388 100644
--- a/arm_compute/core/NEON/kernels/NEIm2ColKernel.h
+++ b/arm_compute/core/NEON/kernels/NEIm2ColKernel.h
@@ -29,6 +29,7 @@
namespace arm_compute
{
class ITensor;
+class Size2D;
/** Interface for the im2col reshape kernel.
*
@@ -71,14 +72,14 @@ public:
/** Set the input and output of the kernel.
*
- * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM],
- * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: QS8/F16/F32
- * @param[out] output The output tensor. Data types supported: Same as @p input
- * @param[in] convolved_dims The convolved output dimensions.
- * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
- * @param[in] has_bias In case biases are provided expands the matrix with 1.
+ * @param[in] input The input tensor to convert. 3 lower dimensions represent a single input [width, height, IFM],
+ * while every optional dimension from 4 and above represent a batch of inputs. Data types supported: QS8/F16/F32
+ * @param[out] output The output tensor. Data types supported: Same as @p input
+ * @param[in] kernel_dims The kernel dimensions (width and height).
+ * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo.
+ * @param[in] has_bias In case biases are provided expands the matrix with 1.
*/
- void configure(const ITensor *input, ITensor *output, std::pair<unsigned int, unsigned int> convolved_dims, const PadStrideInfo &conv_info, bool has_bias);
+ void configure(const ITensor *input, ITensor *output, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias);
// Inherited methods overridden:
void run(const Window &window) override;
@@ -107,7 +108,8 @@ private:
ITensor *_output;
std::pair<unsigned int, unsigned int> _convolved_dims;
PadStrideInfo _conv_info;
- unsigned int _kernel_size;
+ unsigned int _kernel_width;
+ unsigned int _kernel_height;
bool _has_bias;
};
}