Function arm_nn_mat_mult_nt_t_f16¶
Defined in File arm_nnsupportfunctions_flt.h
Function Documentation¶
-
arm_cmsis_nn_status arm_nn_mat_mult_nt_t_f16(const float16_t *lhs, const float16_t *rhs, const float16_t *bias, float16_t *dst, int32_t lhs_rows, int32_t rhs_rows, int32_t rhs_cols, int32_t row_address_offset, float16_t activation_min, float16_t activation_max)¶
Matrix multiply with non-transposed lhs and transposed rhs rows (float32).
Note
Accumulation width per leg. MVE legs accumulate in float16: per-k on the gather path (rhs_cols below the contiguous-K threshold), lane-partial sums then one reduction on the contiguous-K path, and float16 lanes then one reduction on the remainder rows. Error grows with rhs_cols there; the K=1024 tester cases carry measured tolerance overrides for this reason. Float16 accumulation is the chosen MVE trade-off (throughput over the last ulps); see AmbiqAI/ns-cmsis-nn#417. The scalar leg (non-MVE builds and ARM_MATH_AUTOVECTORIZE) accumulates bias and every product in float32 and rounds to float16 once before the clamp (AmbiqAI/ns-cmsis-nn#449, #457).
- Parameters:
lhs – [in] Left-hand matrix stored row-major.
rhs – [in] Right-hand matrix stored row-major, one row per output channel.
bias – [in] Optional bias vector.
dst – [out] Output matrix.
lhs_rows – [in] Number of rows in
lhs.rhs_rows – [in] Number of rows in
rhs.rhs_cols – [in] Number of columns in
rhs.row_address_offset – [in] Output row stride, expressed in elements.
activation_min – [in] Lower clamp bound.
activation_max – [in] Upper clamp bound.
- Returns:
ARM_CMSIS_NN_SUCCESSon success orARM_CMSIS_NN_ARG_ERRORon invalid arguments.