Enums and Data Structures used in public API. More...
Data Structures | |
| struct | cmsis_nn_tile |
| struct | cmsis_nn_context |
| struct | cmsis_nn_bias_data |
| struct | cmsis_nn_dims |
| struct | cmsis_nn_lstm_dims |
| struct | cmsis_nn_per_channel_quant_params |
| struct | cmsis_nn_per_tensor_quant_params |
| struct | cmsis_nn_quant_params |
| struct | cmsis_nn_activation |
| struct | cmsis_nn_conv_params |
| struct | cmsis_nn_transpose_conv_params |
| struct | cmsis_nn_dw_conv_params |
| struct | cmsis_nn_pool_params |
| struct | cmsis_nn_fc_params |
| struct | cmsis_nn_bmm_params |
| struct | cmsis_nn_transpose_params |
| struct | cmsis_nn_svdf_params |
| struct | cmsis_nn_softmax_lut_s16 |
| struct | cmsis_nn_scaling |
| struct | cmsis_nn_lstm_gate |
| struct | cmsis_nn_lstm_params |
| struct | cmsis_nn_lstm_context |
| struct | cmsis_nn_activation_f32 |
| Activation clamp range for floating-point operators. More... | |
| struct | cmsis_nn_conv_params_f32 |
| Convolution parameters for float32 operators. More... | |
| struct | cmsis_nn_transpose_conv_params_f32 |
| Transpose convolution parameters for float32 operators. More... | |
| struct | cmsis_nn_dw_conv_params_f32 |
| Depthwise convolution parameters for float32 operators. More... | |
| struct | cmsis_nn_pool_params_f32 |
| Pooling parameters for float32 operators. More... | |
| struct | cmsis_nn_fc_params_f32 |
| Fully connected layer parameters for float32 operators. More... | |
| struct | cmsis_nn_bmm_params_f32 |
| Batched matrix multiplication parameters for float32 operators. More... | |
| struct | cmsis_nn_ew_params_f32 |
| Elementwise operator parameters for float32 operators. More... | |
| struct | cmsis_nn_transpose_params_f32 |
| Transpose parameters for float32 operators. More... | |
| struct | cmsis_nn_svdf_params_f32 |
| Singular value decomposition filter parameters for float32 operators. More... | |
| struct | cmsis_nn_lstm_gate_f32 |
| Read-only weights and bias metadata for one float32 LSTM gate. More... | |
| struct | cmsis_nn_lstm_params_f32 |
| Parameters for a unidirectional float32 LSTM layer. More... | |
| struct | cmsis_nn_lstm_context_f32 |
| Scratch and mutable state buffers for a float32 LSTM invocation. More... | |
| struct | cmsis_nn_activation_f16 |
| Activation clamp range for floating-point operators. More... | |
| struct | cmsis_nn_conv_params_f16 |
| Convolution parameters for float32 operators. More... | |
| struct | cmsis_nn_transpose_conv_params_f16 |
| Transpose convolution parameters for float32 operators. More... | |
| struct | cmsis_nn_dw_conv_params_f16 |
| Depthwise convolution parameters for float32 operators. More... | |
| struct | cmsis_nn_pool_params_f16 |
| Pooling parameters for float32 operators. More... | |
| struct | cmsis_nn_fc_params_f16 |
| Fully connected layer parameters for float32 operators. More... | |
| struct | cmsis_nn_bmm_params_f16 |
| Batched matrix multiplication parameters for float32 operators. More... | |
| struct | cmsis_nn_ew_params_f16 |
| Elementwise operator parameters for float32 operators. More... | |
| struct | cmsis_nn_transpose_params_f16 |
| Transpose parameters for float32 operators. More... | |
| struct | cmsis_nn_svdf_params_f16 |
| Singular value decomposition filter parameters for float32 operators. More... | |
| struct | cmsis_nn_lstm_gate_f16 |
| Read-only weights and bias metadata for one float32 LSTM gate. More... | |
| struct | cmsis_nn_lstm_params_f16 |
| Parameters for a unidirectional float32 LSTM layer. More... | |
| struct | cmsis_nn_lstm_context_f16 |
| Scratch and mutable state buffers for a float32 LSTM invocation. More... | |
Typedefs | |
| typedef char | arm_nn_static_assert___LINE__[(((int) ARM_TANH)<((int) ARM_NN_FLT_ACT_NONE)) ? 1 :-1] |
| typedef arm_nn_dw_kernel_layout_f32 | arm_nn_dw_kernel_layout_f16 |
Enumerations | |
| enum | arm_nn_activation_type { ARM_SIGMOID = 0 , ARM_TANH = 1 } |
| enum | arm_cmsis_nn_status { ARM_CMSIS_NN_SUCCESS = 0 , ARM_CMSIS_NN_ARG_ERROR = -1 , ARM_CMSIS_NN_NO_IMPL_ERROR = -2 , ARM_CMSIS_NN_FAILURE = -3 } |
| enum | arm_nn_tensor_layout { ARM_NN_LAYOUT_NHWC = 0 } |
| Tensor layout selector for floating-point APIs. More... | |
| enum | arm_nn_activation_type_flt { ARM_NN_FLT_ACT_NONE = 32 , ARM_NN_FLT_ACT_SIGMOID = 33 , ARM_NN_FLT_ACT_TANH = 34 , ARM_NN_FLT_ACT_RELU = 35 , ARM_NN_FLT_ACT_RELU6 = 36 , ARM_NN_FLT_ACT_HARDSWISH = 37 , ARM_NN_FLT_ACT_LEAKY_RELU = 38 } |
| Activation selector for floating-point operator APIs. More... | |
| enum | arm_nn_dw_kernel_layout_f32 { ARM_NN_DW_KERNEL_KC = 0 , ARM_NN_DW_KERNEL_CK = 1 } |
| Depthwise kernel storage layout selector for floating-point kernels. More... | |
| enum | arm_nn_weight_format_flt { ARM_NN_WEIGHT_FORMAT_STANDARD = 0 , ARM_NN_WEIGHT_FORMAT_NT_N_PACKED = 1 } |
| Weight storage format selector for floating-point operators. More... | |
Enums and Data Structures used in public API.
| struct cmsis_nn_tile |
| struct cmsis_nn_context |
| struct cmsis_nn_bias_data |
| struct cmsis_nn_dims |
| struct cmsis_nn_lstm_dims |
| struct cmsis_nn_per_channel_quant_params |
| struct cmsis_nn_per_tensor_quant_params |
| struct cmsis_nn_quant_params |
| struct cmsis_nn_activation |
| struct cmsis_nn_conv_params |
CMSIS-NN object for the convolution layer parameters
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation | activation | |
| cmsis_nn_tile | dilation | |
| int32_t | input_offset |
The negative of the zero value for the input tensor |
| int32_t | output_offset |
The negative of the zero value for the output tensor |
| cmsis_nn_tile | padding | |
| cmsis_nn_tile | stride | |
| struct cmsis_nn_transpose_conv_params |
CMSIS-NN object for the transpose convolution layer parameters
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation | activation | |
| cmsis_nn_tile | dilation | |
| int32_t | input_offset |
The negative of the zero value for the input tensor |
| int32_t | output_offset |
The negative of the zero value for the output tensor |
| cmsis_nn_tile | padding | |
| cmsis_nn_tile | padding_offsets | |
| cmsis_nn_tile | stride | |
| struct cmsis_nn_dw_conv_params |
CMSIS-NN object for the depthwise convolution layer parameters
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation | activation | |
| int32_t | ch_mult |
Channel Multiplier. ch_mult * in_ch = out_ch |
| cmsis_nn_tile | dilation | |
| int32_t | input_offset |
The negative of the zero value for the input tensor |
| int32_t | output_offset |
The negative of the zero value for the output tensor |
| cmsis_nn_tile | padding | |
| cmsis_nn_tile | stride | |
| struct cmsis_nn_pool_params |
CMSIS-NN object for pooling layer parameters
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation | activation | |
| cmsis_nn_tile | padding | |
| cmsis_nn_tile | stride | |
| struct cmsis_nn_fc_params |
CMSIS-NN object for Fully Connected layer parameters
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation | activation | |
| int32_t | filter_offset |
The negative of the zero value for the filter tensor |
| int32_t | input_offset |
The negative of the zero value for the input tensor |
| int32_t | output_offset |
The negative of the zero value for the output tensor |
| struct cmsis_nn_bmm_params |
CMSIS-NN object for Batch Matmul layer parameters
| Data Fields | ||
|---|---|---|
| const bool | adj_x | |
| const bool | adj_y | |
| cmsis_nn_fc_params | fc_params | |
| struct cmsis_nn_transpose_params |
| struct cmsis_nn_svdf_params |
CMSIS-NN object for SVDF layer parameters
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation | input_activation | |
| int32_t | input_offset |
The negative of the zero value for the input tensor |
| cmsis_nn_activation | output_activation | |
| int32_t | output_offset |
The negative of the zero value for the output tensor |
| int32_t | rank | |
| struct cmsis_nn_softmax_lut_s16 |
| struct cmsis_nn_scaling |
| struct cmsis_nn_lstm_gate |
CMSIS-NN object for LSTM gate parameters
| Data Fields | ||
|---|---|---|
| arm_nn_activation_type | activation_type | |
| const void * | bias | |
| const void * | hidden_effective_bias |
Precomputed kernel_sum * lhs_offset |
| int32_t | hidden_multiplier | |
| int32_t | hidden_shift | |
| const void * | hidden_weights | |
| const void * | input_effective_bias |
Bias added with precomputed kernel_sum * lhs_offset |
| int32_t | input_multiplier | |
| int32_t | input_shift | |
| const void * | input_weights | |
| struct cmsis_nn_lstm_params |
CMSIS-NN object for LSTM parameters
| Data Fields | ||
|---|---|---|
| int32_t | batch_size | |
| int32_t | cell_clip |
Min/max value of cell output |
| cmsis_nn_lstm_gate | cell_gate | |
| int32_t | cell_scale_power | |
| cmsis_nn_lstm_gate | forget_gate | |
| int32_t | forget_to_cell_multiplier | |
| int32_t | forget_to_cell_shift | |
| int32_t | hidden_size |
Size of output from the LSTM cell, used as output and recursively into the next time step |
| cmsis_nn_lstm_gate | input_gate | |
| int32_t | input_offset | |
| int32_t | input_size |
Size of new data input into the LSTM cell |
| int32_t | input_to_cell_multiplier | |
| int32_t | input_to_cell_shift | |
| cmsis_nn_lstm_gate | output_gate | |
| int32_t | output_multiplier | |
| int32_t | output_offset | |
| int32_t | output_shift | |
| int32_t | time_major |
0 if first dimension is batch, else first dimension is time |
| int32_t | time_steps | |
| struct cmsis_nn_lstm_context |
| struct cmsis_nn_activation_f32 |
| struct cmsis_nn_conv_params_f32 |
Convolution parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | activation |
Output activation clamp range. |
| cmsis_nn_tile | dilation |
Spatial dilation. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | stride |
Spatial stride. |
| arm_nn_weight_format_flt | weight_format |
Filter storage format. |
| struct cmsis_nn_transpose_conv_params_f32 |
Transpose convolution parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | activation |
Output activation clamp range. |
| cmsis_nn_tile | dilation |
Spatial dilation. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | padding_offsets |
Output padding adjustment for transpose convolution. |
| cmsis_nn_tile | stride |
Spatial stride. |
| struct cmsis_nn_dw_conv_params_f32 |
Depthwise convolution parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | activation |
Output activation clamp range. |
| int32_t | ch_mult |
Channel multiplier. |
| cmsis_nn_tile | dilation |
Spatial dilation. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | stride |
Spatial stride. |
| struct cmsis_nn_pool_params_f32 |
Pooling parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | activation |
Output activation clamp range. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | stride |
Spatial stride. |
| struct cmsis_nn_fc_params_f32 |
Fully connected layer parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | activation |
Output activation clamp range. |
| arm_nn_weight_format_flt | weight_format |
Weight storage format. |
| struct cmsis_nn_bmm_params_f32 |
Batched matrix multiplication parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | activation |
Output activation clamp range. |
| const bool | adj_x |
True when the left-hand-side operand is stored transposed. |
| const bool | adj_y |
True when the right-hand-side operand is stored transposed. |
| arm_nn_weight_format_flt | rhs_format |
Right-hand-side operand storage format. |
| struct cmsis_nn_ew_params_f32 |
Elementwise operator parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | activation |
Output activation clamp range. |
| struct cmsis_nn_transpose_params_f32 |
Transpose parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| arm_nn_tensor_layout | layout |
Layout convention used to interpret tensor dimensions. |
| int32_t | num_dims |
Number of active dimensions in the permutation. |
| int32_t | perm[4] |
Permutation indices. |
| struct cmsis_nn_svdf_params_f32 |
Singular value decomposition filter parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f32 | input_activation |
Clamp range applied after the input projection. |
| cmsis_nn_activation_f32 | output_activation |
Clamp range applied to the final output. |
| int32_t | rank |
SVDF rank. |
| struct cmsis_nn_lstm_gate_f32 |
Read-only weights and bias metadata for one float32 LSTM gate.
| Data Fields | ||
|---|---|---|
| arm_nn_activation_type_flt | activation_type |
Gate activation selector. |
| const float32_t * | bias |
Optional gate bias vector. |
| const float32_t * | hidden_weights |
Hidden-state-to-gate weight matrix. |
| const float32_t * | input_weights |
Input-to-gate weight matrix. |
| struct cmsis_nn_lstm_params_f32 |
Parameters for a unidirectional float32 LSTM layer.
| Data Fields | ||
|---|---|---|
| int32_t | batch_size |
Batch size processed per invocation. |
| float32_t | cell_clip |
Optional cell-state clip value. |
| cmsis_nn_lstm_gate_f32 | cell_gate |
Cell-update gate weights and activation. |
| cmsis_nn_lstm_gate_f32 | forget_gate |
Forget gate weights and activation. |
| int32_t | hidden_size |
Hidden-state size. |
| cmsis_nn_lstm_gate_f32 | input_gate |
Input gate weights and activation. |
| int32_t | input_size |
Input feature size per time step. |
| cmsis_nn_lstm_gate_f32 | output_gate |
Output gate weights and activation. |
| int32_t | time_major |
Non-zero when input/output tensors are time-major. |
| int32_t | time_steps |
Number of time steps processed per invocation. |
| struct cmsis_nn_lstm_context_f32 |
| struct cmsis_nn_activation_f16 |
| struct cmsis_nn_conv_params_f16 |
Convolution parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | activation |
Output activation clamp range. |
| cmsis_nn_tile | dilation |
Spatial dilation. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | stride |
Spatial stride. |
| arm_nn_weight_format_flt | weight_format |
Filter storage format. |
| struct cmsis_nn_transpose_conv_params_f16 |
Transpose convolution parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | activation |
Output activation clamp range. |
| cmsis_nn_tile | dilation |
Spatial dilation. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | padding_offsets |
Output padding adjustment for transpose convolution. |
| cmsis_nn_tile | stride |
Spatial stride. |
| struct cmsis_nn_dw_conv_params_f16 |
Depthwise convolution parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | activation |
Output activation clamp range. |
| int32_t | ch_mult |
Channel multiplier. |
| cmsis_nn_tile | dilation |
Spatial dilation. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | stride |
Spatial stride. |
| struct cmsis_nn_pool_params_f16 |
Pooling parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | activation |
Output activation clamp range. |
| cmsis_nn_tile | padding |
Spatial zero-padding. |
| cmsis_nn_tile | stride |
Spatial stride. |
| struct cmsis_nn_fc_params_f16 |
Fully connected layer parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | activation |
Output activation clamp range. |
| arm_nn_weight_format_flt | weight_format |
Weight storage format. |
| struct cmsis_nn_bmm_params_f16 |
Batched matrix multiplication parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | activation |
Output activation clamp range. |
| const bool | adj_x |
True when the left-hand-side operand is stored transposed. |
| const bool | adj_y |
True when the right-hand-side operand is stored transposed. |
| arm_nn_weight_format_flt | rhs_format |
Right-hand-side operand storage format. |
| struct cmsis_nn_ew_params_f16 |
Elementwise operator parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | activation |
Output activation clamp range. |
| struct cmsis_nn_transpose_params_f16 |
Transpose parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| arm_nn_tensor_layout | layout |
Layout convention used to interpret tensor dimensions. |
| int32_t | num_dims |
Number of active dimensions in the permutation. |
| int32_t | perm[4] |
Permutation indices. |
| struct cmsis_nn_svdf_params_f16 |
Singular value decomposition filter parameters for float32 operators.
| Data Fields | ||
|---|---|---|
| cmsis_nn_activation_f16 | input_activation |
Clamp range applied after the input projection. |
| cmsis_nn_activation_f16 | output_activation |
Clamp range applied to the final output. |
| int32_t | rank |
SVDF rank. |
| struct cmsis_nn_lstm_gate_f16 |
Read-only weights and bias metadata for one float32 LSTM gate.
| Data Fields | ||
|---|---|---|
| arm_nn_activation_type_flt | activation_type |
Gate activation selector. |
| const float16_t * | bias |
Optional gate bias vector. |
| const float16_t * | hidden_weights |
Hidden-state-to-gate weight matrix. |
| const float16_t * | input_weights |
Input-to-gate weight matrix. |
| struct cmsis_nn_lstm_params_f16 |
Parameters for a unidirectional float32 LSTM layer.
| Data Fields | ||
|---|---|---|
| int32_t | batch_size |
Batch size processed per invocation. |
| float16_t | cell_clip |
Optional cell-state clip value. |
| cmsis_nn_lstm_gate_f16 | cell_gate |
Cell-update gate weights and activation. |
| cmsis_nn_lstm_gate_f16 | forget_gate |
Forget gate weights and activation. |
| int32_t | hidden_size |
Hidden-state size. |
| cmsis_nn_lstm_gate_f16 | input_gate |
Input gate weights and activation. |
| int32_t | input_size |
Input feature size per time step. |
| cmsis_nn_lstm_gate_f16 | output_gate |
Output gate weights and activation. |
| int32_t | time_major |
Non-zero when input/output tensors are time-major. |
| int32_t | time_steps |
Number of time steps processed per invocation. |
| struct cmsis_nn_lstm_context_f16 |
| typedef char arm_nn_static_assert___LINE__[(((int) ARM_TANH)<((int) ARM_NN_FLT_ACT_NONE)) ? 1 :-1] |
| enum arm_cmsis_nn_status |
Activation 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.
| enum arm_nn_tensor_layout |
Weight 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.
| Enumerator | |
|---|---|
| ARM_NN_WEIGHT_FORMAT_STANDARD | Standard public operator layout. |
| ARM_NN_WEIGHT_FORMAT_NT_N_PACKED | Packed |