Function arm_depthwise_conv_wrapper_s4_get_buffer_size¶
Defined in File arm_nnfunctions.h
Function Documentation¶
-
int32_t arm_depthwise_conv_wrapper_s4_get_buffer_size(const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_dims *input_dims, const cmsis_nn_dims *filter_dims, const cmsis_nn_dims *output_dims)¶
Get size of additional buffer required by arm_depthwise_conv_wrapper_s4()
This sizer routes straight to the s8 _mve/_dsp legs, both of which apply the same dimension check as arm_depthwise_conv_s8_opt_get_buffer_size(), so a negative input_dims->c, a negative filter dimension or an overflowing byte count is reported as -1 on every build target. A shape that does not select the optimized depthwise route short-circuits to 0 without the dimensions being range-checked, so a caller that needs its dimensions validated must validate them rather than infer validity from a non-negative return.
- Parameters:
dw_conv_params – [in] Depthwise convolution parameters (e.g. strides, dilations, pads,…) Range of dw_conv_params->input_offset : [-127, 128] Range of dw_conv_params->input_offset : [-128, 127]
input_dims – [in] Input (activation) tensor dimensions. Format: [H, W, C_IN] Batch argument N is not used and assumed to be 1.
filter_dims – [in] Filter tensor dimensions. Format: [1, H, W, C_OUT]
output_dims – [in] Output tensor dimensions. Format: [1, H, W, C_OUT]
- Returns:
Size of additional memory required for optimizations in bytes, or -1 if the shape is out of range - a dimension the selected leg reads is negative, or the required size would not fit in an int32_t. A shape that does not select the optimized depthwise route needs no buffer and returns 0 without range-checking the dimensions, so a 0 return is not a statement that the shape is valid.