LIBML Version 4.1.9
LIBML NN Software Library
Loading...
Searching...
No Matches
tpt_fully_connected.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  tpt_nn_fc_params_asym_s8
struct  tpt_nn_fc_dims_asym_s8

Functions

void tpt_fully_connected_mat_vec_s8_wt_converter (q7_t *aWt_out, const q7_t *aWt_in, const uint32_t aCount, const uint32_t aWt_row)
 This is a weight converter for tpt_fully_connected_mat_vec_s16_s16_s8_sft_bias_fast.
tpt_nn_status tpt_fully_connected_s8_s8_s8_asym_bias (int8_t *aOut_tensor, const int8_t *aIn_tensor, const int8_t *aKernel, const int32_t *aBias, const tpt_nn_fc_params_asym_s8 *aFC_params, const tpt_nn_fc_dims_asym_s8 *aFC_dims, q15_t *aTmp_buf)
 This is a fully connected layer function for signed 8-bit integer inputs with bias inputs and asymmetric quantization on the outputs.
int32_t tpt_fully_connected_s8_s8_s8_asym_bias_get_buffer_size (const uint16_t aIn_vec_col)
 This function is used to obtain the required size, in bytes, for the temporary buffer of tpt_fully_connected_s8_s8_s8_asym_bias.
