Content | |
GetBufferSizeNNConv | |
Functions | |
arm_cmsis_nn_status | arm_convolve_1_x_n_s4 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
1xn convolution for s4 weights | |
arm_cmsis_nn_status | arm_convolve_1_x_n_s8 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
1xn convolution | |
arm_cmsis_nn_status | arm_convolve_1x1_s4 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
s4 version for 1x1 convolution with support for non-unity stride values | |
arm_cmsis_nn_status | arm_convolve_1x1_s4_fast (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
Fast s4 version for 1x1 convolution (non-square shape) | |
arm_cmsis_nn_status | arm_convolve_1x1_s8 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
s8 version for 1x1 convolution with support for non-unity stride values | |
arm_cmsis_nn_status | arm_convolve_1x1_s8_fast (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
Fast s8 version for 1x1 convolution (non-square shape) | |
arm_cmsis_nn_status | arm_convolve_s16 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int16_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const cmsis_nn_bias_data *bias_data, const cmsis_nn_dims *output_dims, int16_t *output_data) |
Basic s16 convolution function. | |
arm_cmsis_nn_status | arm_convolve_s4 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *packed_filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
Basic s4 convolution function. | |
arm_cmsis_nn_status | arm_convolve_s8 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
Basic s8 convolution function. | |
arm_cmsis_nn_status | arm_convolve_wrapper_s16 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int16_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const cmsis_nn_bias_data *bias_data, const cmsis_nn_dims *output_dims, int16_t *output_data) |
s16 convolution layer wrapper function with the main purpose to call the optimal kernel available in cmsis-nn to perform the convolution. | |
arm_cmsis_nn_status | arm_convolve_wrapper_s4 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
s4 convolution layer wrapper function with the main purpose to call the optimal kernel available in cmsis-nn to perform the convolution. | |
arm_cmsis_nn_status | arm_convolve_wrapper_s8 (const cmsis_nn_context *ctx, const cmsis_nn_conv_params *conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
s8 convolution layer wrapper function with the main purpose to call the optimal kernel available in cmsis-nn to perform the convolution. | |
arm_cmsis_nn_status | arm_depthwise_conv_3x3_s8 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input, const cmsis_nn_dims *filter_dims, const int8_t *kernel, const cmsis_nn_dims *bias_dims, const int32_t *bias, const cmsis_nn_dims *output_dims, int8_t *output) |
Optimized s8 depthwise convolution function for 3x3 kernel size with some constraints on the input arguments(documented below). Refer arm_depthwise_conv_s8() for function argument details. | |
arm_cmsis_nn_status | arm_depthwise_conv_fast_s16 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int16_t *input, const cmsis_nn_dims *filter_dims, const int8_t *kernel, const cmsis_nn_dims *bias_dims, const int64_t *bias, const cmsis_nn_dims *output_dims, int16_t *output) |
Optimized s16 depthwise convolution function with constraint that in_channel equals out_channel. Refer arm_depthwise_conv_s16() for function argument details. | |
arm_cmsis_nn_status | arm_depthwise_conv_s16 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int16_t *input, const cmsis_nn_dims *filter_dims, const int8_t *kernel, const cmsis_nn_dims *bias_dims, const int64_t *bias, const cmsis_nn_dims *output_dims, int16_t *output) |
Basic s16 depthwise convolution function that doesn't have any constraints on the input dimensions. | |
arm_cmsis_nn_status | arm_depthwise_conv_s4 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input, const cmsis_nn_dims *filter_dims, const int8_t *kernel, const cmsis_nn_dims *bias_dims, const int32_t *bias, const cmsis_nn_dims *output_dims, int8_t *output) |
Basic s4 depthwise convolution function that doesn't have any constraints on the input dimensions. | |
arm_cmsis_nn_status | arm_depthwise_conv_s4_opt (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input, const cmsis_nn_dims *filter_dims, const int8_t *kernel, const cmsis_nn_dims *bias_dims, const int32_t *bias, const cmsis_nn_dims *output_dims, int8_t *output) |
Optimized s4 depthwise convolution function with constraint that in_channel equals out_channel. Refer arm_depthwise_conv_s4() for function argument details. | |
__attribute__ ((optimize("no-unroll-loops"))) | |
arm_cmsis_nn_status | arm_depthwise_conv_s8 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input, const cmsis_nn_dims *filter_dims, const int8_t *kernel, const cmsis_nn_dims *bias_dims, const int32_t *bias, const cmsis_nn_dims *output_dims, int8_t *output) |
Basic s8 depthwise convolution function that doesn't have any constraints on the input dimensions. | |
arm_cmsis_nn_status | arm_depthwise_conv_s8_opt (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input, const cmsis_nn_dims *filter_dims, const int8_t *kernel, const cmsis_nn_dims *bias_dims, const int32_t *bias, const cmsis_nn_dims *output_dims, int8_t *output) |
Optimized s8 depthwise convolution function with constraint that in_channel equals out_channel. Refer arm_depthwise_conv_s8() for function argument details. | |
arm_cmsis_nn_status | arm_depthwise_conv_wrapper_s16 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int16_t *input, const cmsis_nn_dims *filter_dims, const int8_t *filter, const cmsis_nn_dims *bias_dims, const int64_t *bias, const cmsis_nn_dims *output_dims, int16_t *output) |
Wrapper function to pick the right optimized s16 depthwise convolution function. | |
arm_cmsis_nn_status | arm_depthwise_conv_wrapper_s4 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input, const cmsis_nn_dims *filter_dims, const int8_t *filter, const cmsis_nn_dims *bias_dims, const int32_t *bias, const cmsis_nn_dims *output_dims, int8_t *output) |
Wrapper function to pick the right optimized s4 depthwise convolution function. | |
arm_cmsis_nn_status | arm_depthwise_conv_wrapper_s8 (const cmsis_nn_context *ctx, const cmsis_nn_dw_conv_params *dw_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input, const cmsis_nn_dims *filter_dims, const int8_t *filter, const cmsis_nn_dims *bias_dims, const int32_t *bias, const cmsis_nn_dims *output_dims, int8_t *output) |
Wrapper function to pick the right optimized s8 depthwise convolution function. | |
arm_cmsis_nn_status | arm_transpose_conv_s8 (const cmsis_nn_context *ctx, const cmsis_nn_context *output_ctx, const cmsis_nn_transpose_conv_params *transpose_conv_params, const cmsis_nn_per_channel_quant_params *quant_params, const cmsis_nn_dims *input_dims, const int8_t *input_data, const cmsis_nn_dims *filter_dims, const int8_t *filter_data, const cmsis_nn_dims *bias_dims, const int32_t *bias_data, const cmsis_nn_dims *output_dims, int8_t *output_data) |
Basic s8 transpose convolution function. | |
Collection of convolution, depthwise convolution functions and their variants.
The convolution is implemented in 2 steps: im2col and General Matrix Multiplication(GEMM)
im2col is a process of converting each patch of image data into a column. After im2col, the convolution is computed as matrix-matrix multiplication.
To reduce the memory footprint, the im2col is performed partially. Each iteration, only a few column (i.e., patches) are generated followed by GEMM.
__attribute__ | ( | (optimize("no-unroll-loops")) | ) |
arm_cmsis_nn_status arm_convolve_1_x_n_s4 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
1xn convolution for s4 weights
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_1_x_n_s4_get_buffer_size will return the buffer_size if required The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, 1, WK, C_IN] where WK is the horizontal spatial filter dimension |
[in] | filter_data | Filter data pointer. Data type: int8 as packed int4 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion.arm_cmsis_nn_status arm_convolve_1_x_n_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
1xn convolution
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_1_x_n_s8_get_buffer_size will return the buffer_size if required The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, 1, WK, C_IN] where WK is the horizontal spatial filter dimension |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion.arm_cmsis_nn_status arm_convolve_1x1_s4 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
s4 version for 1x1 convolution with support for non-unity stride values
[in,out] | ctx | Function context that contains the additional buffer if required by the function. None is required by this function. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, 1, 1, C_IN] |
[in] | filter_data | Filter data pointer. Data type: int8 packed with 2x int4 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion.arm_cmsis_nn_status arm_convolve_1x1_s4_fast | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Fast s4 version for 1x1 convolution (non-square shape)
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_1x1_s4_fast_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer ,if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, 1, 1, C_IN] |
[in] | filter_data | Filter data pointer. Data type: int8 packed with 2x int4 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion.arm_cmsis_nn_status arm_convolve_1x1_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
s8 version for 1x1 convolution with support for non-unity stride values
[in,out] | ctx | Function context that contains the additional buffer if required by the function. None is required by this function. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, 1, 1, C_IN] |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion.arm_cmsis_nn_status arm_convolve_1x1_s8_fast | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Fast s8 version for 1x1 convolution (non-square shape)
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_1x1_s8_fast_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, 1, 1, C_IN] |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion.arm_cmsis_nn_status arm_convolve_s16 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int16_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const cmsis_nn_bias_data * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int16_t * | output_data | ||
) |
Basic s16 convolution function.
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_s16_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). conv_params->input_offset : Not used conv_params->output_offset : Not used |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int16 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, HK, WK, C_IN] where HK and WK are the spatial filter dimensions |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Struct with optional bias data pointer. Bias data type can be int64 or int32 depending flag in struct. |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int16 |
ARM_CMSIS_NN_SUCCESS
if successful or ARM_CMSIS_NN_ARG_ERROR
if incorrect arguments or ARM_CMSIS_NN_NO_IMPL_ERROR
arm_cmsis_nn_status arm_convolve_s4 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Basic s4 convolution function.
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_s4_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer ,if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, HK, WK, C_IN] where HK and WK are the spatial filter dimensions |
[in] | filter_data | Packed Filter data pointer. Data type: int8 packed with 2x int4 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_SUCCESS
arm_cmsis_nn_status arm_convolve_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Basic s8 convolution function.
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_s8_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, HK, WK, CK] where HK, WK and CK are the spatial filter dimensions. CK != C_IN is used for grouped convolution, in which case the required conditions are C_IN = N * CK and C_OUT = N * M for N groups of size M. |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_SUCCESS
if successful or ARM_CMSIS_NN_ARG_ERROR
if incorrect arguments or ARM_CMSIS_NN_NO_IMPL_ERROR
arm_cmsis_nn_status arm_convolve_wrapper_s16 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int16_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const cmsis_nn_bias_data * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int16_t * | output_data | ||
) |
s16 convolution layer wrapper function with the main purpose to call the optimal kernel available in cmsis-nn to perform the convolution.
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_wrapper_s8_get_buffer_size will return the buffer_size if required The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). conv_params->input_offset : Not used conv_params->output_offset : Not used |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int16 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, HK, WK, C_IN] where HK and WK are the spatial filter dimensions |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Struct with optional bias data pointer. Bias data type can be int64 or int32 depending flag in struct. |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int16 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion. arm_cmsis_nn_status arm_convolve_wrapper_s4 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
s4 convolution layer wrapper function with the main purpose to call the optimal kernel available in cmsis-nn to perform the convolution.
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_wrapper_s4_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer ,if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, HK, WK, C_IN] where HK and WK are the spatial filter dimensions |
[in] | filter_data | Filter data pointer. Data type: int8 packed with 2x int4 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion. arm_cmsis_nn_status arm_convolve_wrapper_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_conv_params * | conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
s8 convolution layer wrapper function with the main purpose to call the optimal kernel available in cmsis-nn to perform the convolution.
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_convolve_wrapper_s8_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of conv_params->input_offset : [-127, 128] Range of conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, HK, WK, C_IN] where HK and WK are the spatial filter dimensions |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion. arm_cmsis_nn_status arm_depthwise_conv_3x3_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Optimized s8 depthwise convolution function for 3x3 kernel size with some constraints on the input arguments(documented below). Refer arm_depthwise_conv_s8() for function argument details.
ARM_CMSIS_NN_ARG_ERROR
- Unsupported dimension of tensorsARM_CMSIS_NN_SUCCESS
- Successful operationarm_cmsis_nn_status arm_depthwise_conv_fast_s16 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int16_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int64_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int16_t * | output_data | ||
) |
Optimized s16 depthwise convolution function with constraint that in_channel equals out_channel. Refer arm_depthwise_conv_s16() for function argument details.
ARM_CMSIS_NN_ARG_ERROR
- ctx-buff == NULL and arm_depthwise_conv_fast_s16_get_buffer_size() > 0 or input channel != output channel or ch_mult != 1ARM_CMSIS_NN_SUCCESS
- Successful operation
arm_cmsis_nn_status arm_depthwise_conv_s16 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int16_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int64_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int16_t * | output_data | ||
) |
Basic s16 depthwise convolution function that doesn't have any constraints on the input dimensions.
[in,out] | ctx | Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required. exists if additional memory is. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | dw_conv_params | Depthwise convolution parameters (e.g. strides, dilations, pads,...) conv_params->input_offset : Not used conv_params->output_offset : Not used |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] Batch argument N is not used. |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [1, H, W, C_OUT] |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Bias data pointer. Data type: int64 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[in,out] | output_data | Output data pointer. Data type: int16 |
ARM_CMSIS_NN_SUCCESS
arm_cmsis_nn_status arm_depthwise_conv_s4 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | kernel, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output | ||
) |
Basic s4 depthwise convolution function that doesn't have any constraints on the input dimensions.
[in,out] | ctx | Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required exists if additional memory is. The caller is expected to clear the buffer ,if applicable, for security reasons. |
[in] | dw_conv_params | Depthwise convolution parameters (e.g. strides, dilations, pads,...) dw_conv_params->dilation is not used. Range of dw_conv_params->input_offset : [-127, 128] Range of dw_conv_params->input_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] Batch argument N is not used. |
[in] | input | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [1, H, W, C_OUT] |
[in] | kernel | Filter data pointer. Data type: int8_t packed 4-bit weights, e.g four sequential weights [0x1, 0x2, 0x3, 0x4] packed as [0x21, 0x43]. |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias | Bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[in,out] | output | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_SUCCESS
arm_cmsis_nn_status arm_depthwise_conv_s4_opt | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Optimized s4 depthwise convolution function with constraint that in_channel equals out_channel. Refer arm_depthwise_conv_s4() for function argument details.
ARM_CMSIS_NN_ARG_ERROR
- input channel != output channel or ch_mult != 1 ARM_CMSIS_NN_SUCCESS
- Successful operationarm_cmsis_nn_status arm_depthwise_conv_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Basic s8 depthwise convolution function that doesn't have any constraints on the input dimensions.
[in,out] | ctx | Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required exists if additional memory is. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | dw_conv_params | Depthwise convolution parameters (e.g. strides, dilations, pads,...) dw_conv_params->dilation is not used. Range of dw_conv_params->input_offset : [-127, 128] Range of dw_conv_params->input_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] Batch argument N is not used. |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [1, H, W, C_OUT] |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[in,out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_SUCCESS
arm_cmsis_nn_status arm_depthwise_conv_s8_opt | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Optimized s8 depthwise convolution function with constraint that in_channel equals out_channel. Refer arm_depthwise_conv_s8() for function argument details.
ARM_CMSIS_NN_ARG_ERROR
- input channel != output channel or ch_mult != 1 ARM_CMSIS_NN_SUCCESS
- Successful operationarm_cmsis_nn_status arm_depthwise_conv_wrapper_s16 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int16_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int64_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int16_t * | output_data | ||
) |
Wrapper function to pick the right optimized s16 depthwise convolution function.
[in,out] | ctx | Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if required. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | dw_conv_params | Depthwise convolution parameters (e.g. strides, dilations, pads,...) dw_conv_params->dilation is not used. Range of dw_conv_params->input_offset : Not used Range of dw_conv_params->output_offset : Not used |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [H, W, C_IN] Batch argument N is not used and assumed to be 1. |
[in] | input_data | Input (activation) data pointer. Data type: int16 |
[in] | filter_dims | Filter tensor dimensions. Format: [1, H, W, C_OUT] |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Bias data pointer. Data type: int64 |
[in] | output_dims | Output tensor dimensions. Format: [1, H, W, C_OUT] |
[in,out] | output_data | Output data pointer. Data type: int16 |
ARM_CMSIS_NN_SUCCESS
- Successful completion.arm_cmsis_nn_status arm_depthwise_conv_wrapper_s4 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Wrapper function to pick the right optimized s4 depthwise convolution function.
[in,out] | ctx | Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if required. The caller is expected to clear the buffer ,if applicable, for security reasons. |
[in] | dw_conv_params | Depthwise convolution parameters (e.g. strides, dilations, pads,...) dw_conv_params->dilation is not used. Range of dw_conv_params->input_offset : [-127, 128] Range of dw_conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [H, W, C_IN] Batch argument N is not used and assumed to be 1. |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [1, H, W, C_OUT] |
[in] | filter_data | Filter data pointer. Data type: int8_t packed 4-bit weights, e.g four sequential weights [0x1, 0x2, 0x3, 0x4] packed as [0x21, 0x43]. |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [1, H, W, C_OUT] |
[in,out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_SUCCESS
- Successful completion.arm_cmsis_nn_status arm_depthwise_conv_wrapper_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_dw_conv_params * | dw_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Wrapper function to pick the right optimized s8 depthwise convolution function.
[in,out] | ctx | Function context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if required. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | dw_conv_params | Depthwise convolution parameters (e.g. strides, dilations, pads,...) dw_conv_params->dilation is not used. Range of dw_conv_params->input_offset : [-127, 128] Range of dw_conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each output channel |
[in] | input_dims | Input (activation) tensor dimensions. Format: [H, W, C_IN] Batch argument N is not used and assumed to be 1. |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [1, H, W, C_OUT] |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [1, H, W, C_OUT] |
[in,out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_SUCCESS
- Successful completion.arm_cmsis_nn_status arm_transpose_conv_s8 | ( | const cmsis_nn_context * | ctx, |
const cmsis_nn_context * | output_ctx, | ||
const cmsis_nn_transpose_conv_params * | transpose_conv_params, | ||
const cmsis_nn_per_channel_quant_params * | quant_params, | ||
const cmsis_nn_dims * | input_dims, | ||
const int8_t * | input_data, | ||
const cmsis_nn_dims * | filter_dims, | ||
const int8_t * | filter_data, | ||
const cmsis_nn_dims * | bias_dims, | ||
const int32_t * | bias_data, | ||
const cmsis_nn_dims * | output_dims, | ||
int8_t * | output_data | ||
) |
Basic s8 transpose convolution function.
[in,out] | ctx | Function context that contains the additional buffer if required by the function. arm_transpose_conv_s8_get_buffer_size will return the buffer_size if required. The caller is expected to clear the buffer, if applicable, for security reasons. |
[in,out] | output_ctx | Temporary scratch buffer. The size required size is: output width * output height * output channel * 4 The caller is expected to clear the buffer, if applicable, for security reasons. |
[in] | transpose_conv_params | Convolution parameters (e.g. strides, dilations, pads,...). Range of transpose_conv_params->input_offset : [-127, 128] Range of transpose_conv_params->output_offset : [-128, 127] |
[in] | quant_params | Per-channel quantization info. It contains the multiplier and shift values to be applied to each out channel. |
[in] | input_dims | Input (activation) tensor dimensions. Format: [N, H, W, C_IN] |
[in] | input_data | Input (activation) data pointer. Data type: int8 |
[in] | filter_dims | Filter tensor dimensions. Format: [C_OUT, HK, WK, C_IN] where HK and WK are the spatial filter dimensions |
[in] | filter_data | Filter data pointer. Data type: int8 |
[in] | bias_dims | Bias tensor dimensions. Format: [C_OUT] |
[in] | bias_data | Optional bias data pointer. Data type: int32 |
[in] | output_dims | Output tensor dimensions. Format: [N, H, W, C_OUT] |
[out] | output_data | Output data pointer. Data type: int8 |
ARM_CMSIS_NN_ARG_ERROR
if argument constraints fail. or, ARM_CMSIS_NN_SUCCESS
on successful completion.