SHL 2.2.x
Loading...
Searching...
No Matches
Data structure

Classes

struct  csinn_quant_info
 
struct  csinn_tensor
 
struct  csinn_model
 
struct  csinn_session
 
struct  csinn_callback
 
struct  csinn_params_base
 
struct  csinn_fsmn_params
 
struct  csinn_conv2d_params
 
struct  csinn_conv3d_params
 
struct  csinn_fc_params
 
struct  csinn_pool_params
 
struct  csinn_unpooling_params
 
struct  csinn_roi_align_params
 
struct  csinn_roi_pool_params
 
struct  csinn_siso_params
 
struct  csinn_scatter_nd_params
 
struct  csinn_sigmoid_params
 
struct  csinn_relu_params
 
struct  csinn_prelu_params
 
struct  csinn_softmax_params
 
struct  csinn_where_softmax_params
 
struct  csinn_bn_params
 
struct  csinn_l2n_params
 
struct  csinn_lrn_params
 
struct  csinn_matmul_params
 
struct  csinn_diso_params
 
struct  csinn_select_params
 
struct  csinn_pad_params
 
struct  csinn_resize_params
 
struct  csinn_concat_params
 
struct  csinn_proposal_params
 
struct  csinn_psroipooling_params
 
struct  csinn_transpose_params
 
struct  csinn_reshape_params
 
struct  csinn_shape_params
 
struct  csinn_expand_dims_params
 
struct  csinn_reverse_params
 
struct  csinn_flatten_params
 
struct  csinn_crop_params
 
struct  csinn_slice_params
 
struct  csinn_split_params
 
struct  csinn_stack_params
 
struct  csinn_tile_params
 
struct  csinn_arange_params
 
struct  csinn_where_params
 
struct  csinn_unstack_params
 
struct  csinn_gather_params
 
struct  csinn_gather_nd_params
 
struct  csinn_squeeze_params
 
struct  csinn_ndarray_size_params
 
struct  csinn_space_to_batch_params
 
struct  csinn_space_to_batch_nd_params
 
struct  csinn_batch_to_space_params
 
struct  csinn_batch_to_space_nd_params
 
struct  csinn_space_to_depth_params
 
struct  csinn_depth_to_space_params
 
struct  csinn_one_hot_params
 
struct  csinn_sequence_mask_params
 
struct  csinn_im2col_params
 
struct  csinn_col2im_params
 
struct  csinn_reduce_params
 
struct  csinn_reorg_params
 
struct  csinn_segment_params
 
struct  csinn_cumsum_params
 
struct  csinn_cumprod_params
 
struct  csinn_broadcast_to_params
 
struct  csinn_clip_params
 
struct  csinn_strided_slice_params
 
struct  csinn_shuffle_channel_params
 
struct  csinn_topk_params
 
struct  csinn_non_max_suppression_params
 
struct  csinn_cast_params
 
struct  csinn_conv1d_params
 

Enumerations

enum  csinn_dtype_enum {
  CSINN_DTYPE_BOOL = 0 , CSINN_DTYPE_INT4 , CSINN_DTYPE_UINT8 , CSINN_DTYPE_INT8 ,
  CSINN_DTYPE_UINT16 , CSINN_DTYPE_INT16 , CSINN_DTYPE_UINT32 , CSINN_DTYPE_INT32 ,
  CSINN_DTYPE_FLOAT16 , CSINN_DTYPE_BFLOAT16 , CSINN_DTYPE_FLOAT32 , CSINN_DTYPE_FLOAT64 ,
  CSINN_DTYPE_INT64 , CSINN_DTYPE_SIZE
}
 
enum  csinn_mem_type_enum {
  CSINN_MEM_TYPE_CPU_NOT_ALIGNED = 0 , CSINN_MEM_TYPE_CPU_ALIGNED , CSINN_MEM_TYPE_DMABUF , CSINN_MEM_TYPE_ASP42 ,
  CSINN_MEM_TYPE_ASP41 , CSINN_MEM_TYPE_CPU_ACC
}
 