tpt_nn_status tpt_fully_connected_s8_s8_s8_sft_bias (q7_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const q7_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t aBias_lshift, const uint16_t aOut_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs with bias inputs and shift-based quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s8_s8_sft_bias_fast (q7_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const q7_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t aBias_lshift, const uint16_t aOut_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs with interleaved multiplication and shift-based quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s8_s8_sym_bias (q7_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s8_s8_sym_bias_fast (q7_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs/outputs with bias inputs, interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s8_s8_sym (q7_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s8_s8_sym_fast (q7_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs/outputs with interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s16_s8_sym_bias_fast (q15_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs, interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s16_s8_sym_bias (q15_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs and signed 16-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s16_s8_sym_fast (q15_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs and signed 16-bit integer outputs with interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_s8_s16_s8_sym (q15_t *aOutData, const q7_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 8-bit integer inputs and signed 16-bit integer outputs with symmetric quantization on the outputs.
void tpt_fully_connected_s8_wt_converter (q7_t *aWt_out, const q7_t *aWt_in, const uint32_t aCount, const uint32_t aWt_row)
 This is a weight converter for fully-connected functions with signed 8-bit weight data and named with "fast".
tpt_nn_status tpt_fully_connected_s16_s16_s8_asym_bias (int16_t *aOut_tensor, const int16_t *aIn_tensor, const int8_t *aWT_Matrix, const int64_t *aBias, const int32_t aIn_col, const int32_t aIn_bratch, const int32_t WT_row, const int32_t aInput_offset, const int32_t WT_offset, const int32_t aOutput_offset, const int32_t output_mult, const int32_t output_shift, const int32_t activation_min, const int32_t activation_max, q15_t *aTmp_buf)
 This is a fully connected layer function for signed 16-bit integer inputs with bias inputs and asymmetric quantization on the outputs.
int32_t tpt_fully_connected_s16_s16_s8_asym_bias_get_buffer_size (const uint16_t aIn_vec_col)
 This function is used to obtain the required size, in bytes, for the temporary buffer of tpt_fully_connected_s16_s16_s8_asym_bias.
tpt_nn_status tpt_fully_connected_s16_s16_s8_sft_bias_fast (q15_t *aOutData, const q15_t *aInData, const q7_t *aWT_Matrix, const q7_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t aBias_lshift, const uint16_t aOut_rshift, q15_t *aTmp)
 This function multiplies a signed 16-bit integer input vector by a signed 8-bit integer weight matrix in interleaved format and performs shift-based quantization on the outputs.
tpt_nn_status tpt_fully_connected_s16_s16_s8_sft_bias (q15_t *aOutData, const q15_t *aInData, const q7_t *aWT_Matrix, const q7_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t aBias_lshift, const uint16_t aOut_rshift, q15_t *aTmp)
 This function multiplies a signed 16-bit integer input vector by a signed 8-bit integer weight matrix in interleaved format and performs shift-based quantization on the outputs.
tpt_nn_status tpt_fully_connected_s16_s16_s16_sft_bias (q15_t *aOutData, const q15_t *aInData, const q15_t *aWT_Matrix, const q15_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t aBias_lshift, const uint16_t aOut_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 16-bit integer inputs with shift-based quantization on the outputs.
tpt_nn_status tpt_fully_connected_s16_s16_s16_sft_bias_fast (q15_t *aOutData, const q15_t *aInData, const q15_t *aWT_Matrix, const q15_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t aBias_lshift, const uint16_t aOut_rshift, q15_t *aTmp)
 This is a fully connected layer function for signed 16-bit integer inputs with interleaved multiplication and shift-based quantization on the outputs.
void tpt_fully_connected_s16_wt_converter (q15_t *aWt_out, const q15_t *aWt_in, const uint32_t aCount, const uint32_t aWt_row)
 This is a weight converter for fully-connected functions with signed 16-bit weight data and named with "fast".
tpt_nn_status tpt_fully_connected_u8_s8_s8_sym (int8_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 8-bit outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_s16_s8_sym_bias_fast (q15_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias inputs, interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_s16_s8_sym_bias (q15_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 16-bit outputs with bias input and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_s16_s8_sym_fast (q15_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 16-bit integer outputs with interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_s16_s8_sym (q15_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 16-bit outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_u8_s8_sym_bias (uint8_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs/outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_u8_s8_sym (uint8_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs/outputs with symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_u8_s8_sym_bias_fast (uint8_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs/outputs with bias inputs, interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_u8_s8_sym_fast (uint8_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs/outputs with interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_s8_s8_sym_bias (q7_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias inputs and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_s8_s8_sym_bias_fast (q7_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const q31_t *aBias, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 8-bit integer outputs with bias inputs, interleaved multiplication and symmetric quantization on the outputs.
tpt_nn_status tpt_fully_connected_u8_s8_s8_sym_fast (q7_t *aOutData, const uint8_t *aInData, const q7_t *aWT_Matrix, const uint16_t aCount, const uint16_t aWt_row, const uint16_t pre_rshift, const uint16_t out_scale, const uint16_t post_rshift, q15_t *aTmp)
 This is a fully connected layer function for unsigned 8-bit integer inputs and signed 8-bit integer outputs with interleaved multiplication and symmetric quantization on the outputs.

Function Documentation

◆ tpt_fully_connected_mat_vec_s8_wt_converter()

void tpt_fully_connected_mat_vec_s8_wt_converter ( q7_t * aWt_out,
const q7_t * aWt_in,
const uint32_t aCount,
const uint32_t aWt_row )

This is a weight converter for tpt_fully_connected_mat_vec_s16_s16_s8_sft_bias_fast.

Parameters
aWt_outpointer of the weight matrix stored in specific ordering
aWt_inpointer of the weight matrix
aCountnumber of elements in the input vector
aWt_rownumber of rows in the weight matrix

◆ tpt_fully_connected_s16_wt_converter()

void tpt_fully_connected_s16_wt_converter ( q15_t * aWt_out,
const q15_t * aWt_in,
const uint32_t aCount,
const uint32_t aWt_row )

This is a weight converter for fully-connected functions with signed 16-bit weight data and named with "fast".

Parameters
aWt_outpointer of the weight matrix stored in specific ordering
aWt_inpointer of the weight matrix
aCountnumber of elements in the input vector
aWt_rownumber of rows in the weight matrix

◆ tpt_fully_connected_s8_wt_converter()

void tpt_fully_connected_s8_wt_converter ( q7_t * aWt_out,
const q7_t * aWt_in,
const uint32_t aCount,
const uint32_t aWt_row )

This is a weight converter for fully-connected functions with signed 8-bit weight data and named with "fast".

Parameters
aWt_outpointer of the weight matrix stored in specific ordering
aWt_inpointer of the weight matrix
aCountnumber of elements in the input vector
aWt_rownumber of rows in the weight matrix