Function arm_depthwise_conv_s4_opt_get_buffer_size

Function Documentation

int32_t arm_depthwise_conv_s4_opt_get_buffer_size(const cmsis_nn_dims *input_dims, const cmsis_nn_dims *filter_dims)

Get the required buffer size for optimized s4 depthwise convolution function with constraint that in_channel equals out_channel.

The dimensions are not checked here: the query routes straight to the s8 _mve/_dsp leg and relies on the range checks inside that leg. Both legs apply the same check as arm_depthwise_conv_s8_opt_get_buffer_size(), so the answer for an out-of-range shape is the same on every build target.

Parameters:
  • input_dims[in] Input (activation) tensor dimensions. Format: [1, H, W, C_IN] Batch argument N is not used.

  • filter_dims[in] Filter tensor dimensions. Format: [1, H, W, C_OUT]

Returns:

The function returns required buffer size in bytes, or -1 if input_dims->c or a filter dimension it reads is negative, or the required size would not fit in an int32_t.