enum  csinn_quant_enum {
  CSINN_QUANT_UNSET = 0 , CSINN_QUANT_INT4_SYM , CSINN_QUANT_UINT8_ASYM , CSINN_QUANT_UINT8_SYM ,
  CSINN_QUANT_INT8_ASYM , CSINN_QUANT_INT8_SYM , CSINN_QUANT_INT16_SYM , CSINN_QUANT_FLOAT16 ,
  CSINN_QUANT_BFLOAT16 , CSINN_QUANT_FLOAT32 , CSINN_QUANT_INT4_ASYM_W_SYM , CSINN_QUANT_INT8_ASYM_W_SYM ,
  CSINN_QUANT_FLOAT16_W_INT8 , CSINN_QUANT_SIZE
}
 
enum  csinn_api_enum {
  CSINN_REF = 0 , CSINN_GREF , CSINN_C860 , CSINN_C906 ,
  CSINN_C920 , CSINN_ANOLE , CSINN_CH8601 , CSINN_TH1520 ,
  CSINN_DP1K , CSINN_I805 , CSINN_E804 , CSINN_REF_I805 ,
  CSINN_C908 , CSINN_TVMGEN , CSINN_ASP , CSINN_RVV ,
  CSINN_RVM , CSINN_E907 , CSINN_API_SIZE
}
 
enum  csinn_rmode_enum { CSINN_RM_LAYER = 0 , CSINN_RM_CPU_GRAPH , CSINN_RM_NPU_GRAPH , CSINN_RM_CPU_BASE_HYBRID , CSINN_RUN_MODE_SIZE }
 
enum  csinn_mode_save_enum { CSINN_SAVE_AND_RUN = 0 , CSINN_SAVE_ONLY , CSINN_RUN_ONLY }
 
enum  csinn_op_enum
 
enum  csinn_conv_mode_enum { CSINN_DIRECT = 0x0 , CSINN_WINOGRAD = 0x1 , CSINN_GEMM = 0x2 }
 
enum  csinn_pad_enum { CSINN_PAD_CONSTANT = 0x0 , CSINN_PAD_EDGE = 0x1 , CSINN_PAD_REFLECT = 0x2 }
 
enum  csinn_resize_enum { CSINN_RESIZE_BILINEAR = 0x0 , CSINN_RESIZE_NEAREST_NEIGHBOR = 0x1 , CSINN_RESIZE_NEAREST_BICUBIC = 0x2 }
 
enum  csinn_depth2space_enum { CSINN_DEPTHTOSPACE_DCR = 0x0 , CSINN_DEPTHTOSPACE_CRD = 0x1 }
 
enum  csinn_lrn_enum { CSINN_LRN_ACROSS_CHANNELS = 0x0 , CSINN_LRN_WITHIN_CHANNEL }
 
enum  csinn_layout_enum {
  CSINN_LAYOUT_NULL = 0x0 , CSINN_LAYOUT_N , CSINN_LAYOUT_NC , CSINN_LAYOUT_NCW ,
  CSINN_LAYOUT_NCHW , CSINN_LAYOUT_NCDHW , CSINN_LAYOUT_O , CSINN_LAYOUT_OI ,
  CSINN_LAYOUT_O16I16 , CSINN_LAYOUT_O32I32 , CSINN_LAYOUT_OIW , CSINN_LAYOUT_OIHW ,
  CSINN_LAYOUT_OIDHW , CSINN_LAYOUT_O1HW , CSINN_LAYOUT_NWC , CSINN_LAYOUT_NHWC ,
  CSINN_LAYOUT_NDHWC , CSINN_LAYOUT_OWI , CSINN_LAYOUT_OHWI , CSINN_LAYOUT_O16HWI16 ,
  CSINN_LAYOUT_O32HWI32 , CSINN_LAYOUT_ODHWI , CSINN_LAYOUT_1HWO , CSINN_LAYOUT_1HW16O16 ,
  CSINN_LAYOUT_1HW32O32 , CSINN_LAYOUT_NC1C0 , CSINN_LAYOUT_NC1WC0 , CSINN_LAYOUT_NC1HWC0 ,
  CSINN_LAYOUT_NC1DHWC0
}
 
