Function arm_max_pool_f16

Function Documentation

arm_cmsis_nn_status arm_max_pool_f16(const cmsis_nn_context *ctx, const cmsis_nn_pool_params_f16 *pool_params, const cmsis_nn_dims *input_dims, const float16_t *src, const cmsis_nn_dims *filter_dims, const cmsis_nn_dims *output_dims, float16_t *dst)

Max pooling.

Note

The output activation clamp on the scalar (non-MVE) build path is the bit-classified clamp of #380, so a NaN that reaches the clamp comes back as NaN at every optimization level on the gated toolchains rather than as a bound. A NaN rarely reaches it, though: the scalar max reduction uses an ordered compare that drops a NaN window element (and its NaN behavior at the shipped -Ofast is unspecified), and the MVE path’s vmaxnmq reduction and vmaxnmq/vminnmq clamp suppress NaN, so this kernel does not promise NaN propagation end to end.

Parameters:
  • ctx[inout] Function context that may hold a temporary scratch buffer.

  • pool_params[in] Pooling parameters (stride, padding and activation clamp).

  • input_dims[in] Input tensor dimensions.

  • src[in] Pointer to the input tensor data.

  • filter_dims[in] Pooling kernel dimensions.

  • output_dims[in] Output tensor dimensions.

  • dst[out] Pointer to the output tensor data.

Returns:

ARM_CMSIS_NN_SUCCESS on success or ARM_CMSIS_NN_ARG_ERROR on invalid arguments.