Function arm_batch_matmul_s8_get_buffer_size

Function Documentation

int32_t arm_batch_matmul_s8_get_buffer_size(const cmsis_nn_dims *input_rhs_dims)

Get size of the scratch buffer required by arm_batch_matmul_s8().

For a valid (non-negative, in-range) input_rhs_dims->w, returns input_rhs_dims->w * sizeof(int32_t) on builds with the MVE extension and 0 elsewhere. For an invalid input_rhs_dims->w, returns -1 on every build target. input_rhs_dims->w is the rhs row count, which is what the kernel-sum buffer is indexed by; sizing this buffer from any other dims (in particular with arm_fully_connected_s8_get_buffer_size(), which reads .c) writes past the allocation whenever the rhs has more rows than columns. arm_batch_matmul_s16() needs no scratch buffer and so has no corresponding sizer.

Parameters:
Returns:

The function returns required buffer size in bytes, or -1 if input_rhs_dims->w is negative or the required size would not fit in an int32_t