enum  csinn_status_enum {
  CSINN_UNSUPPORT_LAYOUT = -3 , CSINN_UNSUPPORT_DTYPE = -2 , CSINN_CALLBACK_UNSET = -1 , CSINN_FALSE = 0 ,
  CSINN_TRUE = 1
}
 
enum  csinn_optimize_method_enum {
  CSINN_OPT_FORCE_REPLACE = -1 , CSINN_OPT_ASM = 10 , CSINN_OPT_INTRINSIC = 20 , CSINN_OPT_TVMGEN = 100 ,
  CSINN_OPT_C_REFERENCE = 1000 , CSINN_OPT_UNSUPPORTED = 1000000
}
 
enum  csinn_profiler_enum { CSINN_PROFILER_LEVEL_UNSET = 0 , CSINN_PROFILER_LEVEL_TIMER , CSINN_PROFILER_LEVEL_DUMP , CSINN_PROFILER_LEVEL_ALL }
 
enum  csinn_debug_enum {
  CSINN_DEBUG_LEVEL_DEBUG = -2 , CSINN_DEBUG_LEVEL_INFO , CSINN_DEBUG_LEVEL_WARNING , CSINN_DEBUG_LEVEL_ERROR ,
  CSINN_DEBUG_LEVEL_FATAL
}
 

Detailed Description

Enumeration Type Documentation

◆ csinn_dtype_enum

CSI-NN data type

Enumerator
CSINN_DTYPE_BOOL 

Boolean

CSINN_DTYPE_INT4 

Signed 4 bit fixed-point

CSINN_DTYPE_UINT8 

Unsigned 8 bit fixed-point

CSINN_DTYPE_INT8 

Signed 8 bit fixed-point

CSINN_DTYPE_UINT16 

Unsigned 16 bit fixed-point

CSINN_DTYPE_INT16 

Signed 16 bit fixed-point

CSINN_DTYPE_UINT32 

Unsigned 32 bit fixed-point

CSINN_DTYPE_INT32 

Signed 32 bit fixed-point

CSINN_DTYPE_FLOAT16 

Half-precision floating-point

CSINN_DTYPE_BFLOAT16 

Brain floating-point

CSINN_DTYPE_FLOAT32 

Single-precision floating-point

CSINN_DTYPE_FLOAT64 

Double-precision floating-point

CSINN_DTYPE_INT64 

Signed 64 bit fixed-point

◆ csinn_mem_type_enum

CSI-NN data memory type

Enumerator
CSINN_MEM_TYPE_CPU_NOT_ALIGNED 

Default storage

CSINN_MEM_TYPE_CPU_ALIGNED 

Aligned storage

CSINN_MEM_TYPE_DMABUF 

DMA buf

CSINN_MEM_TYPE_ASP42 

Structed sparsity 4:2

CSINN_MEM_TYPE_ASP41 

Structed sparsity 4:1

CSINN_MEM_TYPE_CPU_ACC 

Accelerator driver or others alloced CPU memory

◆ csinn_quant_enum

CSI-NN quant type

Enumerator
CSINN_QUANT_UNSET 

The quantization type is not set

CSINN_QUANT_INT4_SYM 

Symmetric signed 4-bit fixed-point quantization

CSINN_QUANT_UINT8_ASYM 

Asymmetric unsigned 8-bit fixed-point quantization

CSINN_QUANT_UINT8_SYM 

Symmetric unsigned 8-bit fixed-point quantization

CSINN_QUANT_INT8_ASYM 

Asymmetric signed 8-bit fixed-point quantization

CSINN_QUANT_INT8_SYM 

Symmetric signed 8-bit fixed-point quantization

CSINN_QUANT_INT16_SYM 

Symmetric signed 16-bit fixed-point quantization

CSINN_QUANT_FLOAT16 

