LIBML Version 4.1.9
LIBML NN Software Library
Loading...
Searching...
No Matches
Functions

The convolution functions transform the input matrix into a column vector with im2col, and then use matrix-matrix multiplication to get the convolution result. There are three types of quantization on the convolution outputs: shift-based quantization (named with “sft”), symmetric quantization (named with “sym”), and asymmetric quantization (named with “asym”). The followings illustrate the algorithm flow of respective quantization types where rectangles represent inputs or outputs, circles represent arithmetical operations, solid lines are for required steps and dashed lines are for optional ones. More...

Functions

tpt_nn_status tpt_convolve_1x1_s8_s16_s8_sym_bias_fast_any (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_s8_s16_s8_sym_fast_any (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_s8_s8_s8_asym_bias_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_1x1_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_1x1_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
int32_t tpt_convolve_1x1_s8_s8_s8_asym_bias_any_get_buf_size (const int32_t in_tensor_c)
 This function is used to obtain the required size, in bytes,for the input temporary buffer of tpt_convolve_1x1_s8_s8_s8_asym_bias_any.
tpt_nn_status tpt_convolve_1x1_s8_s8_s8_sft_bias_fast_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const tpt_nn_conv_sft_params *aConv_params, const tpt_nn_sft_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with shift-based quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_s8_s8_s8_sym_bias_fast_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_s8_s8_s8_sym_fast_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_u8_s16_s8_sym_bias_fast_any (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const int8_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_u8_s16_s8_sym_fast_any (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const int8_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_u8_s8_s8_sym_bias_fast_any (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const int8_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_u8_s8_s8_sym_fast_any (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const int8_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_u8_u8_s8_sym_bias_fast_any (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const int8_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_1x1_u8_u8_s8_sym_fast_any (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const int8_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and outputs in any w and h dimensions with symmetric quantization on the outputs.
static int8_t * tpt_nn_1xn_mat_mult_kernel_s8_offset (const int8_t *input_a, const int8_t *input_b, const uint16_t output_ch, const int32_t *out_shift, const int32_t *out_mult, const int32_t out_offset, const int32_t in_offset, const int16_t activation_min, const int16_t activation_max, const int32_t num_col_a, const int32_t *output_bias, int8_t *out_0)
tpt_nn_status tpt_convolve_1xn_s8_s8_s8_asym_bias_any (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_1xn_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_1xn_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs 1xn kernels convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
int32_t tpt_convolve_1xn_s8_s8_s8_asym_bias_any_get_buffer_size (const uint16_t input_c, const uint16_t ker_w, const uint16_t ker_h)
 This function is used to obtain the required size, in bytes,for the input temporary buffer of tpt_convolve_1xn_s8_s8_s8_asym_bias_any.
tpt_nn_status tpt_convolve_s16_s16_s8_asym_bias_any (q15_t *aOut_tensor, const q15_t *aIn_tensor, const q7_t *aKernel, const int64_t *aBias, const tpt_nn_conv_asym_s16_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs convolution for signed 16-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
int32_t tpt_nn_conv_s16_s16_s8_asym_bias_any_get_buffer_size (const int32_t aIn_tensor_c, const int32_t aKer_dim_w, const int32_t aKer_dim_h)
 This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_convolve_s16_s16_s8_asym_bias_any.
tpt_nn_status tpt_convolve_s8_s16_s8_RGB_sym_bias_fast (int16_t *aOut_tesor, const int8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s16_s8_RGB_sym_fast (int16_t *aOut_tesor, const int8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s16_s8_sym_bias_fast (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s16_s8_sym_bias_fast_any (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s16_s8_sym_fast (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s16_s8_sym_fast_any (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_asym_bias_any (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
int32_t tpt_nn_conv_s8_s8_s8_asym_bias_any_get_buffer_size (const uint16_t aIn_tensor_c, const uint16_t aKer_dim_w, const uint16_t aKer_dim_h)
 This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_convolve_s8_s8_s8_asym_bias_any.
tpt_nn_status tpt_convolve_s8_s8_s8_asym_bias_any_dilated (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_asym_dilation_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs dilated convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
int32_t tpt_nn_conv_s8_s8_s8_asym_bias_any_dilated_get_buffer_size (const uint16_t aIn_tensor_c, const uint16_t aKer_dim_w, const uint16_t aKer_dim_h)
tpt_nn_status tpt_convolve_s8_s8_s8_RGB_sft_bias (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t bias_lshift, const uint16_t out_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs signed 8-bit integer convolution for RGB images with shift-based quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_RGB_sym_bias_fast (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with bias input and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_RGB_sym_fast (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t bias_lshift, const uint16_t out_rshift, const uint16_t input_w, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_w, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs signed 8-bit integer convolution with shift-based quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const tpt_nn_conv_sft_params *aConv_params, const tpt_nn_sft_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs signed 8-bit integer convolution in any w and h dimensions with shift-based quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias_fast (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t bias_lshift, const uint16_t out_rshift, const uint16_t input_w, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_w, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast signed 8-bit integer convolution with shift-based quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias_fast_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const tpt_nn_conv_sft_params *aConv_params, const tpt_nn_sft_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast signed 8-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sym_bias_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sym_bias_fast (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sym_bias_fast_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sym_fast (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_s8_s8_s8_sym_fast_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s16_s8_RGB_sym_bias_fast (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s16_s8_RGB_sym_fast (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s16_s8_sym_bias_fast (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s16_s8_sym_bias_fast_any (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s16_s8_sym_fast (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s16_s8_sym_fast_any (int16_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s8_s8_RGB_sym_bias_fast (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s8_s8_RGB_sym_fast (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s8_s8_sym_bias_fast (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s8_s8_sym_bias_fast_any (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s8_s8_sym_fast (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_s8_s8_sym_fast_any (int8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_u8_s8_RGB_sym_bias_fast (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with bias input and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_u8_s8_RGB_sym_fast (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_u8_s8_sym_bias_fast (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_u8_s8_sym_bias_fast_any (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_u8_s8_sym_fast (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_u8_u8_s8_sym_fast_any (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any w and h dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_convolve_wrapper_s8_s8_s8_asym (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_conv_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This is a wrapper function for tpt_convolve_1x1_s8_s8_s8_asym_bias_any, tpt_convolve_1xn_s8_s8_s8_asym_bias_any, tpt_convolve_s8_s8_s8_asym_bias_any. This function calls one among the three convolution functions according to the provided parameters. inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
int32_t tpt_convolve_wrapper_s8_s8_s8_asym_get_buffer_size (const uint16_t aIn_tensor_h, const uint16_t aIn_tensor_c, const uint16_t aIn_tensor_n, const uint16_t aKer_dim_w, const uint16_t aKer_dim_h, const uint16_t padding_w, const uint16_t padding_h, const uint16_t stride_w, const uint16_t stride_h, const uint16_t aOut_tensor_w, const uint16_t aOut_tensor_h)
 This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_convolve_wrapper_s8_s8_s8_asym.
tpt_nn_status tpt_depthwise_conv_3x3_s8_s8_s8_asym_bias_any (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_dw_conv_3x3_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_dw_conv_3x3_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise 3x3 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s16_s16_s8_asym_bias_any (q15_t *aOut_tensor, const q15_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_dw_conv_s16_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_dw_conv_s16_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 6-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym_any (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym_bias (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym_bias_any (q15_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s4_asym_bias_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_dw_conv_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_dw_conv_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s4_asym_bias_any_fast (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_dw_conv_asym_fast_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_dw_conv_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_asym_bias_any (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_dw_conv_asym_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_dw_conv_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any (q7_t *aOut_tensor, const q7_t *aIn_tensor, const q7_t *aKernel, const int32_t *aBias, const tpt_nn_dw_conv_asym_fast_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_dw_conv_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs fast depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.
int32_t tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any_get_buffer_size (const uint16_t aIn_tensor_c, const uint16_t aKer_dim_w, const uint16_t aKer_dim_h)
 This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sft_bias (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const uint16_t stride_dim, const uint16_t padding_dim, const uint16_t bias_lshift, const uint16_t out_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs signed 8-bit integer depthwise convolution with shift-based quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sft_bias_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q7_t *aBias, const tpt_nn_conv_sft_params *aConv_params, const tpt_nn_sft_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs signed 8-bit integer depthwise convolution in any x and y dimensions with shift-based quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym_bias (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym_bias_any (q7_t *aOut_tesor, const q7_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym (q15_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym_any (q15_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 16-bit outputs in any x and y dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym_bias (q15_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym_bias_any (q15_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 16-bit outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym (q7_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym_any (q7_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 8-bit outputs in any x and y dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym_bias (q7_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym_bias_any (q7_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 8-bit outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym_any (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym_bias (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const uint16_t stride, const uint16_t padding, const uint16_t out_scale, const uint16_t pre_rshift, const uint16_t post_rshift, const uint16_t input_dim, const uint16_t input_c, const uint16_t ker_dim, const uint16_t output_dim, const uint16_t output_c, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym_bias_any (uint8_t *aOut_tesor, const uint8_t *aIn_tensor, const q7_t *aKernel, const q31_t *aBias, const tpt_nn_conv_sym_any_params *aConv_params, const tpt_nn_sym_any_dims *aConv_dims, q15_t *aTmp_buf)
 This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_depthwise_conv_u8_u8_u8_asym_bias_any (uint8_t *aOut_tensor, const uint8_t *aIn_tensor, const uint8_t *aKernel, const int32_t *aBias, const int32_t multiplier, const int32_t shift, const tpt_nn_dw_conv_u8_asym_params *aConv_params, const tpt_nn_dw_conv_u8_asym_dims *aConv_dims)
 This function performs depthwise convolution for unsigned 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Detailed Description

The convolution functions transform the input matrix into a column vector with im2col, and then use matrix-matrix multiplication to get the convolution result. There are three types of quantization on the convolution outputs: shift-based quantization (named with “sft”), symmetric quantization (named with “sym”), and asymmetric quantization (named with “asym”). The followings illustrate the algorithm flow of respective quantization types where rectangles represent inputs or outputs, circles represent arithmetical operations, solid lines are for required steps and dashed lines are for optional ones.

Function Documentation

◆ tpt_convolve_1x1_s8_s16_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_1x1_s8_s16_s8_sym_bias_fast_any ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

Fast s8 version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_s8_s16_s8_sym_fast_any()

tpt_nn_status tpt_convolve_1x1_s8_s16_s8_sym_fast_any ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.

Fast s8 input and s16 output version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_s8_s8_s8_asym_bias_any()

tpt_nn_status tpt_convolve_1x1_s8_s8_s8_asym_bias_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_1x1_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_1x1_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Fast s8 version for 1x1 convolution (non-square shape) Refer to header file for details.

◆ tpt_convolve_1x1_s8_s8_s8_asym_bias_any_get_buf_size()

int32_t tpt_convolve_1x1_s8_s8_s8_asym_bias_any_get_buf_size ( const int32_t in_tensor_c)

This function is used to obtain the required size, in bytes,for the input temporary buffer of tpt_convolve_1x1_s8_s8_s8_asym_bias_any.

Parameters
in_tensor_cnumber of input tensor channels
Returns
this function returns the size required by the temporary buffer

◆ tpt_convolve_1x1_s8_s8_s8_sft_bias_fast_any()

tpt_nn_status tpt_convolve_1x1_s8_s8_s8_sft_bias_fast_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const tpt_nn_conv_sft_params * aConv_params,
const tpt_nn_sft_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with shift-based quantization on the outputs.

Fast s8 version for 1x1 convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_1x1_s8_s8_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_1x1_s8_s8_s8_sym_bias_fast_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

Fast s8 version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_s8_s8_s8_sym_fast_any()

tpt_nn_status tpt_convolve_1x1_s8_s8_s8_sym_fast_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with symmetric quantization on the outputs.

Fast s8 version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_u8_s16_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_1x1_u8_s16_s8_sym_bias_fast_any ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const int8_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

Fast u8 input and s16 output version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_u8_s16_s8_sym_fast_any()

tpt_nn_status tpt_convolve_1x1_u8_s16_s8_sym_fast_any ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const int8_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.

Fast u8 input and s16 output version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_u8_s8_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_1x1_u8_s8_s8_sym_bias_fast_any ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const int8_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

Fast u8 input and s8 output version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_u8_s8_s8_sym_fast_any()

tpt_nn_status tpt_convolve_1x1_u8_s8_s8_sym_fast_any ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const int8_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.

Fast u8 input and s8 output version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_u8_u8_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_1x1_u8_u8_s8_sym_bias_fast_any ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const int8_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

Fast u8 input and output version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1x1_u8_u8_s8_sym_fast_any()

tpt_nn_status tpt_convolve_1x1_u8_u8_s8_sym_fast_any ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const int8_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and outputs in any w and h dimensions with symmetric quantization on the outputs.

Fast u8 input and output version for 1x1 convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_1xn_s8_s8_s8_asym_bias_any()

tpt_nn_status tpt_convolve_1xn_s8_s8_s8_asym_bias_any ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_1xn_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_1xn_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs 1xn kernels convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Parameters
aOut_tensorpointer of output tensor
aIn_tensorpointer of the input tensor
aKernelpointer of kernel weights
aBiaspointer of the bias vector
aConv_paramsconvolution parameters (e.g. strides,pads,...) range of aConv_params->input_offset : [-127, 128] range of aConv_params->output_offset : [-128, 127]
aQuant_paramsper-channel quantization infoit contains the multiplier and shift values to be applied to each output channel
aConv_dimstensor dimensions of 1xn asym format:[in_w, in_h, in_c, in_n, out_c]
aTmp_bufits size must be equal to 2 * in_tensor_c * ker_w
Returns
tpt_nn_status
Note
The input constraints of this function are:
  • output_w is a multiple of 4 During the quantization process, a positive out_shift value is used to left shift calculation results whereas a negative one is used to right shift.

◆ tpt_convolve_1xn_s8_s8_s8_asym_bias_any_get_buffer_size()

int32_t tpt_convolve_1xn_s8_s8_s8_asym_bias_any_get_buffer_size ( const uint16_t input_c,
const uint16_t ker_w,
const uint16_t ker_h )

This function is used to obtain the required size, in bytes,for the input temporary buffer of tpt_convolve_1xn_s8_s8_s8_asym_bias_any.

Parameters
input_cnumber of input tensor channels
ker_ww dimension of the filter kernel
ker_hy dimension of the filter kernel. It is always 1
Returns
this function returns the size required by the temporary buffer

◆ tpt_convolve_s16_s16_s8_asym_bias_any()

tpt_nn_status tpt_convolve_s16_s16_s8_asym_bias_any ( q15_t * aOut_tensor,
const q15_t * aIn_tensor,
const q7_t * aKernel,
const int64_t * aBias,
const tpt_nn_conv_asym_s16_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs convolution for signed 16-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.

Basic s16 convolution function. Refer to header file for details.

◆ tpt_convolve_s8_s16_s8_RGB_sym_bias_fast()

tpt_nn_status tpt_convolve_s8_s16_s8_RGB_sym_bias_fast ( int16_t * aOut_tesor,
const int8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.

Fast s8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_s8_s16_s8_RGB_sym_fast()

tpt_nn_status tpt_convolve_s8_s16_s8_RGB_sym_fast ( int16_t * aOut_tesor,
const int8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.

Fast s8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_s8_s16_s8_sym_bias_fast()

tpt_nn_status tpt_convolve_s8_s16_s8_sym_bias_fast ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.

Fast s16 version with bias for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s16_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_s8_s16_s8_sym_bias_fast_any ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

Fast s16 version with bias for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s16_s8_sym_fast()

tpt_nn_status tpt_convolve_s8_s16_s8_sym_fast ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.

Fast s16 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s16_s8_sym_fast_any()

tpt_nn_status tpt_convolve_s8_s16_s8_sym_fast_any ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.

Fast s16 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_asym_bias_any()

tpt_nn_status tpt_convolve_s8_s8_s8_asym_bias_any ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Basic s8 convolution function. Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_asym_bias_any_dilated()

tpt_nn_status tpt_convolve_s8_s8_s8_asym_bias_any_dilated ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_asym_dilation_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs dilated convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.

Basic s8 convolution function. Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_RGB_sft_bias()

tpt_nn_status tpt_convolve_s8_s8_s8_RGB_sft_bias ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t bias_lshift,
const uint16_t out_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs signed 8-bit integer convolution for RGB images with shift-based quantization on the outputs.

S8 version with RGB images for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_RGB_sym_bias_fast()

tpt_nn_status tpt_convolve_s8_s8_s8_RGB_sym_bias_fast ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with bias input and symmetric quantization on the outputs.

Fast s8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_RGB_sym_fast()

tpt_nn_status tpt_convolve_s8_s8_s8_RGB_sym_fast ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.

Fast s8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sft_bias()

tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t bias_lshift,
const uint16_t out_rshift,
const uint16_t input_w,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_w,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs signed 8-bit integer convolution with shift-based quantization on the outputs.

S8 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sft_bias_any()

tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const tpt_nn_conv_sft_params * aConv_params,
const tpt_nn_sft_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs signed 8-bit integer convolution in any w and h dimensions with shift-based quantization on the outputs.

s8 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sft_bias_fast()

tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias_fast ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t bias_lshift,
const uint16_t out_rshift,
const uint16_t input_w,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_w,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast signed 8-bit integer convolution with shift-based quantization on the outputs.

Fast s8 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sft_bias_fast_any()

tpt_nn_status tpt_convolve_s8_s8_s8_sft_bias_fast_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const tpt_nn_conv_sft_params * aConv_params,
const tpt_nn_sft_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast signed 8-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs.

Fast s8 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sym_bias_any()

tpt_nn_status tpt_convolve_s8_s8_s8_sym_bias_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

S8 version with bias for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sym_bias_fast()

tpt_nn_status tpt_convolve_s8_s8_s8_sym_bias_fast ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.

Fast s8 version with bias for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_s8_s8_s8_sym_bias_fast_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

Fast s8 version with bias for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sym_fast()

tpt_nn_status tpt_convolve_s8_s8_s8_sym_fast ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.

Fast s8 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_s8_s8_s8_sym_fast_any()

tpt_nn_status tpt_convolve_s8_s8_s8_sym_fast_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for signed 8-bit integer inputs/outputs in any w and h dimensions with symmetric quantization on the outputs.

Fast s8 version for convolution (shift-based quantization) Refer to header file for details.

◆ tpt_convolve_u8_s16_s8_RGB_sym_bias_fast()

tpt_nn_status tpt_convolve_u8_s16_s8_RGB_sym_bias_fast ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias and symmetric quantization on the outputs.

Fast u8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s16_s8_RGB_sym_fast()

tpt_nn_status tpt_convolve_u8_s16_s8_RGB_sym_fast ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.

Fast u8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s16_s8_sym_bias_fast()

tpt_nn_status tpt_convolve_u8_s16_s8_sym_bias_fast ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.

U8 version with bias for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s16_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_u8_s16_s8_sym_bias_fast_any ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

U8 input and s16 output version with bias for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s16_s8_sym_fast()

tpt_nn_status tpt_convolve_u8_s16_s8_sym_fast ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.

U8 input and s16 output version for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s16_s8_sym_fast_any()

tpt_nn_status tpt_convolve_u8_s16_s8_sym_fast_any ( int16_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.

U8 version for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s8_s8_RGB_sym_bias_fast()

tpt_nn_status tpt_convolve_u8_s8_s8_RGB_sym_bias_fast ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias and symmetric quantization on the outputs.

Fast u8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s8_s8_RGB_sym_fast()

tpt_nn_status tpt_convolve_u8_s8_s8_RGB_sym_fast ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs.

Fast u8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s8_s8_sym_bias_fast()

tpt_nn_status tpt_convolve_u8_s8_s8_sym_bias_fast ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias inputs and symmetric quantization on the outputs.

U8 version with bias for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s8_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_u8_s8_s8_sym_bias_fast_any ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

U8 version with bias for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s8_s8_sym_fast()

tpt_nn_status tpt_convolve_u8_s8_s8_sym_fast ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs.

U8 version for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_s8_s8_sym_fast_any()

tpt_nn_status tpt_convolve_u8_s8_s8_sym_fast_any ( int8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any w and h dimensions with symmetric quantization on the outputs.

U8 version for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_u8_s8_RGB_sym_bias_fast()

tpt_nn_status tpt_convolve_u8_u8_s8_RGB_sym_bias_fast ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with bias input and symmetric quantization on the outputs.

Fast u8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_u8_s8_RGB_sym_fast()

tpt_nn_status tpt_convolve_u8_u8_s8_RGB_sym_fast ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.

Fast u8 version with RGB images for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_u8_s8_sym_bias_fast()

tpt_nn_status tpt_convolve_u8_u8_s8_sym_bias_fast ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.

U8 version with bias for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_u8_s8_sym_bias_fast_any()

tpt_nn_status tpt_convolve_u8_u8_s8_sym_bias_fast_any ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any w and h dimensions with bias inputs and symmetric quantization on the outputs.

U8 version with bias for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_u8_s8_sym_fast()

tpt_nn_status tpt_convolve_u8_u8_s8_sym_fast ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t pre_rshift,
const uint16_t out_scale,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.

U8 version for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_u8_u8_s8_sym_fast_any()

tpt_nn_status tpt_convolve_u8_u8_s8_sym_fast_any ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any w and h dimensions with symmetric quantization on the outputs.

U8 version for convolution (symmetric quantization) Refer to header file for details.

◆ tpt_convolve_wrapper_s8_s8_s8_asym()

tpt_nn_status tpt_convolve_wrapper_s8_s8_s8_asym ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_conv_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This is a wrapper function for tpt_convolve_1x1_s8_s8_s8_asym_bias_any, tpt_convolve_1xn_s8_s8_s8_asym_bias_any, tpt_convolve_s8_s8_s8_asym_bias_any. This function calls one among the three convolution functions according to the provided parameters. inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Convolution layer Refer to header file for details.

◆ tpt_convolve_wrapper_s8_s8_s8_asym_get_buffer_size()

int32_t tpt_convolve_wrapper_s8_s8_s8_asym_get_buffer_size ( const uint16_t aIn_tensor_h,
const uint16_t aIn_tensor_c,
const uint16_t aIn_tensor_n,
const uint16_t aKer_dim_w,
const uint16_t aKer_dim_h,
const uint16_t padding_w,
const uint16_t padding_h,
const uint16_t stride_w,
const uint16_t stride_h,
const uint16_t aOut_tensor_w,
const uint16_t aOut_tensor_h )

This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_convolve_wrapper_s8_s8_s8_asym.

Parameters
aIn_tensor_hh dimension of the input tensor
aIn_tensor_cnumber of input tensor channels
aIn_tensor_nsize of input tensor batches
aKer_dim_ww dimension of the filter kernel
aKer_dim_hh dimension of the filter kernel
padding_wpadding size in the w dimension
padding_hpadding size in the h dimension
stride_wconvolution stride in the w dimension
stride_hconvolution stride in the h dimension
aOut_tensor_ww dimension of the output tensor
aOut_tensor_hh dimension of the output tensor
Returns
int32_t

◆ tpt_depthwise_conv_3x3_s8_s8_s8_asym_bias_any()

tpt_nn_status tpt_depthwise_conv_3x3_s8_s8_s8_asym_bias_any ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_dw_conv_3x3_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_dw_conv_3x3_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise 3x3 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.

3x3 s8 depthwise convolution function. Refer header file for details.

◆ tpt_depthwise_conv_s16_s16_s8_asym_bias_any()

tpt_nn_status tpt_depthwise_conv_s16_s16_s8_asym_bias_any ( q15_t * aOut_tensor,
const q15_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_dw_conv_s16_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_dw_conv_s16_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 6-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

s16 depthwise convolution function. Refer header file for details.

◆ tpt_depthwise_conv_s8_s16_s8_sym()

tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.

s8 input and s16 output for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s16_s8_sym_any()

tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym_any ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s16_s8_sym_bias()

tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym_bias ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.

s8 input and s16 output for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s16_s8_sym_bias_any()

tpt_nn_status tpt_depthwise_conv_s8_s16_s8_sym_bias_any ( q15_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s8_s4_asym_bias_any()

tpt_nn_status tpt_depthwise_conv_s8_s8_s4_asym_bias_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_dw_conv_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_dw_conv_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Basic s4 depthwise convolution function. Refer header file for details.

◆ tpt_depthwise_conv_s8_s8_s4_asym_bias_any_fast()

tpt_nn_status tpt_depthwise_conv_s8_s8_s4_asym_bias_any_fast ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_dw_conv_asym_fast_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_dw_conv_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Fast s4 depthwise convolution function. Refer header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_asym_bias_any()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_asym_bias_any ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_dw_conv_asym_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_dw_conv_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Basic s8 depthwise convolution function. Refer header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any ( q7_t * aOut_tensor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const int32_t * aBias,
const tpt_nn_dw_conv_asym_fast_params * aConv_params,
const tpt_nn_per_channel_quant_params * aQuant_params,
const tpt_nn_dw_conv_asym_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs fast depthwise convolution for signed 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

Fast s8 depthwise convolution function. Refer header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any_get_buffer_size()

int32_t tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any_get_buffer_size ( const uint16_t aIn_tensor_c,
const uint16_t aKer_dim_w,
const uint16_t aKer_dim_h )

This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_depthwise_conv_s8_s8_s8_asym_bias_fast_any.

Parameters
aIn_tensor_cnumber of input tensor channels
aKer_dim_ww dimension of the filter kernel
aKer_dim_hh dimension of the filter kernel
Returns
int32_t

◆ tpt_depthwise_conv_s8_s8_s8_sft_bias()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sft_bias ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const uint16_t stride_dim,
const uint16_t padding_dim,
const uint16_t bias_lshift,
const uint16_t out_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs signed 8-bit integer depthwise convolution with shift-based quantization on the outputs.

s8 version for depthwise convolution (shift-based quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_sft_bias_any()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sft_bias_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q7_t * aBias,
const tpt_nn_conv_sft_params * aConv_params,
const tpt_nn_sft_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs signed 8-bit integer depthwise convolution in any x and y dimensions with shift-based quantization on the outputs.

s8 version for depthwise convolution (shift-based quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_sym()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_sym_any()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_sym_bias()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym_bias ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_s8_s8_s8_sym_bias_any()

tpt_nn_status tpt_depthwise_conv_s8_s8_s8_sym_bias_any ( q7_t * aOut_tesor,
const q7_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s16_s8_sym()

tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym ( q15_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.

u8 input and s16 output for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s16_s8_sym_any()

tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym_any ( q15_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 16-bit outputs in any x and y dimensions with symmetric quantization on the outputs.

u8 input and s16 output for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s16_s8_sym_bias()

tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym_bias ( q15_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.

u8 input and s16 output for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s16_s8_sym_bias_any()

tpt_nn_status tpt_depthwise_conv_u8_s16_s8_sym_bias_any ( q15_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 16-bit outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.

u8 input and s16 output for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s8_s8_sym()

tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym ( q7_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s8_s8_sym_any()

tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym_any ( q7_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 8-bit outputs in any x and y dimensions with symmetric quantization on the outputs.

u8 input and s8 output for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s8_s8_sym_bias()

tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym_bias ( q7_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias inputs and symmetric quantization on the outputs.

u8 input and s8 output version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_s8_s8_sym_bias_any()

tpt_nn_status tpt_depthwise_conv_u8_s8_s8_sym_bias_any ( q7_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs and signed integer 8-bit outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.

s8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_u8_s8_sym()

tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.

u8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_u8_s8_sym_any()

tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym_any ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.

u8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_u8_s8_sym_bias()

tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym_bias ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const uint16_t stride,
const uint16_t padding,
const uint16_t out_scale,
const uint16_t pre_rshift,
const uint16_t post_rshift,
const uint16_t input_dim,
const uint16_t input_c,
const uint16_t ker_dim,
const uint16_t output_dim,
const uint16_t output_c,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.

u8 version version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_u8_s8_sym_bias_any()

tpt_nn_status tpt_depthwise_conv_u8_u8_s8_sym_bias_any ( uint8_t * aOut_tesor,
const uint8_t * aIn_tensor,
const q7_t * aKernel,
const q31_t * aBias,
const tpt_nn_conv_sym_any_params * aConv_params,
const tpt_nn_sym_any_dims * aConv_dims,
q15_t * aTmp_buf )

This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.

u8 version for depthwise convolution (symmetric quantization) Refer to header file for details.

◆ tpt_depthwise_conv_u8_u8_u8_asym_bias_any()

tpt_nn_status tpt_depthwise_conv_u8_u8_u8_asym_bias_any ( uint8_t * aOut_tensor,
const uint8_t * aIn_tensor,
const uint8_t * aKernel,
const int32_t * aBias,
const int32_t multiplier,
const int32_t shift,
const tpt_nn_dw_conv_u8_asym_params * aConv_params,
const tpt_nn_dw_conv_u8_asym_dims * aConv_dims )

This function performs depthwise convolution for unsigned 8-bit interger inputs/outputs in any w and h dimensions with asymmetric quantization on the outputs.

u8 depthwise convolution function. Refer header file for details.

◆ tpt_nn_1xn_mat_mult_kernel_s8_offset()

int8_t * tpt_nn_1xn_mat_mult_kernel_s8_offset ( const int8_t * input_a,
const int8_t * input_b,
const uint16_t output_ch,
const int32_t * out_shift,
const int32_t * out_mult,
const int32_t out_offset,
const int32_t in_offset,
const int16_t activation_min,
const int16_t activation_max,
const int32_t num_col_a,
const int32_t * output_bias,
int8_t * out_0 )
inlinestatic

Fast s8 version for 1xn convolution (non-square shape) Refer to header file for details.

◆ tpt_nn_conv_s16_s16_s8_asym_bias_any_get_buffer_size()

int32_t tpt_nn_conv_s16_s16_s8_asym_bias_any_get_buffer_size ( const int32_t aIn_tensor_c,
const int32_t aKer_dim_w,
const int32_t aKer_dim_h )

This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_convolve_s16_s16_s8_asym_bias_any.

Parameters
aIn_tensor_cnumber of input tensor channels
aKer_dim_wx dimension of the filter kernel
aKer_dim_hy dimension of the filter kernel
Returns
int32_t

◆ tpt_nn_conv_s8_s8_s8_asym_bias_any_dilated_get_buffer_size()

int32_t tpt_nn_conv_s8_s8_s8_asym_bias_any_dilated_get_buffer_size ( const uint16_t aIn_tensor_c,
const uint16_t aKer_dim_w,
const uint16_t aKer_dim_h )

◆ tpt_nn_conv_s8_s8_s8_asym_bias_any_get_buffer_size()

int32_t tpt_nn_conv_s8_s8_s8_asym_bias_any_get_buffer_size ( const uint16_t aIn_tensor_c,
const uint16_t aKer_dim_w,
const uint16_t aKer_dim_h )

This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_convolve_s8_s8_s8_asym_bias_any.

Parameters
aIn_tensor_chnumber of input tensor channels
aKer_dim_ww dimension of the filter kernel
aKer_dim_hh dimension of the filter kernel
Returns
int32_t