Function arm_convolve_1x1_out_s8_get_buffer_size¶
Defined in File arm_nnfunctions.h
Function Documentation¶
-
int32_t arm_convolve_1x1_out_s8_get_buffer_size(const cmsis_nn_dims *filter_dims)¶
Get the required scratch buffer size for arm_convolve_1x1_out_s8().
Note
The figure is independent of the group count. arm_convolve_1x1_out_s8() rewinds its im2col cursor to the start of the buffer after each group’s matmul, so groups do not accumulate.
Note
Callers reaching the kernel through arm_convolve_wrapper_s8() must size the buffer with arm_convolve_wrapper_s8_get_buffer_size() instead, which covers every kernel the wrapper may dispatch to. This function is for callers that invoke arm_convolve_1x1_out_s8() directly.
- Parameters:
filter_dims – [in] Filter tensor dimensions. Format: [C_OUT, KH, KW, C_IN]
- Returns:
For valid (non-negative, in-range) filter dimensions, the buffer size in bytes: round_up_4(KH * KW * C_IN) on builds with the MVE extension (ARM_MATH_MVEI), 0 otherwise, since arm_convolve_1x1_out_s8() only exists on MVE builds. Returns -1 if any of filter_dims->w, filter_dims->h or filter_dims->c is negative or out of int32_t range, or if the rounded-up product exceeds INT32_MAX. The validation runs on every build target, not just the MVE leg, so the contract does not vary by target.