16-bit floating-point quantization

CSINN_QUANT_BFLOAT16 

bf16 floating-point quantization

CSINN_QUANT_FLOAT32 

32-bit floating-point not quantized

CSINN_QUANT_INT4_ASYM_W_SYM 

Signed 4-bit Asymmetric activation and Symmetric weight

CSINN_QUANT_INT8_ASYM_W_SYM 

Signed 8-bit Asymmetric activation and Symmetric weight

CSINN_QUANT_FLOAT16_W_INT8 

16-bit floating-point and 8-bit symmetric weight

◆ csinn_api_enum

CSI-NN API type

Enumerator
CSINN_REF 

Reference c

CSINN_GREF 

reference graph

CSINN_C860 

C860 CPU platform

CSINN_C906 

C906 CPU platform

CSINN_C920 

C920 CPU platform

CSINN_ANOLE 

anole NPU platform

CSINN_CH8601 

ch8601 NPU platform

CSINN_TH1520 

th1520 NPU platform

CSINN_DP1K 

dp1000 NPU platform

CSINN_I805 

I805 CPU platform

CSINN_E804 

E804 CPU platform

CSINN_REF_I805 

I805 CPU platform

CSINN_C908 

C908 CPU platform

CSINN_TVMGEN 

TVM generate platform

CSINN_ASP 

ASP platform

CSINN_RVV 

RISC-V V extension general platform

CSINN_RVM 

RISC-V Matrix extension general platform

CSINN_E907 

E907 CPU platform

◆ csinn_rmode_enum

CSI-NN run mode

Enumerator
CSINN_RM_LAYER 

Run by layer

CSINN_RM_CPU_GRAPH 

CPU Graph Execution

CSINN_RM_NPU_GRAPH 

NPU Graph Execution

CSINN_RM_CPU_BASE_HYBRID 

CPU base graph and has subgraph

◆ csinn_mode_save_enum

CSI-NN model save

Enumerator
CSINN_SAVE_AND_RUN 

Save the model and run it

CSINN_SAVE_ONLY 

Save the model only

CSINN_RUN_ONLY 

Run the model only

◆ csinn_op_enum

CSI-NN OP and utils

◆ csinn_conv_mode_enum

CSI-NN convolution mode

Enumerator
CSINN_DIRECT 

using direct optimizational convolution

CSINN_WINOGRAD 

using winograd fast convolution

CSINN_GEMM 

using im2col + gemm convolution, im2col is optional

◆ csinn_pad_enum

CSI-NN pad mode

Enumerator
CSINN_PAD_CONSTANT 

pads with constant_value pad_value

CSINN_PAD_EDGE 

pads using the edge values of the input array

CSINN_PAD_REFLECT 

pads by reflecting values with respect to the edge

◆ csinn_resize_enum

CSI-NN resize mode

Enumerator
CSINN_RESIZE_BILINEAR 

Bilinear interpolation

CSINN_RESIZE_NEAREST_NEIGHBOR 

Nearest neighbor interpolation

CSINN_RESIZE_NEAREST_BICUBIC 

Bicubic interpolation

◆ csinn_depth2space_enum

CSI-NN depth2space mode

Enumerator
CSINN_DEPTHTOSPACE_DCR 

arranges data in the order of (depth,column,row)

CSINN_DEPTHTOSPACE_CRD 

arranges data in the order of (column,row,depth)

◆ csinn_lrn_enum

CSI-NN LRN type

Enumerator
CSINN_LRN_ACROSS_CHANNELS 

local response normalization across channels/channels

CSINN_LRN_WITHIN_CHANNEL 

local response normalization within the same channel

◆ csinn_layout_enum

CSI-NN layout type

Enumerator
CSINN_LAYOUT_NULL 

Not set

CSINN_LAYOUT_N 

NCHW input and output, 1 dimension

CSINN_LAYOUT_NC 

NCHW input and output, 2 dimensions

CSINN_LAYOUT_NCW 

NCHW input and output, 3 dimensions

CSINN_LAYOUT_NCHW 

