CMSIS-NN object to contain the width and height of a tile
struct cmsis_nn_tileEnums and Data Structures used in public API.
cmsis_nn_tilestructCMSIS-NN object to contain the width and height of a tilecmsis_nn_contextstructCMSIS-NN object used for the function context.cmsis_nn_bias_datastructCMSIS-NN object used to hold bias data for int16 variants.cmsis_nn_dimsstructCMSIS-NN object to contain the dimensions of the tensorscmsis_nn_lstm_dimsstructCMSIS-NN object to contain LSTM specific input parameters related to dimensionscmsis_nn_per_channel_quant_paramsstructCMSIS-NN object for the per-channel quantization parameterscmsis_nn_per_tensor_quant_paramsstructCMSIS-NN object for the per-tensor quantization parameterscmsis_nn_quant_paramsstructCMSIS-NN object for quantization parameters.cmsis_nn_activationstructCMSIS-NN object for the quantized Relu activationcmsis_nn_conv_paramsstructCMSIS-NN object for the convolution layer parameterscmsis_nn_transpose_conv_paramsstructCMSIS-NN object for the transpose convolution layer parameterscmsis_nn_dw_conv_paramsstructCMSIS-NN object for the depthwise convolution layer parameterscmsis_nn_pool_paramsstructCMSIS-NN object for pooling layer parameterscmsis_nn_gather_paramsstructCMSIS-NN object for the gather operatorcmsis_nn_gather_nd_paramsstructCMSIS-NN object for the gathernd operatorcmsis_nn_tile_paramsstructCMSIS-NN object for the tile operatorcmsis_nn_broadcast_to_paramsstructCMSIS-NN object for the broadcastto operatorcmsis_nn_scatter_nd_paramsstructCMSIS-NN object for the scatternd operatorcmsis_nn_mirror_pad_paramsstructCMSIS-NN object for the mirrorpad operatorcmsis_nn_where_paramsstructCMSIS-NN object for the WHERE operatorcmsis_nn_select_v2_paramsstructCMSIS-NN object for the selectv2 operator (with broadcast)cmsis_nn_reverse_sequence_paramsstructCMSIS-NN object for the reversesequence operatorcmsis_nn_dynamic_update_slice_paramsstructCMSIS-NN object for the dynamicupdateslice operatorcmsis_nn_fc_paramsstructCMSIS-NN object for Fully Connected layer parameterscmsis_nn_bmm_paramsstructCMSIS-NN object for Batch Matmul layer parameterscmsis_nn_transpose_paramsstructCMSIS-NN object for Transpose layer parameterscmsis_nn_resize_paramsstructCMSIS-NN object for Resize Nearest Neighbor layer parameterscmsis_nn_svdf_paramsstructCMSIS-NN object for SVDF layer parameterscmsis_nn_softmax_lut_s16structCMSIS-NN object for Softmax s16 layer parameterscmsis_nn_concatenation_paramsstructcmsis_nn_scalingstructCMSIS-NN object for quantization parameterscmsis_nn_lstm_gatestructCMSIS-NN object for LSTM gate parameterscmsis_nn_lstm_paramsstructCMSIS-NN object for LSTM parameterscmsis_nn_lstm_contextstructCMSIS-NN object for LSTM scratch buffers.cmsis_nn_activation_f32structActivation clamp range for floating-point operators.cmsis_nn_conv_params_f32structConvolution parameters for float32 operators.cmsis_nn_transpose_conv_params_f32structTranspose convolution parameters for float32 operators.cmsis_nn_dw_conv_params_f32structDepthwise convolution parameters for float32 operators.cmsis_nn_pool_params_f32structPooling parameters for float32 operators.cmsis_nn_fc_params_f32structFully connected layer parameters for float32 operators.cmsis_nn_bmm_params_f32structBatched matrix multiplication parameters for float32 operators.cmsis_nn_ew_params_f32structElementwise operator parameters for float32 operators.cmsis_nn_transpose_params_f32structTranspose parameters for float32 operators.cmsis_nn_svdf_params_f32structSingular value decomposition filter parameters for float32 operators.cmsis_nn_lstm_gate_f32structRead-only weights and bias metadata for one float32 LSTM gate.cmsis_nn_lstm_params_f32structParameters for a unidirectional float32 LSTM layer.cmsis_nn_lstm_context_f32structScratch and mutable state buffers for a float32 LSTM invocation.cmsis_nn_gru_gate_f32structWeights and biases for a single float32 GRU gate.cmsis_nn_gru_params_f32structParameters for a float32 unidirectional GRU invocation.cmsis_nn_gru_context_f32structScratch buffers for a float32 GRU invocation.cmsis_nn_activation_f16structActivation clamp range for floating-point operators.cmsis_nn_conv_params_f16structConvolution parameters for float32 operators.cmsis_nn_transpose_conv_params_f16structTranspose convolution parameters for float32 operators.cmsis_nn_dw_conv_params_f16structDepthwise convolution parameters for float32 operators.cmsis_nn_pool_params_f16structPooling parameters for float32 operators.cmsis_nn_fc_params_f16structFully connected layer parameters for float32 operators.cmsis_nn_bmm_params_f16structBatched matrix multiplication parameters for float32 operators.cmsis_nn_ew_params_f16structElementwise operator parameters for float32 operators.cmsis_nn_transpose_params_f16structTranspose parameters for float32 operators.cmsis_nn_svdf_params_f16structSingular value decomposition filter parameters for float32 operators.cmsis_nn_lstm_gate_f16structRead-only weights and bias metadata for one float32 LSTM gate.cmsis_nn_lstm_params_f16structParameters for a unidirectional float32 LSTM layer.cmsis_nn_lstm_context_f16structScratch and mutable state buffers for a float32 LSTM invocation.cmsis_nn_gru_gate_f16structWeights and biases for a single float16 GRU gate.cmsis_nn_gru_params_f16structParameters for a float16 unidirectional GRU invocation.cmsis_nn_gru_context_f16structScratch buffers for a float16 GRU invocation.arm_nn_tensor_layoutenumTensor layout selector for floating-point APIs.arm_nn_activation_typeenumEnum for specifying activation function typesarm_nn_activation_type_fltenumActivation selector for floating-point operator APIs.arm_nn_compare_operationenumEnum for specifying comparison operatorarm_cmsis_nn_statusenumFunction return codesarm_nn_dw_kernel_layout_f32enumDepthwise kernel storage layout selector for floating-point kernels.arm_nn_weight_format_fltenumWeight storage format selector for floating-point operators.arm_nn_dw_kernel_layout_f16typeCMSIS-NN object to contain the width and height of a tile
struct cmsis_nn_tileCMSIS-NN object used for the function context.
struct cmsis_nn_contextCMSIS-NN object used to hold bias data for int16 variants.
struct cmsis_nn_bias_dataCMSIS-NN object used to hold bias data for int16 variants.
Pointer to bias data
const void * dataPointer to bias data
Indicate type of bias data.
const bool is_int32_biasIndicate type of bias data. True means int32 else int64
CMSIS-NN object to contain the dimensions of the tensors
struct cmsis_nn_dimsCMSIS-NN object to contain the dimensions of the tensors
Generic dimension to contain either the batch size or output channels.
int32_t nGeneric dimension to contain either the batch size or output channels. Please refer to the function documentation for more information
Height
int32_t hHeight
Width
int32_t wWidth
Input channels
int32_t cInput channels
CMSIS-NN object to contain LSTM specific input parameters related to dimensions
struct cmsis_nn_lstm_dimsCMSIS-NN object to contain LSTM specific input parameters related to dimensions
int32_t max_timeint32_t num_inputsint32_t num_batchesint32_t num_outputsCMSIS-NN object for the per-channel quantization parameters
struct cmsis_nn_per_channel_quant_paramsCMSIS-NN object for the per-channel quantization parameters
Multiplier values
int32_t * multiplierMultiplier values
Shift values
int32_t * shiftShift values
CMSIS-NN object for the per-tensor quantization parameters
struct cmsis_nn_per_tensor_quant_paramsCMSIS-NN object for the per-tensor quantization parameters
Multiplier value
int32_t multiplierMultiplier value
Shift value
int32_t shiftShift value
CMSIS-NN object for quantization parameters.
struct cmsis_nn_quant_paramsCMSIS-NN object for quantization parameters. This struct supports both per-tensor and per-channels requantization and is recommended for new operators.
Multiplier values
int32_t * multiplierMultiplier values
Shift values
int32_t * shiftShift values
int32_t is_per_channelCMSIS-NN object for the quantized Relu activation
struct cmsis_nn_activationCMSIS-NN object for the convolution layer parameters
struct cmsis_nn_conv_paramsCMSIS-NN object for the convolution layer parameters
The negative of the zero value for the input tensor
int32_t input_offsetThe negative of the zero value for the input tensor
The negative of the zero value for the output tensor
int32_t output_offsetThe negative of the zero value for the output tensor
cmsis_nn_tile stridecmsis_nn_tile paddingcmsis_nn_tile dilationcmsis_nn_activation activationCMSIS-NN object for the transpose convolution layer parameters
struct cmsis_nn_transpose_conv_paramsCMSIS-NN object for the transpose convolution layer parameters
The negative of the zero value for the input tensor
int32_t input_offsetThe negative of the zero value for the input tensor
The negative of the zero value for the output tensor
int32_t output_offsetThe negative of the zero value for the output tensor
cmsis_nn_tile stridecmsis_nn_tile paddingcmsis_nn_tile padding_offsetscmsis_nn_tile dilationcmsis_nn_activation activationCMSIS-NN object for the depthwise convolution layer parameters
struct cmsis_nn_dw_conv_paramsCMSIS-NN object for the depthwise convolution layer parameters
The negative of the zero value for the input tensor
int32_t input_offsetThe negative of the zero value for the input tensor
The negative of the zero value for the output tensor
int32_t output_offsetThe negative of the zero value for the output tensor
Channel Multiplier.
int32_t ch_multChannel Multiplier. ch_mult * in_ch = out_ch
cmsis_nn_tile stridecmsis_nn_tile paddingcmsis_nn_tile dilationcmsis_nn_activation activationCMSIS-NN object for pooling layer parameters
struct cmsis_nn_pool_paramsCMSIS-NN object for pooling layer parameters
cmsis_nn_tile stridecmsis_nn_tile paddingcmsis_nn_activation activationCMSIS-NN object for the gather operator
struct cmsis_nn_gather_paramsCMSIS-NN object for the gather operator
Axis to gather from.
int32_t axisAxis to gather from. Supports negative indexing.
Number of leading batch dimensions
int32_t batch_dimsNumber of leading batch dimensions
Rank of the input tensor (range: [1, 4])
int32_t input_rankRank of the input tensor (range: [1, 4])
Rank of the coordinate tensor ([1, 4]; float gather also accepts scalar rank 0)
int32_t coords_rankRank of the coordinate tensor ([1, 4]; float gather also accepts scalar rank 0)
CMSIS-NN object for the gathernd operator
struct cmsis_nn_gather_nd_paramsCMSIS-NN object for the gather_nd operator
Rank of the params tensor (range: [1, 4])
int32_t params_rankRank of the params tensor (range: [1, 4])
Rank of the indices tensor (range: [1, 4])
int32_t indices_rankRank of the indices tensor (range: [1, 4])
Number of batch dimensions
int32_t batch_dimsNumber of batch dimensions
CMSIS-NN object for the tile operator
struct cmsis_nn_tile_paramsCMSIS-NN object for the tile operator
Rank of the input tensor (range: [1, 8])
int32_t rankRank of the input tensor (range: [1, 8])
Input shape array (length = rank)
const int32_t * input_shapeInput shape array (length = rank)
Multiples array (length = rank)
const int32_t * multiplesMultiples array (length = rank)
CMSIS-NN object for the broadcastto operator
struct cmsis_nn_broadcast_to_paramsCMSIS-NN object for the broadcast_to operator
Rank of input/output tensors (range: [1, 8])
int32_t rankRank of input/output tensors (range: [1, 8])
Input shape array (length = rank)
const int32_t * input_shapeInput shape array (length = rank)
Output (broadcast target) shape array (length = rank)
const int32_t * output_shapeOutput (broadcast target) shape array (length = rank)
CMSIS-NN object for the scatternd operator
struct cmsis_nn_scatter_nd_paramsCMSIS-NN object for the scatter_nd operator
Number of update slices
int32_t num_updatesNumber of update slices
Depth of each index vector
int32_t index_depthDepth of each index vector
Size of each update slice
int32_t slice_sizeSize of each update slice
Total number of elements in output
int32_t output_sizeTotal number of elements in output
Strides of the output tensor (length = indexdepth)
const int32_t * output_stridesStrides of the output tensor (length = index_depth)
CMSIS-NN object for the mirrorpad operator
struct cmsis_nn_mirror_pad_paramsCMSIS-NN object for the mirror_pad operator
Rank of the input tensor (range: [1, 8])
int32_t rankRank of the input tensor (range: [1, 8])
Input shape array (length = rank)
const int32_t * input_shapeInput shape array (length = rank)
Output shape array (length = rank)
const int32_t * output_shapeOutput shape array (length = rank)
Padding before each dimension (length = rank)
const int32_t * pad_beforePadding before each dimension (length = rank)
0 = REFLECT, 1 = SYMMETRIC
int32_t mode0 = REFLECT, 1 = SYMMETRIC
CMSIS-NN object for the WHERE operator
struct cmsis_nn_where_paramsCMSIS-NN object for the WHERE operator
Rank of the condition tensor (range: [1, 8])
int32_t rankRank of the condition tensor (range: [1, 8])
Condition tensor shape array (length = rank)
const int32_t * shapeCondition tensor shape array (length = rank)
CMSIS-NN object for the selectv2 operator (with broadcast)
struct cmsis_nn_select_v2_paramsCMSIS-NN object for the select_v2 operator (with broadcast)
Rank of the output tensor (range: [1, 8])
int32_t rankRank of the output tensor (range: [1, 8])
Output shape array (length = rank)
const int32_t * output_shapeOutput shape array (length = rank)
Condition tensor broadcast strides (length = rank)
const int32_t * cond_stridesCondition tensor broadcast strides (length = rank)
X tensor broadcast strides (length = rank)
const int32_t * x_stridesX tensor broadcast strides (length = rank)
Y tensor broadcast strides (length = rank)
const int32_t * y_stridesY tensor broadcast strides (length = rank)
CMSIS-NN object for the reversesequence operator
struct cmsis_nn_reverse_sequence_paramsCMSIS-NN object for the reverse_sequence operator
Rank of the input tensor (range: [1, 8])
int32_t rankRank of the input tensor (range: [1, 8])
Input shape array (length = rank)
const int32_t * shapeInput shape array (length = rank)
Dimension along which to reverse
int32_t seq_dimDimension along which to reverse
Batch dimension
int32_t batch_dimBatch dimension
CMSIS-NN object for the dynamicupdateslice operator
struct cmsis_nn_dynamic_update_slice_paramsCMSIS-NN object for the dynamic_update_slice operator
Rank of the operand tensor (range: [1, 8])
int32_t rankRank of the operand tensor (range: [1, 8])
Operand shape array (length = rank)
const int32_t * operand_shapeOperand shape array (length = rank)
Update shape array (length = rank)
const int32_t * update_shapeUpdate shape array (length = rank)
Total number of elements in operand
int32_t operand_sizeTotal number of elements in operand
Total number of elements in update
int32_t update_sizeTotal number of elements in update
Strides of the operand tensor (length = rank)
const int32_t * operand_stridesStrides of the operand tensor (length = rank)
CMSIS-NN object for Fully Connected layer parameters
struct cmsis_nn_fc_paramsCMSIS-NN object for Fully Connected layer parameters
The negative of the zero value for the input tensor
int32_t input_offsetThe negative of the zero value for the input tensor
The negative of the zero value for the filter tensor
int32_t filter_offsetThe negative of the zero value for the filter tensor
The negative of the zero value for the output tensor
int32_t output_offsetThe negative of the zero value for the output tensor
cmsis_nn_activation activationCMSIS-NN object for Batch Matmul layer parameters
struct cmsis_nn_bmm_paramsCMSIS-NN object for Batch Matmul layer parameters
const bool adj_xconst bool adj_ycmsis_nn_fc_params fc_paramsCMSIS-NN object for Transpose layer parameters
struct cmsis_nn_transpose_paramsCMSIS-NN object for Transpose layer parameters
const int32_t num_dimsThe dimensions applied to the input dimensions
const uint32_t * permutationsThe dimensions applied to the input dimensions
CMSIS-NN object for Resize Nearest Neighbor layer parameters
struct cmsis_nn_resize_paramsCMSIS-NN object for Resize Nearest Neighbor layer parameters
Align corners when calculating interpolation
bool align_cornersAlign corners when calculating interpolation
Use half pixel centers when calculating interpolation
bool half_pixel_centersUse half pixel centers when calculating interpolation
CMSIS-NN object for SVDF layer parameters
struct cmsis_nn_svdf_paramsCMSIS-NN object for SVDF layer parameters
int32_t rankThe negative of the zero value for the input tensor
int32_t input_offsetThe negative of the zero value for the input tensor
The negative of the zero value for the output tensor
int32_t output_offsetThe negative of the zero value for the output tensor
cmsis_nn_activation input_activationcmsis_nn_activation output_activationCMSIS-NN object for Softmax s16 layer parameters
struct cmsis_nn_softmax_lut_s16CMSIS-NN object for Softmax s16 layer parameters
const int16_t * exp_lutconst int16_t * one_by_one_lutstruct cmsis_nn_concatenation_paramsconst int32_t axisCMSIS-NN object for quantization parameters
struct cmsis_nn_scalingCMSIS-NN object for quantization parameters
Multiplier value
int32_t multiplierMultiplier value
Shift value
int32_t shiftShift value
CMSIS-NN object for LSTM gate parameters
struct cmsis_nn_lstm_gateCMSIS-NN object for LSTM gate parameters
int32_t input_multiplierint32_t input_shiftconst void * input_weightsBias added with precomputed kernelsum lhsoffset
const void * input_effective_biasBias added with precomputed kernel_sum * lhs_offset
const void * biasarm_nn_activation_type activation_typeCMSIS-NN object for LSTM parameters
struct cmsis_nn_lstm_paramsCMSIS-NN object for LSTM parameters
0 if first dimension is batch, else first dimension is time
int32_t time_major0 if first dimension is batch, else first dimension is time
int32_t batch_sizeint32_t time_stepsSize of new data input into the LSTM cell
int32_t input_sizeSize of new data input into the LSTM cell
int32_t input_offsetint32_t forget_to_cell_multiplierint32_t forget_to_cell_shiftint32_t input_to_cell_multiplierint32_t input_to_cell_shiftMin/max value of cell output
int32_t cell_clipMin/max value of cell output
int32_t cell_scale_powerint32_t output_multiplierint32_t output_shiftint32_t output_offsetcmsis_nn_lstm_gate forget_gatecmsis_nn_lstm_gate input_gatecmsis_nn_lstm_gate cell_gatecmsis_nn_lstm_gate output_gateCMSIS-NN object for LSTM scratch buffers.
struct cmsis_nn_lstm_contextCMSIS-NN object for LSTM scratch buffers.
There is no size field and no runtime enforcement: an undersized temp1 or temp2 is written past on every build target, so size them from the queries below, not by transcribing a formula.
Gate-vector scratch (int16t elements for both the s8 and s16 layers).
void * temp1Gate-vector scratch (int16_t elements for both the s8 and s16 layers). Sized by arm_lstm_unidirectional_s8_temp1_get_buffer_size() / arm_lstm_unidirectional_s16_temp1_get_buffer_size().
Cell-gate and tanh(cellstate) scratch (int16t elements for both layers).
void * temp2Cell-gate and tanh(cell_state) scratch (int16_t elements for both layers). Sized by arm_lstm_unidirectional_s8_temp2_get_buffer_size() / arm_lstm_unidirectional_s16_temp2_get_buffer_size().
Cell-state buffer, batchsize hiddensize int16t elements for both layers.
void * cell_stateCell-state buffer, batch_size * hidden_size int16_t elements for both layers.
Activation clamp range for floating-point operators.
struct cmsis_nn_activation_f32Convolution parameters for float32 operators.
struct cmsis_nn_conv_params_f32Convolution parameters for float32 operators.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Spatial dilation.
cmsis_nn_tile dilationSpatial dilation.
Output activation clamp range.
cmsis_nn_activation_f32 activationOutput activation clamp range.
Filter storage format.
arm_nn_weight_format_flt weight_formatFilter storage format.
Transpose convolution parameters for float32 operators.
struct cmsis_nn_transpose_conv_params_f32Transpose convolution parameters for float32 operators.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Output padding adjustment for transpose convolution.
cmsis_nn_tile padding_offsetsOutput padding adjustment for transpose convolution.
Spatial dilation.
cmsis_nn_tile dilationSpatial dilation.
Output activation clamp range.
cmsis_nn_activation_f32 activationOutput activation clamp range.
Depthwise convolution parameters for float32 operators.
struct cmsis_nn_dw_conv_params_f32Depthwise convolution parameters for float32 operators.
Channel multiplier.
int32_t ch_multChannel multiplier. ch_mult * in_ch = out_ch.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Spatial dilation.
cmsis_nn_tile dilationSpatial dilation.
Output activation clamp range.
cmsis_nn_activation_f32 activationOutput activation clamp range.
Pooling parameters for float32 operators.
struct cmsis_nn_pool_params_f32Pooling parameters for float32 operators.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Output activation clamp range.
cmsis_nn_activation_f32 activationOutput activation clamp range.
Fully connected layer parameters for float32 operators.
struct cmsis_nn_fc_params_f32Fully connected layer parameters for float32 operators.
Output activation clamp range.
cmsis_nn_activation_f32 activationOutput activation clamp range.
Weight storage format.
arm_nn_weight_format_flt weight_formatWeight storage format.
Batched matrix multiplication parameters for float32 operators.
struct cmsis_nn_bmm_params_f32Batched matrix multiplication parameters for float32 operators.
True when the left-hand-side operand is stored transposed.
const bool adj_xTrue when the left-hand-side operand is stored transposed.
True when the right-hand-side operand is stored transposed.
const bool adj_yTrue when the right-hand-side operand is stored transposed.
Output activation clamp range.
cmsis_nn_activation_f32 activationOutput activation clamp range.
Right-hand-side operand storage format.
arm_nn_weight_format_flt rhs_formatRight-hand-side operand storage format. ARM_NN_WEIGHT_FORMAT_NT_N_PACKED is currently supported only when adj_x == false and adj_y == false.
Elementwise operator parameters for float32 operators.
struct cmsis_nn_ew_params_f32Elementwise operator parameters for float32 operators.
Output activation clamp range.
cmsis_nn_activation_f32 activationOutput activation clamp range.
Transpose parameters for float32 operators.
struct cmsis_nn_transpose_params_f32Transpose parameters for float32 operators.
Number of active dimensions in the permutation.
int32_t num_dimsNumber of active dimensions in the permutation.
Permutation indices.
int32_t perm[4]Permutation indices.
Layout convention used to interpret tensor dimensions.
arm_nn_tensor_layout layoutLayout convention used to interpret tensor dimensions.
Singular value decomposition filter parameters for float32 operators.
struct cmsis_nn_svdf_params_f32Singular value decomposition filter parameters for float32 operators.
SVDF rank.
int32_t rankSVDF rank.
Clamp range applied after the input projection.
cmsis_nn_activation_f32 input_activationClamp range applied after the input projection.
Clamp range applied to the final output.
cmsis_nn_activation_f32 output_activationClamp range applied to the final output.
Read-only weights and bias metadata for one float32 LSTM gate.
struct cmsis_nn_lstm_gate_f32Read-only weights and bias metadata for one float32 LSTM gate.
Input-to-gate weight matrix.
const float32_t * input_weightsInput-to-gate weight matrix.
Optional gate bias vector.
const float32_t * biasOptional gate bias vector.
Gate activation selector.
arm_nn_activation_type_flt activation_typeGate activation selector.
Parameters for a unidirectional float32 LSTM layer.
struct cmsis_nn_lstm_params_f32Parameters for a unidirectional float32 LSTM layer.
Non-zero when input/output tensors are time-major.
int32_t time_majorNon-zero when input/output tensors are time-major.
Batch size processed per invocation.
int32_t batch_sizeBatch size processed per invocation.
Number of time steps processed per invocation.
int32_t time_stepsNumber of time steps processed per invocation.
Input feature size per time step.
int32_t input_sizeInput feature size per time step.
Optional cell-state clip value.
float32_t cell_clipOptional cell-state clip value.
Forget gate weights and activation.
cmsis_nn_lstm_gate_f32 forget_gateForget gate weights and activation.
Input gate weights and activation.
cmsis_nn_lstm_gate_f32 input_gateInput gate weights and activation.
Cell-update gate weights and activation.
cmsis_nn_lstm_gate_f32 cell_gateCell-update gate weights and activation.
Output gate weights and activation.
cmsis_nn_lstm_gate_f32 output_gateOutput gate weights and activation.
Scratch and mutable state buffers for a float32 LSTM invocation.
struct cmsis_nn_lstm_context_f32Scratch and mutable state buffers for a float32 LSTM invocation.
Unused by the current implementation and may be NULL.
float32_t * temp1Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f32_temp1_get_buffer_size(), which reports 0; size from the query rather than hard-coding NULL if the buffer is arena-allocated.
Unused by the current implementation and may be NULL.
float32_t * temp2Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f32_temp2_get_buffer_size().
Mutable cell-state buffer (in/out when streaming).
float32_t * cell_stateMutable cell-state buffer (in/out when streaming).
Weights and biases for a single float32 GRU gate.
struct cmsis_nn_gru_gate_f32Weights and biases for a single float32 GRU gate.
The activation (sigmoid for update/reset, tanh for candidate) is implied by the gate’s role and is not stored here. The reset-after formulation keeps the input-projection bias and the recurrent-projection bias separate, because the reset gate multiplies the recurrent projection (including its bias) after the matmul.
Input-to-gate weight matrix [hiddensize, inputsize].
const float32_t * input_weightsInput-to-gate weight matrix [hidden_size, input_size].
Optional input-projection bias [hiddensize].
const float32_t * input_biasOptional input-projection bias [hidden_size]. May be NULL.
Parameters for a float32 unidirectional GRU invocation.
struct cmsis_nn_gru_params_f32Parameters for a float32 unidirectional GRU invocation.
GRU has three gates (update, reset, candidate) and, unlike LSTM, no cell state. The hidden state is the layer output.
Non-zero when input/output tensors are time-major.
int32_t time_majorNon-zero when input/output tensors are time-major.
Batch size processed per invocation.
int32_t batch_sizeBatch size processed per invocation.
Number of time steps processed per invocation.
int32_t time_stepsNumber of time steps processed per invocation.
Input feature size per time step.
int32_t input_sizeInput feature size per time step.
Non-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).
int32_t reset_afterNon-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).
Update gate (z), sigmoid activation.
cmsis_nn_gru_gate_f32 update_gateUpdate gate (z), sigmoid activation.
Reset gate (r), sigmoid activation.
cmsis_nn_gru_gate_f32 reset_gateReset gate (r), sigmoid activation.
Candidate/new gate (n), tanh activation.
cmsis_nn_gru_gate_f32 candidate_gateCandidate/new gate (n), tanh activation.
Scratch buffers for a float32 GRU invocation.
struct cmsis_nn_gru_context_f32Scratch buffers for a float32 GRU invocation.
Scratch required when resetafter == 0; sized by armgruunidirectionalf32temp1getbuffersize().
float32_t * temp1Scratch required when reset_after == 0; sized by arm_gru_unidirectional_f32_temp1_get_buffer_size().
Activation clamp range for floating-point operators.
struct cmsis_nn_activation_f16Convolution parameters for float32 operators.
struct cmsis_nn_conv_params_f16Convolution parameters for float32 operators.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Spatial dilation.
cmsis_nn_tile dilationSpatial dilation.
Output activation clamp range.
cmsis_nn_activation_f16 activationOutput activation clamp range.
Filter storage format.
arm_nn_weight_format_flt weight_formatFilter storage format.
Transpose convolution parameters for float32 operators.
struct cmsis_nn_transpose_conv_params_f16Transpose convolution parameters for float32 operators.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Output padding adjustment for transpose convolution.
cmsis_nn_tile padding_offsetsOutput padding adjustment for transpose convolution.
Spatial dilation.
cmsis_nn_tile dilationSpatial dilation.
Output activation clamp range.
cmsis_nn_activation_f16 activationOutput activation clamp range.
Depthwise convolution parameters for float32 operators.
struct cmsis_nn_dw_conv_params_f16Depthwise convolution parameters for float32 operators.
Channel multiplier.
int32_t ch_multChannel multiplier. ch_mult * in_ch = out_ch.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Spatial dilation.
cmsis_nn_tile dilationSpatial dilation.
Output activation clamp range.
cmsis_nn_activation_f16 activationOutput activation clamp range.
Pooling parameters for float32 operators.
struct cmsis_nn_pool_params_f16Pooling parameters for float32 operators.
Spatial stride.
cmsis_nn_tile strideSpatial stride.
Spatial zero-padding.
cmsis_nn_tile paddingSpatial zero-padding.
Output activation clamp range.
cmsis_nn_activation_f16 activationOutput activation clamp range.
Fully connected layer parameters for float32 operators.
struct cmsis_nn_fc_params_f16Fully connected layer parameters for float32 operators.
Output activation clamp range.
cmsis_nn_activation_f16 activationOutput activation clamp range.
Weight storage format.
arm_nn_weight_format_flt weight_formatWeight storage format.
Batched matrix multiplication parameters for float32 operators.
struct cmsis_nn_bmm_params_f16Batched matrix multiplication parameters for float32 operators.
True when the left-hand-side operand is stored transposed.
const bool adj_xTrue when the left-hand-side operand is stored transposed.
True when the right-hand-side operand is stored transposed.
const bool adj_yTrue when the right-hand-side operand is stored transposed.
Output activation clamp range.
cmsis_nn_activation_f16 activationOutput activation clamp range.
Right-hand-side operand storage format.
arm_nn_weight_format_flt rhs_formatRight-hand-side operand storage format. ARM_NN_WEIGHT_FORMAT_NT_N_PACKED is currently supported only when adj_x == false and adj_y == false.
Elementwise operator parameters for float32 operators.
struct cmsis_nn_ew_params_f16Elementwise operator parameters for float32 operators.
Output activation clamp range.
cmsis_nn_activation_f16 activationOutput activation clamp range.
Transpose parameters for float32 operators.
struct cmsis_nn_transpose_params_f16Transpose parameters for float32 operators.
Number of active dimensions in the permutation.
int32_t num_dimsNumber of active dimensions in the permutation.
Permutation indices.
int32_t perm[4]Permutation indices.
Layout convention used to interpret tensor dimensions.
arm_nn_tensor_layout layoutLayout convention used to interpret tensor dimensions.
Singular value decomposition filter parameters for float32 operators.
struct cmsis_nn_svdf_params_f16Singular value decomposition filter parameters for float32 operators.
SVDF rank.
int32_t rankSVDF rank.
Clamp range applied after the input projection.
cmsis_nn_activation_f16 input_activationClamp range applied after the input projection.
Clamp range applied to the final output.
cmsis_nn_activation_f16 output_activationClamp range applied to the final output.
Read-only weights and bias metadata for one float32 LSTM gate.
struct cmsis_nn_lstm_gate_f16Read-only weights and bias metadata for one float32 LSTM gate.
Input-to-gate weight matrix.
const float16_t * input_weightsInput-to-gate weight matrix.
Optional gate bias vector.
const float16_t * biasOptional gate bias vector.
Gate activation selector.
arm_nn_activation_type_flt activation_typeGate activation selector.
Parameters for a unidirectional float32 LSTM layer.
struct cmsis_nn_lstm_params_f16Parameters for a unidirectional float32 LSTM layer.
Non-zero when input/output tensors are time-major.
int32_t time_majorNon-zero when input/output tensors are time-major.
Batch size processed per invocation.
int32_t batch_sizeBatch size processed per invocation.
Number of time steps processed per invocation.
int32_t time_stepsNumber of time steps processed per invocation.
Input feature size per time step.
int32_t input_sizeInput feature size per time step.
Optional cell-state clip value.
float16_t cell_clipOptional cell-state clip value.
Forget gate weights and activation.
cmsis_nn_lstm_gate_f16 forget_gateForget gate weights and activation.
Input gate weights and activation.
cmsis_nn_lstm_gate_f16 input_gateInput gate weights and activation.
Cell-update gate weights and activation.
cmsis_nn_lstm_gate_f16 cell_gateCell-update gate weights and activation.
Output gate weights and activation.
cmsis_nn_lstm_gate_f16 output_gateOutput gate weights and activation.
Scratch and mutable state buffers for a float32 LSTM invocation.
struct cmsis_nn_lstm_context_f16Scratch and mutable state buffers for a float32 LSTM invocation.
Unused by the current implementation and may be NULL.
float16_t * temp1Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f16_temp1_get_buffer_size(), which reports 0; size from the query rather than hard-coding NULL if the buffer is arena-allocated.
Unused by the current implementation and may be NULL.
float16_t * temp2Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f16_temp2_get_buffer_size().
Mutable cell-state buffer (in/out when streaming).
float16_t * cell_stateMutable cell-state buffer (in/out when streaming).
Weights and biases for a single float16 GRU gate.
struct cmsis_nn_gru_gate_f16Weights and biases for a single float16 GRU gate.
The activation (sigmoid for update/reset, tanh for candidate) is implied by the gate’s role and is not stored here. The reset-after formulation keeps the input-projection bias and the recurrent-projection bias separate, because the reset gate multiplies the recurrent projection (including its bias) after the matmul.
Input-to-gate weight matrix [hiddensize, inputsize].
const float16_t * input_weightsInput-to-gate weight matrix [hidden_size, input_size].
Optional input-projection bias [hiddensize].
const float16_t * input_biasOptional input-projection bias [hidden_size]. May be NULL.
Parameters for a float16 unidirectional GRU invocation.
struct cmsis_nn_gru_params_f16Parameters for a float16 unidirectional GRU invocation.
GRU has three gates (update, reset, candidate) and, unlike LSTM, no cell state. The hidden state is the layer output.
Non-zero when input/output tensors are time-major.
int32_t time_majorNon-zero when input/output tensors are time-major.
Batch size processed per invocation.
int32_t batch_sizeBatch size processed per invocation.
Number of time steps processed per invocation.
int32_t time_stepsNumber of time steps processed per invocation.
Input feature size per time step.
int32_t input_sizeInput feature size per time step.
Non-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).
int32_t reset_afterNon-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).
Update gate (z), sigmoid activation.
cmsis_nn_gru_gate_f16 update_gateUpdate gate (z), sigmoid activation.
Reset gate (r), sigmoid activation.
cmsis_nn_gru_gate_f16 reset_gateReset gate (r), sigmoid activation.
Candidate/new gate (n), tanh activation.
cmsis_nn_gru_gate_f16 candidate_gateCandidate/new gate (n), tanh activation.
Scratch buffers for a float16 GRU invocation.
struct cmsis_nn_gru_context_f16Scratch buffers for a float16 GRU invocation.
Scratch required when resetafter == 0; sized by armgruunidirectionalf16temp1getbuffersize().
float16_t * temp1Scratch required when reset_after == 0; sized by arm_gru_unidirectional_f16_temp1_get_buffer_size().
Tensor layout selector for floating-point APIs.
enum arm_nn_tensor_layoutTensor layout selector for floating-point APIs.
Float public APIs currently accept NHWC layout only.
Tensor dimensions are ordered as [N, H, W, C].
ARM_NN_LAYOUT_NHWC = 0Tensor dimensions are ordered as [N, H, W, C].
Enum for specifying activation function types
enum arm_nn_activation_typeEnum for specifying activation function types
Sigmoid activation function
ARM_SIGMOID = 0Sigmoid activation function
Tanh activation function
ARM_TANH = 1Tanh activation function
Activation selector for floating-point operator APIs.
enum arm_nn_activation_type_fltActivation selector for floating-point operator APIs.
Numeric values intentionally live in a dedicated floating-point range to avoid overlap with the legacy integer public activation enum.
Identity activation function.
ARM_NN_FLT_ACT_NONE = 32Identity activation function.
Sigmoid activation function.
ARM_NN_FLT_ACT_SIGMOID = 33Sigmoid activation function.
Hyperbolic tangent activation function.
ARM_NN_FLT_ACT_TANH = 34Hyperbolic tangent activation function.
ReLU activation function.
ARM_NN_FLT_ACT_RELU = 35ReLU activation function.
ReLU6 activation function.
ARM_NN_FLT_ACT_RELU6 = 36ReLU6 activation function.
Hard-swish activation function.
ARM_NN_FLT_ACT_HARDSWISH = 37Hard-swish activation function.
Leaky ReLU activation function.
ARM_NN_FLT_ACT_LEAKY_RELU = 38Leaky ReLU activation function.
Enum for specifying comparison operator
enum arm_nn_compare_operationEnum for specifying comparison operator
Returns 1 if lhs == rhs else 0
ARM_COMPARE_EQUAL = 0Returns 1 if lhs == rhs else 0
Returns 1 if lhs != rhs else 0
ARM_COMPARE_NOT_EQUAL = 1Returns 1 if lhs != rhs else 0
Returns 1 if lhs > rhs else 0
ARM_COMPARE_GREATER = 2Returns 1 if lhs > rhs else 0
Returns 1 if lhs >= rhs else 0
ARM_COMPARE_GREATER_EQUAL = 3Returns 1 if lhs >= rhs else 0
Returns 1 if lhs < rhs else 0
ARM_COMPARE_LESS = 4Returns 1 if lhs < rhs else 0
Returns 1 if lhs <= rhs else 0
ARM_COMPARE_LESS_EQUAL = 5Returns 1 if lhs <= rhs else 0
Function return codes
enum arm_cmsis_nn_statusFunction return codes
No error
ARM_CMSIS_NN_SUCCESS = 0No error
One or more arguments are incorrect
ARM_CMSIS_NN_ARG_ERROR = -1One or more arguments are incorrect
No implementation available
ARM_CMSIS_NN_NO_IMPL_ERROR = -2No implementation available
Logical error
ARM_CMSIS_NN_FAILURE = -3Logical error
Depthwise kernel storage layout selector for floating-point kernels.
enum arm_nn_dw_kernel_layout_f32Depthwise kernel storage layout selector for floating-point kernels.
Public float depthwise entry points currently use KC storage ([k][c]).
Depthwise kernel stored as [kernel][channel].
ARM_NN_DW_KERNEL_KC = 0Depthwise kernel stored as [kernel][channel].
Depthwise kernel stored as [channel][kernel].
ARM_NN_DW_KERNEL_CK = 1Depthwise kernel stored as [channel][kernel].
Weight storage format selector for floating-point operators.
enum arm_nn_weight_format_fltWeight storage format selector for floating-point operators.
This enum allows frameworks to describe whether weights are provided in the standard public operator layout or in a backend-specific packed layout.
ARM_NN_WEIGHT_FORMAT_NT_N_PACKED matches the packed RHS layout consumed by arm_nn_mat_mult_nt_n_packed_f16/f32.
The packed NTxN layout exists because MVE kernels typically perform best when output-channel blocks can be loaded contiguously. With the standard NT x T formulation, vectorizing over output channels tends to require gather-load accesses to the RHS, which is less efficient than a packed non-transposed RHS layout.
For operators that support ARM_NN_WEIGHT_FORMAT_NT_N_PACKED, supplying offline-repacked constant weights in this layout is therefore generally the preferred way to achieve the best MVE performance.
Standard public operator layout.
ARM_NN_WEIGHT_FORMAT_STANDARD = 0Standard public operator layout.
Packed [K][N-block] layout for NTxN matmul helpers.
ARM_NN_WEIGHT_FORMAT_NT_N_PACKED = 1Packed [K][N-block] layout for NTxN matmul helpers.
typedef arm_nn_dw_kernel_layout_f32 arm_nn_dw_kernel_layout_f16