aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-03-01 16:03:50 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:50:48 +0000
commit57dac8400d56a4b68975d5563a9540c96d49fe5f (patch)
treecf474c6690c02115e623d5e7d867be665050f87e /arm_compute
parent0ef7e670a22248806458d7327db9e8b8c4db4ce6 (diff)
downloadComputeLibrary-57dac8400d56a4b68975d5563a9540c96d49fe5f.tar.gz
COMPMID-806 Add NHWC data format support format for NEON pooling
Change-Id: I7ab174c72f3d56134fcec259a137739061fd12e9 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/123065 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/NEON/kernels/NEPoolingLayerKernel.h53
-rw-r--r--arm_compute/runtime/NEON/functions/NEPoolingLayer.h1
2 files changed, 38 insertions, 16 deletions
diff --git a/arm_compute/core/NEON/kernels/NEPoolingLayerKernel.h b/arm_compute/core/NEON/kernels/NEPoolingLayerKernel.h
index 8250342b53..4140ccf1ed 100644
--- a/arm_compute/core/NEON/kernels/NEPoolingLayerKernel.h
+++ b/arm_compute/core/NEON/kernels/NEPoolingLayerKernel.h
@@ -82,112 +82,133 @@ private:
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void pooling2_f32(const Window &window_input, const Window &window);
+ void pooling2_f32_nchw(const Window &window_input, const Window &window);
/** Function to perform 2x2 pooling for float16_t.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void pooling2_f16(const Window &window_input, const Window &window);
+ void pooling2_f16_nchw(const Window &window_input, const Window &window);
/** Function to perform 2x2 pooling for 8bit fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type>
- void pooling2_q8(const Window &window_input, const Window &window);
+ void pooling2_q8_nchw(const Window &window_input, const Window &window);
/** Function to perform 2x2 pooling for 8bit asymmetric fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void pooling2_qasymm8(const Window &window_input, const Window &window);
+ void pooling2_qasymm8_nchw(const Window &window_input, const Window &window);
/** Function to perform 2x2 pooling for 16bit fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type>
- void pooling2_q16(const Window &window_input, const Window &window);
+ void pooling2_q16_nchw(const Window &window_input, const Window &window);
/** Function to perform 3x3 pooling.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void pooling3_f32(const Window &window_input, const Window &window);
+ void pooling3_f32_nchw(const Window &window_input, const Window &window);
/** Function to perform 3x3 pooling.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void pooling3_f16(const Window &window_input, const Window &window);
+ void pooling3_f16_nchw(const Window &window_input, const Window &window);
/** Function to perform 3x3 pooling for 8bit fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type>
- void pooling3_q8(const Window &window_input, const Window &window);
+ void pooling3_q8_nchw(const Window &window_input, const Window &window);
/** Function to perform 3x3 pooling for 8bit quantized fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void pooling3_qasymm8(const Window &window_input, const Window &window);
+ void pooling3_qasymm8_nchw(const Window &window_input, const Window &window);
/** Function to perform 3x3 pooling for 16bit fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type>
- void pooling3_q16(const Window &window_input, const Window &window);
+ void pooling3_q16_nchw(const Window &window_input, const Window &window);
/** Function to perform 7x7 pooling.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void pooling7_f32(const Window &window_input, const Window &window);
+ void pooling7_f32_nchw(const Window &window_input, const Window &window);
/** Function to perform MxN pooling for 8bit fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type>
- void poolingMxN_q8(const Window &window_input, const Window &window);
+ void poolingMxN_q8_nchw(const Window &window_input, const Window &window);
/** Function to perform MxN pooling for 8-bit quantized.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void poolingMxN_qasymm8(const Window &window_input, const Window &window);
+ void poolingMxN_qasymm8_nchw(const Window &window_input, const Window &window);
+ /** Function to perform MxN pooling for 8-bit quantized. (NHWC)
+ *
+ * @param[in] window_input Input region on which to execute the kernel.
+ * @param[in] window Output region on which to execute the kernel.
+ */
+ template <PoolingType pooling_type, bool exclude_padding = false>
+ void poolingMxN_qasymm8_nhwc(const Window &window_input, const Window &window);
/** Function to perform MxN pooling for 16bit fixed point.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type>
- void poolingMxN_q16(const Window &window_input, const Window &window);
+ void poolingMxN_q16_nchw(const Window &window_input, const Window &window);
/** Function to perform MxN pooling for 16-bit floating point values.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void poolingMxN_f16(const Window &window_input, const Window &window);
+ void poolingMxN_f16_nchw(const Window &window_input, const Window &window);
+ /** Function to perform MxN pooling for 16-bit floating point values. (NHWC)
+ *
+ * @param[in] window_input Input region on which to execute the kernel.
+ * @param[in] window Output region on which to execute the kernel.
+ */
+ template <PoolingType pooling_type, bool exclude_padding = false>
+ void poolingMxN_f16_nhwc(const Window &window_input, const Window &window);
/** Function to perform MxN pooling for 32-bit floating point values.
*
* @param[in] window_input Input region on which to execute the kernel.
* @param[in] window Output region on which to execute the kernel.
*/
template <PoolingType pooling_type, bool exclude_padding = false>
- void poolingMxN_f32(const Window &window_input, const Window &window);
+ void poolingMxN_f32_nchw(const Window &window_input, const Window &window);
+ /** Function to perform MxN pooling for 32-bit floating point values (NHWC).
+ *
+ * @param[in] window_input Input region on which to execute the kernel.
+ * @param[in] window Output region on which to execute the kernel.
+ */
+ template <PoolingType pooling_type, bool exclude_padding = false>
+ void poolingMxN_f32_nhwc(const Window &window_input, const Window &window);
/** Common signature for all the specialised Pooling functions
*
* @param[in] window_input Input region on which to execute the kernel.
diff --git a/arm_compute/runtime/NEON/functions/NEPoolingLayer.h b/arm_compute/runtime/NEON/functions/NEPoolingLayer.h
index 3ac0844798..4224f75c77 100644
--- a/arm_compute/runtime/NEON/functions/NEPoolingLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEPoolingLayer.h
@@ -72,6 +72,7 @@ private:
NEPoolingLayerKernel _pooling_layer_kernel;
NEFillBorderKernel _border_handler;
bool _is_global_pooling_layer;
+ DataLayout _data_layout;
};
}
#endif /* __ARM_COMPUTE_NEPOOLINGLAYER_H__ */