21#ifndef INCLUDE_SHL_REF_H_
22#define INCLUDE_SHL_REF_H_
195 struct csinn_cache_matmul_params *params);
199 struct csinn_cache_matmul_params *params);
203 struct csinn_cache_matmul_params *params);
207 struct csinn_cache_conv1d_params *params);
211 struct csinn_cache_conv1d_params *params);
215 struct csinn_cache_conv1d_params *params);
249int shl_ref_depthwise_conv2d_channel_relu_quant(
struct csinn_tensor *o_input,
259int shl_ref_depthwise_conv2d_channel_relu6_quant(
struct csinn_tensor *input,
508 struct csinn_layer_norm_params *params);
512 struct csinn_layer_norm_params *params);
868int shl_ref_unsorted_segment_mean_quant(
struct csinn_tensor *input,
897int shl_ref_unsorted_segment_prod_quant(
struct csinn_tensor *input,
1175int32_t shl_ref_max_internal_s32(int32_t a, int32_t b);
1176int32_t shl_ref_min_internal_s32(int32_t a, int32_t b);
1177int32_t shl_ref_get_index(int32_t *dim, int32_t index0, int32_t index1, int32_t index2,
1179int32_t shl_ref_get_index_5(int32_t *dim, int32_t index0, int32_t index1, int32_t index2,
1180 int32_t index3, int32_t index4);
1181int32_t shl_ref_get_index_iter(int32_t *dim,
int dim_count, int32_t *index);
1182float shl_ref_get_scale(int32_t multiplier, int32_t shift);
1183float shl_ref_dequantize_u8_to_f32(uint8_t input,
struct csinn_quant_info *qinfo);
1184float shl_ref_dequantize_i8_to_f32(int8_t input,
struct csinn_quant_info *qinfo);
1185uint8_t shl_ref_quantize_f32_to_u8(
float input,
struct csinn_quant_info *qinfo);
1186int8_t shl_ref_quantize_f32_to_i8(
float input,
struct csinn_quant_info *qinfo);
1187uint8_t shl_ref_quantize_channel_u8(int32_t data,
struct csinn_tensor *input,
1189int8_t shl_ref_quantize_channel_i8(int32_t data,
struct csinn_tensor *input,
1191float shl_ref_uint8_to_float(uint8_t i,
struct csinn_tensor *t);
1192float shl_ref_int8_to_float(int8_t i,
struct csinn_tensor *t);
1193int16_t shl_ref_float32_to_float16(
float value);
1194float shl_ref_float16_to_float32(int16_t value);
1195int16_t shl_ref_float32_to_bfloat16(
float value);
1196float shl_ref_bfloat16_to_float32(int16_t value);
1200 int32_t permute[4]);
1203int32_t shl_ref_get_reduction_index(int32_t k,
const int32_t *strides,
const int32_t *extents,
1206void shl_ref_free_float_tensor(
struct csinn_tensor *src);
1211int shl_ref_tensor_transform_free_f32(
struct csinn_tensor *input);
1214struct shl_ref_diso_callback {
1224 struct shl_ref_diso_callback *cb);
1226 int32_t *shape, int32_t shape_count);
1228 int32_t *shape, int32_t shape_count);
1230 int32_t *shape, int32_t shape_count);
1233 void *params,
void *cb);
1253void asr_buffer_init(
struct csinn_asr_buffer_t *buffer,
size_t buffer_size,
size_t data_lenth);
1255void *asr_buffer_insert_front(
struct csinn_asr_buffer_t *buffer,
void *input,
size_t len);
1257void *asr_buffer_insert_back(
struct csinn_asr_buffer_t *buffer,
void *input,
size_t len);
1259void *asr_buffer_get_buffer(
struct csinn_asr_buffer_t *buffer);
1261void asr_buffer_reset(
struct csinn_asr_buffer_t *buffer);
Definition: csinn_data_structure.h:893
Definition: csinn_data_structure.h:959
Definition: csinn_data_structure.h:705
Definition: csinn_data_structure.h:1074
Definition: csinn_data_structure.h:1117
Definition: csinn_data_structure.h:1081
Definition: csinn_data_structure.h:1024
Definition: csinn_data_structure.h:780
Definition: csinn_data_structure.h:1162
Definition: csinn_data_structure.h:553
Definition: csinn_data_structure.h:575
Definition: csinn_data_structure.h:1067
Definition: csinn_data_structure.h:1060
Definition: csinn_data_structure.h:984
Definition: csinn_data_structure.h:753
Definition: csinn_data_structure.h:837
Definition: csinn_data_structure.h:596
Definition: csinn_data_structure.h:849
Definition: csinn_data_structure.h:543
Definition: csinn_data_structure.h:924
Definition: csinn_data_structure.h:919
Definition: csinn_data_structure.h:1011
Definition: csinn_data_structure.h:715
Definition: csinn_data_structure.h:727
Definition: csinn_data_structure.h:746
Definition: csinn_data_structure.h:936
Definition: csinn_data_structure.h:1109
Definition: csinn_data_structure.h:991
Definition: csinn_data_structure.h:763
Definition: csinn_data_structure.h:605
Definition: csinn_data_structure.h:686
Definition: csinn_data_structure.h:787
Definition: csinn_data_structure.h:808
Definition: csinn_data_structure.h:464
Definition: csinn_data_structure.h:1033
Definition: csinn_data_structure.h:676
Definition: csinn_data_structure.h:825
Definition: csinn_data_structure.h:773
Definition: csinn_data_structure.h:843
Definition: csinn_data_structure.h:636
Definition: csinn_data_structure.h:649
Definition: csinn_data_structure.h:666
Definition: csinn_data_structure.h:1053
Definition: csinn_data_structure.h:758
Definition: csinn_data_structure.h:502
Definition: csinn_data_structure.h:832
Definition: csinn_data_structure.h:1097
Definition: csinn_data_structure.h:671
Definition: csinn_data_structure.h:661
Definition: csinn_data_structure.h:862
Definition: csinn_data_structure.h:692
Definition: csinn_data_structure.h:941
Definition: csinn_data_structure.h:978
Definition: csinn_data_structure.h:871
Definition: csinn_data_structure.h:929
Definition: csinn_data_structure.h:879
Definition: csinn_data_structure.h:1088
Definition: csinn_data_structure.h:475
struct csinn_session * sess
Definition: csinn_data_structure.h:489
void * data
Definition: csinn_data_structure.h:476
Definition: csinn_data_structure.h:886
Definition: csinn_data_structure.h:1103
Definition: csinn_data_structure.h:818
Definition: csinn_data_structure.h:627
Definition: csinn_data_structure.h:912
Definition: csinn_data_structure.h:907
Definition: csinn_data_structure.h:698