NCHW input and output, 4 dimensions

CSINN_LAYOUT_NCDHW 

NCHW input and output, 5 dimensions

CSINN_LAYOUT_O 

NCHW constant, 1 dimension

CSINN_LAYOUT_OI 

NCHW constant, 2 dimensions

CSINN_LAYOUT_O16I16 

16 bytes in parallel for ASP platform

CSINN_LAYOUT_O32I32 

32 bytes in parallel for ASP platform

CSINN_LAYOUT_OIW 

NCHW constant, 3 dimension

CSINN_LAYOUT_OIHW 

NCHW constant, 4 dimension

CSINN_LAYOUT_OIDHW 

NCHW constant, 5 dimension

CSINN_LAYOUT_O1HW 

NCHW constant, depthwise convolution only

CSINN_LAYOUT_NWC 

NHWC input and output, 3 dimensions

CSINN_LAYOUT_NHWC 

NHWC input and output, 4 dimensions

CSINN_LAYOUT_NDHWC 

NHWC input and output, 5 dimensions

CSINN_LAYOUT_OWI 

NHWC constant, 3 dimensions

CSINN_LAYOUT_OHWI 

NHWC constant, 4 dimensions

CSINN_LAYOUT_O16HWI16 

16 bytes in parallel for ASP platform

CSINN_LAYOUT_O32HWI32 

32 bytes in parallel for ASP platform

CSINN_LAYOUT_ODHWI 

NHWC constant, 5 dimensions

CSINN_LAYOUT_1HWO 

NHWC constant, depthwise convolution only

CSINN_LAYOUT_1HW16O16 

16 bytes in parallel for ASP platform

CSINN_LAYOUT_1HW32O32 

32 bytes in parallel for ASP platform

CSINN_LAYOUT_NC1C0 

NC1HWC0 input and output, 2 dimension

CSINN_LAYOUT_NC1WC0 

NC1HWC0 input and output, 3 dimension

CSINN_LAYOUT_NC1HWC0 

NC1HWC0 input and output, 4 dimension

CSINN_LAYOUT_NC1DHWC0 

NC1HWC0 input and output, 5 dimension

◆ csinn_status_enum

CSI-NN return type

Enumerator
CSINN_UNSUPPORT_LAYOUT 

An error occurred while executing the function. An unsupported layout is used

CSINN_UNSUPPORT_DTYPE 

An error occurred while executing the function. An unsupported data type is used

CSINN_CALLBACK_UNSET 

An error occurred while executing the function. The callback function is not set

CSINN_FALSE 

An error occurred while executing the function

CSINN_TRUE 

The function runs successfully

◆ csinn_optimize_method_enum

CSI-NN optimize level

Enumerator
CSINN_OPT_FORCE_REPLACE 

force replace, must choose it

CSINN_OPT_ASM 

assmbly optimized

CSINN_OPT_INTRINSIC 

Intrinsic code optimized

CSINN_OPT_TVMGEN 

generate by HHB

CSINN_OPT_C_REFERENCE 

C reference code that have not optimized

CSINN_OPT_UNSUPPORTED 

Cannot supported

◆ csinn_profiler_enum

CSI-NN proifle type

Enumerator
CSINN_PROFILER_LEVEL_UNSET 

The performance analysis mode is not set

CSINN_PROFILER_LEVEL_TIMER 

The performance analysis mode, which prints some time information

CSINN_PROFILER_LEVEL_DUMP 

The performance analysis mode, which dump the the output tensor value of every layer.

CSINN_PROFILER_LEVEL_ALL 

The performance analysis mode, do all operations that mentioned above.

◆ csinn_debug_enum

debug type

Enumerator
CSINN_DEBUG_LEVEL_DEBUG 

developer debugging level

CSINN_DEBUG_LEVEL_INFO 

details level

CSINN_DEBUG_LEVEL_WARNING 

warning message

CSINN_DEBUG_LEVEL_ERROR 

error message

CSINN_DEBUG_LEVEL_FATAL 

program crash