The convolution functions transform the input matrix into a column vector with im2col, and then use matrix-matrix multiplication to get the convolution result. More...
Functions | |
| static int32_t | hpm_nn_conv_1x1_HWC_s8_s8_s8_sft_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_RGB_sft_bias (const q7_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs signed 8-bit integer convolution for RGB images with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_RGB_sft_bias_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_buf) |
| This function performs fast signed 8-bit integer convolution for RGB images with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_sft_bias (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs signed 8-bit integer convolution with shift-based quantization on the outputs. More... | |
| static void | hpm_nn_conv_HWC_s8_s8_s8_sft_bias_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs signed 8-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_sft_bias_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs fast signed 8-bit integer convolution with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_sft_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs fast signed 8-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s16_s16_s16_sft_bias (const q15_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q15_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q15_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs signed 16-bit integer convolution with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s16_s16_s16_sft_bias_fast (const q15_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q15_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q15_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs fast signed 16-bit integer convolution with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s16_s16_s16_sft_bias_fast_any (const q15_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q15_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q15_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs fast signed 16-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_sft_bias (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs signed 8-bit integer depthwise convolution with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_sft_bias_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q7_t *bias, const uint16_t bias_lshift, const uint16_t out_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf, q7_t *tmp_buf) |
| This function performs signed 8-bit integer depthwise convolution in any x and y dimensions with shift-based quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_s8_s8_s8_sym_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_s8_s16_s8_sym_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels 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. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_u8_u8_s8_sym_bias_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_u8_s8_s8_sym_bias_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_u8_s16_s8_sym_bias_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for unsigned 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. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_s8_s8_s8_sym_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_s8_s16_s8_sym_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels 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. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_u8_u8_s8_sym_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_u8_s8_s8_sym_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_u8_s16_s8_sym_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_RGB_sym_bias_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_buf) |
| This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s16_s8_RGB_sym_bias_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_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. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_u8_s8_RGB_sym_bias_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_buf) |
| This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s8_s8_RGB_sym_bias_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_buf) |
| This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s16_s8_RGB_sym_bias_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_buf) |
| This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_RGB_sym_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_buf) |
| This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s16_s8_RGB_sym_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_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. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_u8_s8_RGB_sym_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_buf) |
| This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s8_s8_RGB_sym_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_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. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s16_s8_RGB_sym_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf, q15_t *wt_tmp_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. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_sym_bias_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs fast convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s16_s8_sym_bias_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_u8_s8_sym_bias_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s8_s8_sym_bias_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s16_s8_sym_bias_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_sym_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs fast convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s16_s8_sym_fast (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_u8_s8_sym_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s8_s8_sym_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s16_s8_sym_fast (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_sym_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s16_s8_sym_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast 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. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_u8_s8_sym_bias_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s8_s8_sym_bias_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s16_s8_sym_bias_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 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. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_sym_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s16_s8_sym_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast 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. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_u8_s8_sym_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s8_s8_sym_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_u8_s16_s8_sym_fast_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_sym_bias (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s16_s8_sym_bias (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_u8_s8_sym_bias (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s8_s8_sym_bias (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s16_s8_sym_bias (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_sym (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s16_s8_sym (const q7_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_u8_s8_sym (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s8_s8_sym (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs, and with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s16_s8_sym (const u8_t *in_tensor, const uint16_t in_tensor_dim, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim, const uint16_t pad, const uint16_t stride, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_sym_bias_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s16_s8_sym_bias_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_u8_s8_sym_bias_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s8_s8_sym_bias_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s16_s8_sym_bias_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const q31_t *bias, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_sym_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s16_s8_sym_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_u8_s8_sym_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, u8_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s8_s8_sym_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q7_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_s16_s8_sym_any (const u8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_s8_s8_s8_asym_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const uint16_t in_tensor_group, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const int32_t *bias, q7_t *out_tensor, const int32_t *out_shift, const int32_t *out_scale, const int32_t out_offset, const int32_t in_offset, const int32_t act_min, const int32_t act_max, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *tmp_buf) |
| This function performs 1x1 kernels convolution for signed 8-bit interger inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1x1_HWC_s8_s8_s8_asym_bias_fast_any_get_buffer_size (const uint16_t in_tensor_ch) |
| This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_1x1_HWC_s8_s8_s8_asym_bias_fast_any. More... | |
| static int | hpm_nn_conv_1xn_HWC_s8_s8_s8_asym_bias_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_ch, const uint16_t in_tensor_group, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t pad_x, const uint16_t stride_x, const int32_t *bias, q7_t *out_tensor, const int32_t *out_shift, const int32_t *out_scale, const int32_t out_offset, const int32_t in_offset, const int32_t act_min, const int32_t act_max, const uint16_t out_tensor_dim_x, q15_t *in_tmp_buf) |
| This function performs 1xn kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_1xn_HWC_s8_s8_s8_asym_bias_any_get_buffer_size (const uint16_t in_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y) |
| This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_1xn_HWC_s8_s8_s8_asym_bias_any. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_asym_bias_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const uint16_t in_tensor_group, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const int32_t *bias, q7_t *out_tensor, const int32_t *out_shift, const int32_t *out_scale, const int32_t out_offset, const int32_t in_offset, const int32_t act_min, const int32_t act_max, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, q15_t *in_tmp_buf) |
| This function performs convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_HWC_s8_s8_s8_asym_bias_any_get_buffer_size (const uint16_t in_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y) |
| This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_HWC_s8_s8_s8_asym_bias_any. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_3x3_s8_s8_s8_asym_bias_any (const int8_t *in_tensor, const int32_t in_tensor_dim_x, const int32_t in_tensor_dim_y, const int32_t in_tensor_ch, const int8_t *ker_weight, const int32_t out_tensor_ch, const int32_t pad_x, const int32_t pad_y, const int32_t stride_x, const int32_t stride_y, const int32_t *bias, int8_t *out_tensor, const int32_t *out_shift, const int32_t *out_scale, const int32_t out_tensor_dim_x, const int32_t out_tensor_dim_y, const int32_t out_offset, const int32_t in_offset, const int32_t act_min, const int32_t act_max, const int32_t dilation_x, const int32_t dilation_y, int16_t *tmp_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. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_asym_bias_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ch_mult, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const int32_t *bias, q7_t *out_tensor, const int32_t *out_shift, const int32_t *out_scale, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, const int32_t out_offset, const int32_t in_offset, const int32_t act_min, const int32_t act_max, const uint16_t dilation_x, const uint16_t dilation_y, q15_t *tmp_buf) |
| This function performs depthwise convolution for signed 8-bit interger inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_asym_bias_fast_any (const q7_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const q7_t *ker_weight, const uint16_t out_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const uint16_t pad_x, const uint16_t pad_y, const uint16_t stride_x, const uint16_t stride_y, const int32_t *bias, q7_t *out_tensor, const int32_t *out_shift, const int32_t *out_scale, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, const int32_t out_offset, const int32_t in_offset, const int32_t act_min, const int32_t act_max, const uint16_t dilation_x, const uint16_t dilation_y, q15_t *in_tmp_buf) |
| This function performs fast depthwise convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_s8_s8_s8_asym_bias_fast_any_get_buffer_size (const uint16_t in_tensor_ch, const uint16_t ker_dim_x, const uint16_t ker_dim_y) |
| This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_dw_HWC_s8_s8_s8_asym_bias_fast_any. More... | |
| static int32_t | hpm_nn_conv_dw_HWC_u8_u8_u8_asym_bias_any (const uint8_t *in_tensor, const uint16_t in_tensor_dim_x, const uint16_t in_tensor_dim_y, const uint16_t in_tensor_ch, const uint8_t *ker_weight, const uint16_t ker_dim_x, const uint16_t ker_dim_y, const int16_t ch_mult, const int16_t pad_x, const int16_t pad_y, const int16_t stride_x, const int16_t stride_y, const int16_t dilation_x, const int16_t dilation_y, const int32_t *bias, const int32_t in_offset, const int32_t ker_offset, const int32_t out_offset, uint8_t *out_tensor, const uint16_t out_tensor_dim_x, const uint16_t out_tensor_dim_y, const int32_t act_min, const int32_t act_max, const int32_t out_shift, const int32_t out_scale) |
| This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs. More... | |
The convolution functions transform the input matrix into a column vector with im2col, and then use matrix-matrix multiplication to get the convolution result.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels 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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels 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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to 2 * in_tensor_ch * ker_dim_x * ker_dim_y. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for signed 8-bit interger inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | in_tensor_group | number of input tensor groups |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_shift | pointer of the shift vector for output tensor |
| [in] | out_scale | pointer of the scaling vector for output tensor |
| [in] | out_offset | value of offset for the output tensor. It should be in the range of -128 to 127. |
| [in] | in_offset | value of offset for the input tensor It should be in the range of -127 to 128. |
| [in] | act_min | minimum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | act_max | maximum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | tmp_buf | dummy |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_1x1_HWC_s8_s8_s8_asym_bias_fast_any.
| [in] | in_tensor_ch | number of input tensor channels |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs..
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to 2 * in_tensor_ch * ker_dim_x * ker_dim_y. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for unsigned 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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to 2 * in_tensor_ch * ker_dim_x * ker_dim_y. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1x1 kernels convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs 1xn kernels convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | in_tensor_group | dummy |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | bias | pointer of the bias vector |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_shift | pointer of the shift vector for output tensor |
| [in] | out_scale | pointer of the scaling vector for output tensor |
| [in] | out_offset | value of offset for the output tensor. It should be in the range of -128 to 127. |
| [in] | in_offset | value of offset for the input tensor It should be in the range of -127 to 128. |
| [in] | act_min | minimum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | act_max | maximum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its needed size could be get by calling riscv_nn_conv_1xn_HWC_s8_s8_s8_asym_bias_any_get_buffer_size. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_1xn_HWC_s8_s8_s8_asym_bias_any.
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel. It is always 1 here. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_shift | pointer of the shift vector for output tensor |
| [in] | out_scale | pointer of the scaling vector for output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | out_offset | value of offset for the output tensor. It should be in the range of -128 to 127. |
| [in] | in_offset | value of offset for the input tensor It should be in the range of -127 to 128. |
| [in] | act_min | minimum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | act_max | maximum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | dilation_x | dummy |
| [in] | dilation_y | dummy |
| [in] | tmp_buf | dummy |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for signed 8-bit interger inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels. out_tensor_ch is equal to ch_mult * in_tensor_ch. |
| [in] | ch_mult | multiplier of input tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_shift | pointer of the shift vector for output tensor |
| [in] | out_scale | pointer of the scaling vector for output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | out_offset | value of offset for the output tensor. It should be in the range of -128 to 127. |
| [in] | in_offset | value of offset for the input tensor It should be in the range of -127 to 128. |
| [in] | act_min | minimum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | act_max | maximum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | dilation_x | dummy |
| [in] | dilation_y | dummy |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast depthwise convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_shift | pointer of the shift vector for output tensor |
| [in] | out_scale | pointer of the scaling vector for output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | out_offset | value of offset for the output tensor. It should be in the range of -128 to 127. |
| [in] | in_offset | value of offset for the input tensor It should be in the range of -127 to 128. |
| [in] | act_min | minimum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | act_max | maximum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | dilation_x | dummy |
| [in] | dilation_y | dummy |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its needed size could be get by calling riscv_nn_conv_dw_HWC_s8_s8_s8_asym_bias_fast_any_get_buffer_size. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_dw_HWC_s8_s8_s8_asym_bias_fast_any.
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs signed 8-bit integer depthwise convolution with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs signed 8-bit integer depthwise convolution in any x and y dimensions with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs, and with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to (in_tensor_ch * ker_dim * ker_dim + 1) / 2. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim * ker_dim + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "(in_tensor_ch * ker_dim_x * ker_dim_y + 1) / 2". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs depthwise convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | ch_mult | multiplier of input tensor channels |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | dilation_x | dummy |
| [in] | dilation_y | dummy |
| [in] | bias | pointer of the bias vector |
| [in] | in_offset | value of offset for the input tensor It should be in the range of -255 to 0. |
| [in] | ker_offset | value of offset for the filter kernel It should be in the range of -255 to 0. |
| [in] | out_offset | value of offset for the output tensor. It should be in the range of 0 to 255. |
| [in] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | act_min | minimum value to clip out the ouput tensor. It should be in the range of 0 to 255. |
| [in] | act_max | maximum value to clip out the ouput tensor. It should be in the range of 0 to 255. |
| [in] | out_shift | shift amount for the output tensor |
| [in] | out_scale | value of sacling for the output tensor |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs signed 16-bit integer convolution with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "in_tensor_ch * ker_dim * ker_dim". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast signed 16-bit integer convolution with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast signed 16-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast 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.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast 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.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with asymmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | in_tensor_group | number of input tensor groups |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_shift | pointer of the shift vector for output tensor |
| [in] | out_scale | pointer of the scaling vector for output tensor |
| [in] | out_offset | value of offset for the output tensor. It should be in the range of -128 to 127. |
| [in] | in_offset | value of offset for the input tensor It should be in the range of -127 to 128. |
| [in] | act_min | minimum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | act_max | maximum value to clip out the ouput tensor. It should be in the range of -128 to 127. |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its needed size could be get by calling riscv_nn_conv_HWC_s8_s8_s8_asym_bias_any_get_buffer_size. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function is used to get the needed size, in bytes, by the input temporary buffer of riscv_nn_conv_HWC_s8_s8_s8_asym_bias_any.
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs signed 8-bit integer convolution for RGB images with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | tmp_buf | temporary buffer for kernel weights. It is required when -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast signed 8-bit integer convolution for RGB images with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs signed 8-bit integer convolution with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs signed 8-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector is enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast signed 8-bit integer convolution with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast signed 8-bit integer convolution in any x and y dimensions with shift-based quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | bias_lshift | left shift amount for the bias |
| [in] | out_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
| [in] | tmp_buf | dummy |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for signed 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution on RGB images for unsigned 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 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.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs and signed 16-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution on RGB images for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
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.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs and signed 8-bit integer outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution on RGB images for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input tensor |
| [in] | in_tensor_dim | input tensor dimension |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be "2 * (3 * ker_dim * ker_dim + 1)". |
| [in] | wt_tmp_buf | temporary buffer for kernel weights. It is required when -mext-dsp or -mext-vector enabled and its size must be "out_tensor_ch * (3 * ker_dim * ker_dim + 1)". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with bias inputs and symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | bias | pointer of the bias vector |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim | dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim | dimension of the filter kernel |
| [in] | pad | padding size |
| [in] | stride | convolution stride |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim | dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim * ker_dim". |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function performs fast convolution for unsigned 8-bit integer inputs/outputs in any x and y dimensions with symmetric quantization on the outputs.
| [in] | in_tensor | pointer of the input vector |
| [in] | in_tensor_dim_x | x dimension of the input tensor |
| [in] | in_tensor_dim_y | y dimension of the input tensor |
| [in] | in_tensor_ch | number of input tensor channels |
| [in] | ker_weight | pointer of kernel weights |
| [in] | out_tensor_ch | number of output tensor channels |
| [in] | ker_dim_x | x dimension of the filter kernel |
| [in] | ker_dim_y | y dimension of the filter kernel |
| [in] | pad_x | padding size in the x dimension |
| [in] | pad_y | padding size in the y dimension |
| [in] | stride_x | convolution stride in the x dimension |
| [in] | stride_y | convolution stride in the y dimension |
| [in] | pre_rshift | right shift amount for the output |
| [in] | out_scale | value of scaling for the output |
| [in] | post_rshift | right shift amount for the output |
| [out] | out_tensor | pointer of the output tensor |
| [in] | out_tensor_dim_x | x dimension of the output tensor |
| [in] | out_tensor_dim_y | y dimension of the output tensor |
| [in] | in_tmp_buf | temporary buffer for the input tensor. It is required when -mext-dsp or -mext-vector enabled and its size must be equal to "2 * in_tensor_ch * ker_dim_x * ker_dim_y". |