Function arm_gru_unidirectional_f16_temp1_get_buffer_size

Function Documentation

int32_t arm_gru_unidirectional_f16_temp1_get_buffer_size(const cmsis_nn_gru_params_f16 *gru_params)

Get size of the temp1 scratch buffer required by arm_gru_unidirectional_f16(). Refer to arm_gru_unidirectional_f32_temp1_get_buffer_size() for argument details, the -1-on-invalid contract and the pre-reset degenerate-0 note.

Returns:

Required buffer size in bytes: hidden_size * sizeof(float16_t) when reset_after == 0, 0 when reset_after != 0 (temp1 is never dereferenced and may be NULL). Half the figure arm_gru_unidirectional_f32_temp1_get_buffer_size() returns for the same shape - sizing an f16 layer with the f32 query over-allocates, and the reverse under-allocates.