Functions | |
| arm_cmsis_nn_status | arm_nn_lstm_calculate_gate_s16 (const int16_t *data_in, const int16_t *hidden_in, const cmsis_nn_lstm_gate *gate, const cmsis_nn_lstm_params *params, int16_t *output, const int32_t batch_offset) |
| Updates a LSTM gate for an iteration step of LSTM function, int16x8_16 version. | |
| arm_cmsis_nn_status | arm_nn_lstm_calculate_gate_s8_s16 (const int8_t *data_in, const int8_t *hidden_in, const cmsis_nn_lstm_gate *gate, const cmsis_nn_lstm_params *params, int16_t *output, const int32_t batch_offset) |
| Updates a LSTM gate for an iteration step of LSTM function, int8x8_16 version. | |
| arm_cmsis_nn_status | arm_nn_lstm_step_f16 (const float16_t *data_in, const float16_t *hidden_in, float16_t *hidden_out, const cmsis_nn_lstm_params_f16 *params, cmsis_nn_lstm_context_f16 *buffers, const int32_t batch_offset) |
| Update LSTM function for an iteration step using float16 input, output and state. | |
| arm_cmsis_nn_status | arm_nn_lstm_step_f32 (const float32_t *data_in, const float32_t *hidden_in, float32_t *hidden_out, const cmsis_nn_lstm_params_f32 *params, cmsis_nn_lstm_context_f32 *buffers, const int32_t batch_offset) |
| Update LSTM function for an iteration step using float32 input, output and state. | |
| arm_cmsis_nn_status | arm_nn_lstm_step_s16 (const int16_t *data_in, const int16_t *hidden_in, int16_t *hidden_out, const cmsis_nn_lstm_params *params, cmsis_nn_lstm_context *buffers, const int32_t batch_offset) |
| Update LSTM function for an iteration step using s16 input and output, and s16 internally. | |
| arm_cmsis_nn_status | arm_nn_lstm_step_s8 (const int8_t *data_in, const int8_t *hidden_in, int8_t *hidden_out, const cmsis_nn_lstm_params *params, cmsis_nn_lstm_context *buffers, const int32_t batch_offset) |
| Update LSTM function for an iteration step using s8 input and output, and s16 internally. | |
| arm_cmsis_nn_status | arm_nn_vec_mat_mul_result_acc_s8_s16 (const int8_t *lhs, const int8_t *rhs, const int32_t *effective_bias, int16_t *dst, const int32_t dst_multiplier, const int32_t dst_shift, const int32_t rhs_cols, const int32_t rhs_rows, const int32_t batches, const int32_t batch_offset) |
| The result of the multiplication is accumulated to the passed result buffer. Multiplies a matrix by a "batched" vector (i.e. a matrix with a batch dimension composed by input vectors independent from each other). | |
Support functions for LSTM
| arm_cmsis_nn_status arm_nn_lstm_calculate_gate_s16 | ( | const int16_t * | data_in, |
| const int16_t * | hidden_in, | ||
| const cmsis_nn_lstm_gate * | gate_data, | ||
| const cmsis_nn_lstm_params * | params, | ||
| int16_t * | output, | ||
| const int32_t | batch_offset | ||
| ) |
Updates a LSTM gate for an iteration step of LSTM function, int16x8_16 version.
| [in] | data_in | Data input pointer |
| [in] | hidden_in | Hidden state/ recurrent input pointer |
| [in] | gate_data | Struct containing all information about the gate caluclation, see arm_nn_types. |
| [in] | params | Struct containing all information about the lstm_operation, see arm_nn_types |
| [out] | output | Hidden state/ recurrent output pointer |
| [in] | batch_offset | Number of timesteps between consecutive batches, see arm_nn_lstm_step_s16. |
| arm_cmsis_nn_status arm_nn_lstm_calculate_gate_s8_s16 | ( | const int8_t * | data_in, |
| const int8_t * | hidden_in, | ||
| const cmsis_nn_lstm_gate * | gate_data, | ||
| const cmsis_nn_lstm_params * | params, | ||
| int16_t * | output, | ||
| const int32_t | batch_offset | ||
| ) |
Updates a LSTM gate for an iteration step of LSTM function, int8x8_16 version.
| [in] | data_in | Data input pointer |
| [in] | hidden_in | Hidden state/ recurrent input pointer |
| [in] | gate_data | Struct containing all information about the gate caluclation, see arm_nn_types. |
| [in] | params | Struct containing all information about the lstm_operation, see arm_nn_types |
| [out] | output | Hidden state/ recurrent output pointer |
| [in] | batch_offset | Number of timesteps between consecutive batches, see arm_nn_lstm_step_s8. |
| arm_cmsis_nn_status arm_nn_lstm_step_f16 | ( | const float16_t * | data_in, |
| const float16_t * | hidden_in, | ||
| float16_t * | hidden_out, | ||
| const cmsis_nn_lstm_params_f16 * | params, | ||
| cmsis_nn_lstm_context_f16 * | buffers, | ||
| const int32_t | batch_offset | ||
| ) |
Update LSTM function for an iteration step using float16 input, output and state.
| [in] | data_in | Data input pointer. |
| [in] | hidden_in | Hidden state / recurrent input pointer. May be NULL for the first step. |
| [out] | hidden_out | Hidden state / recurrent output pointer. |
| [in] | params | Struct containing all information about the LSTM operator. |
| [in] | buffers | Struct containing pointers to mutable cell-state storage. |
| [in] | batch_offset | Number of timesteps between consecutive batches. |
| arm_cmsis_nn_status arm_nn_lstm_step_f32 | ( | const float32_t * | data_in, |
| const float32_t * | hidden_in, | ||
| float32_t * | hidden_out, | ||
| const cmsis_nn_lstm_params_f32 * | params, | ||
| cmsis_nn_lstm_context_f32 * | buffers, | ||
| const int32_t | batch_offset | ||
| ) |
Update LSTM function for an iteration step using float32 input, output and state.
| [in] | data_in | Data input pointer. |
| [in] | hidden_in | Hidden state / recurrent input pointer. May be NULL for the first step. |
| [out] | hidden_out | Hidden state / recurrent output pointer. |
| [in] | params | Struct containing all information about the LSTM operator. |
| [in] | buffers | Struct containing pointers to mutable cell-state storage. |
| [in] | batch_offset | Number of timesteps between consecutive batches. |
| arm_cmsis_nn_status arm_nn_lstm_step_s16 | ( | const int16_t * | data_in, |
| const int16_t * | hidden_in, | ||
| int16_t * | hidden_out, | ||
| const cmsis_nn_lstm_params * | params, | ||
| cmsis_nn_lstm_context * | buffers, | ||
| const int32_t | batch_offset | ||
| ) |
Update LSTM function for an iteration step using s16 input and output, and s16 internally.
| [in] | data_in | Data input pointer |
| [in] | hidden_in | Hidden state/ recurrent input pointer |
| [out] | hidden_out | Hidden state/ recurrent output pointer |
| [in] | params | Struct containg all information about the lstm operator, see arm_nn_types. |
| [in] | buffers | Struct containg pointers to all temporary scratch buffers needed for the lstm operator, see arm_nn_types. |
| [in] | batch_offset | Number of timesteps between consecutive batches. E.g for params->timing_major = true, all batches for t=0 are stored sequentially, so batch offset = 1. For params->time major = false, all time steps are stored continously before the next batch, so batch offset = params->time_steps. |
| arm_cmsis_nn_status arm_nn_lstm_step_s8 | ( | const int8_t * | data_in, |
| const int8_t * | hidden_in, | ||
| int8_t * | hidden_out, | ||
| const cmsis_nn_lstm_params * | params, | ||
| cmsis_nn_lstm_context * | buffers, | ||
| const int32_t | batch_offset | ||
| ) |
Update LSTM function for an iteration step using s8 input and output, and s16 internally.
| [in] | data_in | Data input pointer |
| [in] | hidden_in | Hidden state/ recurrent input pointer |
| [out] | hidden_out | Hidden state/ recurrent output pointer |
| [in] | params | Struct containg all information about the lstm operator, see arm_nn_types. |
| [in] | buffers | Struct containg pointers to all temporary scratch buffers needed for the lstm operator, see arm_nn_types. |
| [in] | batch_offset | Number of timesteps between consecutive batches. E.g for params->timing_major = true, all batches for t=0 are stored sequentially, so batch offset = 1. For params->time major = false, all time steps are stored continously before the next batch, so batch offset = params->time_steps. |
| arm_cmsis_nn_status arm_nn_vec_mat_mul_result_acc_s8_s16 | ( | const int8_t * | lhs, |
| const int8_t * | rhs, | ||
| const int32_t * | effective_bias, | ||
| int16_t * | dst, | ||
| const int32_t | dst_multiplier, | ||
| const int32_t | dst_shift, | ||
| const int32_t | rhs_cols, | ||
| const int32_t | rhs_rows, | ||
| const int32_t | batches, | ||
| const int32_t | batch_offset | ||
| ) |
The result of the multiplication is accumulated to the passed result buffer. Multiplies a matrix by a "batched" vector (i.e. a matrix with a batch dimension composed by input vectors independent from each other).
| [in] | lhs | Batched vector |
| [in] | rhs | Weights - input matrix (H(Rows)xW(Columns)) |
| [in] | effective_bias | Bias + lhs_offset * kernel_sum term precalculated into a constant vector. |
| [out] | dst | Output |
| [in] | dst_multiplier | Multiplier for quantization |
| [in] | dst_shift | Shift for quantization |
| [in] | rhs_cols | Vector/matarix column length |
| [in] | rhs_rows | Row count of matrix |
| [in] | batches | Batch size |
| [in] | batch_offset | Number of timesteps between consecutive batches in input, see arm_nn_lstm_step_s8. Note that the output is always stored with sequential batches. |
ARM_CMSIS_NN_SUCCESS