LIBML Version 4.1.9
LIBML NN Software Library
Loading...
Searching...
No Matches
tpt_convolve_wrapper_s16_s16_s8_asym.c File Reference
#include "tpt_math_nn.h"
Include dependency graph for tpt_convolve_wrapper_s16_s16_s8_asym.c:

Functions

tpt_nn_status tpt_convolve_wrapper_s16_s16_s8_asym (q15_t *aOut_tensor, const q15_t *aIn_tensor, const q7_t *aKernel, const int64_t *aBias, const tpt_nn_conv_asym_wrapper_params *aConv_params, const tpt_nn_per_channel_quant_params *aQuant_params, const tpt_nn_asym_dims *aConv_dims, q15_t *aTmp_buf)
 This is a wrapper function for tpt_convolve_s16_s16_s8_asym_bias_any. This function calls one of the one convolution functions according to the provided parameters.
int32_t tpt_convolve_wrapper_s16_s16_s8_asym_get_buffer_size (const int32_t aIn_tensor_c, const int32_t aKer_dim_w, const int32_t aKer_dim_h)
 This function is used to obtain the required size, in bytes, for the input temporary buffer of tpt_convolve_wrapper_s16_s16_s8_asym.

Function Documentation

◆ tpt_convolve_wrapper_s16_s16_s8_asym()

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

This is a wrapper function for tpt_convolve_s16_s16_s8_asym_bias_any. This function calls one of the one convolution functions according to the provided parameters.

Parameters
aOut_tesorpointer of output tensor
aIn_tensorpointer of the input tensor
aKernelpointer of kernel weights
aBiaspointer of the bias vector
aConv_paramsconvolution parameters (e.g. strides,pads,...) range of aConv_params->input_offset : dummy range of aConv_params->output_offset : dummy range of aConv_params->activative_min : -32768 to
  1. range of aConv_params->activative_max : -32768 to 32767.
aQuant_paramsper-channel quantization infoit contains the multiplier and shift values to be applied to each output channel
aConv_dimstensor dimensions
aTmp_bufdummy
Returns
tpt_nn_status
Note
  • Bias could be a null pointer as the bias vector is optional for this function.
  • During the quantization process, a positive out_shift value is used to left shift calculation results whereas a negative one is used to right shift.

◆ tpt_convolve_wrapper_s16_s16_s8_asym_get_buffer_size()

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

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

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