SHL 2.2.x
Loading...
Searching...
No Matches
shl_c908.h
1/*
2 * Copyright (C) 2016-2023 T-Head Semiconductor Co., Ltd. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Licensed under the Apache License, Version 2.0 (the License); you may
7 * not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19/* SHL version 2.2.x */
20
21#ifndef INCLUDE_SHL_C908_H_
22#define INCLUDE_SHL_C908_H_
23
24#include "csi_nn.h"
25#include "shl_gref.h"
26#include "shl_ref.h"
27#include "shl_thead_rvv.h"
28
29/*********************************** initialization ***********************************/
30int shl_c908_conv2d_init_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
31 struct csinn_tensor *kernel, struct csinn_tensor *bias,
32 struct csinn_conv2d_params *params);
33int shl_c908_conv2d_init_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
34 struct csinn_tensor *kernel, struct csinn_tensor *bias,
35 struct csinn_conv2d_params *params);
36int shl_c908_conv2d_init_int8(struct csinn_tensor *input, struct csinn_tensor *output,
37 struct csinn_tensor *kernel, struct csinn_tensor *bias,
38 struct csinn_conv2d_params *params);
39
40int shl_c908_depthwise_conv2d_init_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
41 struct csinn_tensor *kernel, struct csinn_tensor *bias,
42 struct csinn_conv2d_params *params);
43int shl_c908_depthwise_conv2d_init_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
44 struct csinn_tensor *kernel, struct csinn_tensor *bias,
45 struct csinn_conv2d_params *params);
46int shl_c908_depthwise_conv2d_init_int8(struct csinn_tensor *input, struct csinn_tensor *output,
47 struct csinn_tensor *kernel, struct csinn_tensor *bias,
48 struct csinn_conv2d_params *params);
49
50int shl_c908_avgpool2d_init_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
51 struct csinn_pool_params *params);
52int shl_c908_avgpool2d_init_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
53 struct csinn_pool_params *params);
54int shl_c908_avgpool2d_init_int8(struct csinn_tensor *input, struct csinn_tensor *output,
55 struct csinn_pool_params *params);
56
57int shl_c908_maxpool2d_init_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
58 struct csinn_pool_params *params);
59int shl_c908_maxpool2d_init_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
60 struct csinn_pool_params *params);
61int shl_c908_maxpool2d_init_int8(struct csinn_tensor *input, struct csinn_tensor *output,
62 struct csinn_pool_params *params);
63
64int shl_c908_fullyconnected_init_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
65 struct csinn_tensor *weights, struct csinn_tensor *bias,
66 struct csinn_fc_params *params);
67int shl_c908_fullyconnected_init_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
68 struct csinn_tensor *weights, struct csinn_tensor *bias,
69 struct csinn_fc_params *params);
70int shl_c908_fullyconnected_init_int8(struct csinn_tensor *input, struct csinn_tensor *output,
71 struct csinn_tensor *weights, struct csinn_tensor *bias,
72 struct csinn_fc_params *params);
73int shl_c908_fullyconnected_init_int4(struct csinn_tensor *input, struct csinn_tensor *output,
74 struct csinn_tensor *weights, struct csinn_tensor *bias,
75 struct csinn_fc_params *params);
76
77/************************************ convolution *********************************/
78/*********************************** im2col + gemm ********************************/
79void shl_c908_conv_im2col_gemm_reorder_kernel_fp32(struct csinn_tensor *kernel,
80 struct csinn_conv2d_params *params);
81void shl_c908_conv_im2col_gemm_reorder_kernel_fp16(struct csinn_tensor *kernel,
82 struct csinn_conv2d_params *params);
83void shl_c908_conv_im2col_gemm_reorder_kernel_int8(struct csinn_tensor *kernel,
84 struct csinn_conv2d_params *params);
85
86int shl_c908_conv_im2col_gemm_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
87 struct csinn_tensor *kernel, struct csinn_tensor *bias,
88 struct csinn_conv2d_params *params);
89int shl_c908_conv_im2col_gemm_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
90 struct csinn_tensor *kernel, struct csinn_tensor *bias,
91 struct csinn_conv2d_params *params);
92int shl_c908_conv_im2col_gemm_int8(struct csinn_tensor *input, struct csinn_tensor *output,
93 struct csinn_tensor *kernel, struct csinn_tensor *bias,
94 struct csinn_conv2d_params *params);
95
96void shl_c908_conv_im2col_gemm_reorder_kernel_packn_fp32(struct csinn_tensor *kernel,
97 struct csinn_conv2d_params *params);
98void shl_c908_conv_im2col_gemm_reorder_kernel_packn_fp16(struct csinn_tensor *kernel,
99 struct csinn_conv2d_params *params);
100void shl_c908_conv_im2col_gemm_reorder_kernel_packn_int8(struct csinn_tensor *kernel,
101 struct csinn_conv2d_params *params);
102
103int shl_c908_conv_im2col_gemm_packn_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
104 struct csinn_tensor *kernel, struct csinn_tensor *bias,
105 struct csinn_conv2d_params *params);
106int shl_c908_conv_im2col_gemm_packn_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
107 struct csinn_tensor *kernel, struct csinn_tensor *bias,
108 struct csinn_conv2d_params *params);
109int shl_c908_conv_im2col_gemm_packn_int8(struct csinn_tensor *input, struct csinn_tensor *output,
110 struct csinn_tensor *kernel, struct csinn_tensor *bias,
111 struct csinn_conv2d_params *params);
112
113void shl_c908_conv_im2col_gemm_reorder_kernel_pack1ton_fp32(struct csinn_tensor *kernel,
114 struct csinn_conv2d_params *params);
115void shl_c908_conv_im2col_gemm_reorder_kernel_pack1ton_fp16(struct csinn_tensor *kernel,
116 struct csinn_conv2d_params *params);
117void shl_c908_conv_im2col_gemm_reorder_kernel_pack1ton_int8(struct csinn_tensor *kernel,
118 struct csinn_conv2d_params *params);
119
120int shl_c908_conv_im2col_gemm_pack1ton_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
121 struct csinn_tensor *kernel, struct csinn_tensor *bias,
122 struct csinn_conv2d_params *params);
123int shl_c908_conv_im2col_gemm_pack1ton_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
124 struct csinn_tensor *kernel, struct csinn_tensor *bias,
125 struct csinn_conv2d_params *params);
126int shl_c908_conv_im2col_gemm_pack1ton_int8(struct csinn_tensor *input, struct csinn_tensor *output,
127 struct csinn_tensor *kernel, struct csinn_tensor *bias,
128 struct csinn_conv2d_params *params);
129
130void shl_c908_conv_im2col_gemm_reorder_kernel_packnto1_fp32(struct csinn_tensor *kernel,
131 struct csinn_conv2d_params *params);
132void shl_c908_conv_im2col_gemm_reorder_kernel_packnto1_fp16(struct csinn_tensor *kernel,
133 struct csinn_conv2d_params *params);
134void shl_c908_conv_im2col_gemm_reorder_kernel_packnto1_int8(struct csinn_tensor *kernel,
135 struct csinn_conv2d_params *params);
136
137int shl_c908_conv_im2col_gemm_packnto1_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
138 struct csinn_tensor *kernel, struct csinn_tensor *bias,
139 struct csinn_conv2d_params *params);
140int shl_c908_conv_im2col_gemm_packnto1_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
141 struct csinn_tensor *kernel, struct csinn_tensor *bias,
142 struct csinn_conv2d_params *params);
143int shl_c908_conv_im2col_gemm_packnto1_int8(struct csinn_tensor *input, struct csinn_tensor *output,
144 struct csinn_tensor *kernel, struct csinn_tensor *bias,
145 struct csinn_conv2d_params *params);
146
147/******************************** conv2d1x1s1 + gemm ******************************/
148void shl_c908_conv1x1s1_gemm_reorder_kernel_fp32(struct csinn_tensor *kernel,
149 struct csinn_conv2d_params *params);
150void shl_c908_conv1x1s1_gemm_reorder_kernel_fp16(struct csinn_tensor *kernel,
151 struct csinn_conv2d_params *params);
152void shl_c908_conv1x1s1_gemm_reorder_kernel_int8(struct csinn_tensor *kernel,
153 struct csinn_conv2d_params *params);
154
155int shl_c908_conv1x1s1_gemm_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
156 struct csinn_tensor *kernel, struct csinn_tensor *bias,
157 struct csinn_conv2d_params *params);
158int shl_c908_conv1x1s1_gemm_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
159 struct csinn_tensor *kernel, struct csinn_tensor *bias,
160 struct csinn_conv2d_params *params);
161int shl_c908_conv1x1s1_gemm_int8(struct csinn_tensor *input, struct csinn_tensor *output,
162 struct csinn_tensor *kernel, struct csinn_tensor *bias,
163 struct csinn_conv2d_params *params);
164
165void shl_c908_conv1x1s1_gemm_reorder_kernel_packn_fp32(struct csinn_tensor *kernel,
166 struct csinn_conv2d_params *params);
167void shl_c908_conv1x1s1_gemm_reorder_kernel_packn_fp16(struct csinn_tensor *kernel,
168 struct csinn_conv2d_params *params);
169void shl_c908_conv1x1s1_gemm_reorder_kernel_packn_int8(struct csinn_tensor *kernel,
170 struct csinn_conv2d_params *params);
171
172int shl_c908_conv1x1s1_gemm_packn_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
173 struct csinn_tensor *kernel, struct csinn_tensor *bias,
174 struct csinn_conv2d_params *params);
175int shl_c908_conv1x1s1_gemm_packn_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
176 struct csinn_tensor *kernel, struct csinn_tensor *bias,
177 struct csinn_conv2d_params *params);
178int shl_c908_conv1x1s1_gemm_packn_int8(struct csinn_tensor *input, struct csinn_tensor *output,
179 struct csinn_tensor *kernel, struct csinn_tensor *bias,
180 struct csinn_conv2d_params *params);
181
182void shl_c908_conv1x1s1_gemm_reorder_kernel_pack1ton_fp32(struct csinn_tensor *kernel,
183 struct csinn_conv2d_params *params);
184void shl_c908_conv1x1s1_gemm_reorder_kernel_pack1ton_fp16(struct csinn_tensor *kernel,
185 struct csinn_conv2d_params *params);
186void shl_c908_conv1x1s1_gemm_reorder_kernel_pack1ton_int8(struct csinn_tensor *kernel,
187 struct csinn_conv2d_params *params);
188
189int shl_c908_conv1x1s1_gemm_pack1ton_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
190 struct csinn_tensor *kernel, struct csinn_tensor *bias,
191 struct csinn_conv2d_params *params);
192int shl_c908_conv1x1s1_gemm_pack1ton_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
193 struct csinn_tensor *kernel, struct csinn_tensor *bias,
194 struct csinn_conv2d_params *params);
195int shl_c908_conv1x1s1_gemm_pack1ton_int8(struct csinn_tensor *input, struct csinn_tensor *output,
196 struct csinn_tensor *kernel, struct csinn_tensor *bias,
197 struct csinn_conv2d_params *params);
198
199void shl_c908_conv1x1s1_gemm_reorder_kernel_packnto1_fp32(struct csinn_tensor *kernel,
200 struct csinn_conv2d_params *params);
201void shl_c908_conv1x1s1_gemm_reorder_kernel_packnto1_fp16(struct csinn_tensor *kernel,
202 struct csinn_conv2d_params *params);
203void shl_c908_conv1x1s1_gemm_reorder_kernel_packnto1_int8(struct csinn_tensor *kernel,
204 struct csinn_conv2d_params *params);
205
206int shl_c908_conv1x1s1_gemm_packnto1_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
207 struct csinn_tensor *kernel, struct csinn_tensor *bias,
208 struct csinn_conv2d_params *params);
209int shl_c908_conv1x1s1_gemm_packnto1_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
210 struct csinn_tensor *kernel, struct csinn_tensor *bias,
211 struct csinn_conv2d_params *params);
212int shl_c908_conv1x1s1_gemm_packnto1_int8(struct csinn_tensor *input, struct csinn_tensor *output,
213 struct csinn_tensor *kernel, struct csinn_tensor *bias,
214 struct csinn_conv2d_params *params);
215
216/*********************************** winograd ***********************************/
217void shl_c908_wg_b6f3s1_trans_kernel_pack8_fp32(struct csinn_tensor *src_kernel,
218 struct csinn_tensor *dst_kernel);
219void shl_c908_wg_b6f3s1_trans_kernel_pack8_fp16(struct csinn_tensor *src_kernel,
220 struct csinn_tensor *dst_kernel);
221void shl_c908_wg_b6f3s1_trans_kernel_pack16_fp16(struct csinn_tensor *src_kernel,
222 struct csinn_tensor *dst_kernel);
223
224void shl_c908_wg_b4f3s1_trans_kernel_pack8_fp32(struct csinn_tensor *src_kernel,
225 struct csinn_tensor *dst_kernel);
226void shl_c908_wg_b4f3s1_trans_kernel_pack8_fp16(struct csinn_tensor *src_kernel,
227 struct csinn_tensor *dst_kernel);
228void shl_c908_wg_b4f3s1_trans_kernel_pack16_fp16(struct csinn_tensor *src_kernel,
229 struct csinn_tensor *dst_kernel);
230void shl_c908_wg_b4f3s1_trans_kernel_pack8_int8(struct csinn_tensor *src_kernel,
231 struct csinn_tensor *dst_kernel);
232
233int shl_c908_wg_b6f3s1_pack8_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
234 struct csinn_tensor *kernel, struct csinn_tensor *bias,
235 struct csinn_conv2d_params *params);
236int shl_c908_wg_b6f3s1_pack8_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
237 struct csinn_tensor *kernel, struct csinn_tensor *bias,
238 struct csinn_conv2d_params *params);
239int shl_c908_wg_b6f3s1_pack16_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
240 struct csinn_tensor *kernel, struct csinn_tensor *bias,
241 struct csinn_conv2d_params *params);
242
243int shl_c908_wg_b4f3s1_pack8_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
244 struct csinn_tensor *kernel, struct csinn_tensor *bias,
245 struct csinn_conv2d_params *params);
246int shl_c908_wg_b4f3s1_pack8_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
247 struct csinn_tensor *kernel, struct csinn_tensor *bias,
248 struct csinn_conv2d_params *params);
249int shl_c908_wg_b4f3s1_pack16_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
250 struct csinn_tensor *kernel, struct csinn_tensor *bias,
251 struct csinn_conv2d_params *params);
252int shl_c908_wg_b4f3s1_pack8_int8(struct csinn_tensor *input, struct csinn_tensor *output,
253 struct csinn_tensor *kernel, struct csinn_tensor *bias,
254 struct csinn_conv2d_params *params);
255
256void shl_c908_ncxhwx_wg_b6f3s1_trans_kernel_packn_fp32(struct csinn_tensor *src_kernel,
257 struct csinn_tensor *dst_kernel);
258void shl_c908_ncxhwx_wg_b6f3s1_trans_kernel_packn_fp16(struct csinn_tensor *src_kernel,
259 struct csinn_tensor *dst_kernel);
260
261int shl_c908_ncxhwx_wg_b6f3s1_packn_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
262 struct csinn_tensor *kernel, struct csinn_tensor *bias,
263 struct csinn_conv2d_params *params);
264int shl_c908_ncxhwx_wg_b6f3s1_packn_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
265 struct csinn_tensor *kernel, struct csinn_tensor *bias,
266 struct csinn_conv2d_params *params);
267
268void shl_c908_ncxhwx_wg_b4f3s1_trans_kernel_packn_fp32(struct csinn_tensor *src_kernel,
269 struct csinn_tensor *dst_kernel);
270void shl_c908_ncxhwx_wg_b4f3s1_trans_kernel_packn_fp16(struct csinn_tensor *src_kernel,
271 struct csinn_tensor *dst_kernel);
272void shl_c908_ncxhwx_wg_b4f3s1_trans_kernel_packn_int8(struct csinn_tensor *src_kernel,
273 struct csinn_tensor *dst_kernel);
274
275int shl_c908_ncxhwx_wg_b4f3s1_packn_fp32(struct csinn_tensor *input, struct csinn_tensor *output,
276 struct csinn_tensor *kernel, struct csinn_tensor *bias,
277 struct csinn_conv2d_params *params);
278int shl_c908_ncxhwx_wg_b4f3s1_packn_fp16(struct csinn_tensor *input, struct csinn_tensor *output,
279 struct csinn_tensor *kernel, struct csinn_tensor *bias,
280 struct csinn_conv2d_params *params);
281int shl_c908_ncxhwx_wg_b4f3s1_packn_int8(struct csinn_tensor *input, struct csinn_tensor *output,
282 struct csinn_tensor *kernel, struct csinn_tensor *bias,
283 struct csinn_conv2d_params *params);
284
285/*********************************** gemm ncxhwx kernel ***********************************/
286void shl_c908_ncxhwx_gemm_12xpack2n_fp32(float *dst, const float *sa, const float *sb,
287 const float *bias, int m, int k, int n, bool fuse_relu);
288void shl_c908_ncxhwx_gemm_12xpack2n_fp16(__fp16 *dst, const __fp16 *sa, const __fp16 *sb,
289 const __fp16 *bias, int m, int k, int n, bool fuse_relu);
290void shl_c908_ncxhwx_gemm_4xpack2n_int8(int8_t *dst, const int8_t *sa, const int8_t *sb,
291 const int32_t *bias, int m, int k, int n, int32_t out_zp,
292 int32_t *mult, int32_t *shift);
293void shl_c908_ncxhwx_gemm_12xpackn_int8_dot(int8_t *dst, const int8_t *sa, const int8_t *sb,
294 const int32_t *bias, int m, int k, int n,
295 int32_t out_zp, int32_t *mult, int32_t *shift);
296
297void shl_c908_ncxhwx_gemm_12xpackn_int16(int32_t *dst, const int16_t *sa, const int16_t *sb, int m,
298 int k, int n);
299/*********************************** gemm kernel ***********************************/
300void shl_c908_reorder_kernel_n8_fp32(float *src, float *dst, int m, int k, int ldc);
301void shl_c908_reorder_input_z12_fp32(float *src, float *dst, int k, int n, int ldc);
302void shl_c908_gemm_8x12_fp32(float *dst, const float *sa, const float *sb, float *bias, int m,
303 int k, int n, int ldc);
304
305void shl_c908_reorder_kernel_n8_fp16(__fp16 *src, __fp16 *dst, int m, int k, int ldc);
306void shl_c908_reorder_input_z24_fp16(__fp16 *src, __fp16 *dst, int k, int n, int ldc);
307void shl_c908_gemm_8x24_fp16(__fp16 *dst, const __fp16 *sa, const __fp16 *sb, __fp16 *bias, int m,
308 int k, int n, int ldc);
309
310void shl_c908_reorder_kernel_n8_int8_dot(int8_t *src, int8_t *dst, int m, int k, int ldc);
311void shl_c908_reorder_input_z8_int8_dot(int8_t *src, int8_t *dst, int k, int n, int ldc);
312void shl_c908_gemm_8x8_int8_dot(int8_t *dst, const int8_t *sa, const int8_t *sb, int32_t *bias,
313 int m, int k, int n, int ldc, int32_t out_zp, int32_t *mult,
314 int32_t *shift);
315void shl_c908_reorder_input_z12_int8(int8_t *src, int8_t *dst, int k, int n, int ldc);
316
317/*********************************** VLEN = 256 ***********************************/
318/*********************************** VLEN = 256 ***********************************/
319/*********************************** VLEN = 256 ***********************************/
320
321void shl_c908_reorder_input_z16_fp32_v256(float *src, float *dst, int k, int n, int ldc);
322void shl_c908_gemm_8x16_fp32_v256(float *dst, const float *sa, const float *sb, float *bias, int m,
323 int k, int n, int ldc);
324
325void shl_c908_reorder_input_z32_fp16_v256(__fp16 *src, __fp16 *dst, int k, int n, int ldc);
326void shl_c908_gemm_8x32_fp16_v256(__fp16 *dst, const __fp16 *sa, const __fp16 *sb, __fp16 *bias,
327 int m, int k, int n, int ldc);
328
329void shl_c908_reorder_input_z16_int8_v256_dot(int8_t *src, int8_t *dst, int k, int n, int ldc);
330void shl_c908_gemm_8x16_int8_v256_dot(int8_t *dst, const int8_t *sa, const int8_t *sb,
331 int32_t *bias, int m, int k, int n, int ldc, int32_t out_zp,
332 int32_t *mult, int32_t *shift);
333
334void shl_c908_f32_to_u8(const float *input, uint8_t *output, int32_t offset, float *scale,
335 uint32_t length);
336void shl_c908_f32_to_i8(const float *input, int8_t *output, int32_t offset, float *scale,
337 uint32_t length);
338
339#ifdef SHL_UNUSED_REGISTER_BLK
340void shl_c908_reorder_input_z8_fp32(float *src, float *dst, int k, int n, int ldc);
341void shl_c908_gemm_8x8_fp32(float *dst, const float *sa, const float *sb, float *bias, int m, int k,
342 int n, int ldc);
343void shl_c908_reorder_input_z16_fp16(__fp16 *src, __fp16 *dst, int k, int n, int ldc);
344void shl_c908_gemm_8x16_fp16(__fp16 *dst, const __fp16 *sa, const __fp16 *sb, __fp16 *bias, int m,
345 int k, int n, int ldc);
346
347void shl_c908_reorder_input_z24_fp32_v256(float *src, float *dst, int k, int n, int ldc);
348void shl_c908_gemm_8x24_fp32_v256(float *dst, const float *sa, const float *sb, float *bias, int m,
349 int k, int n, int ldc);
350void shl_c908_reorder_input_z48_fp16_v256(__fp16 *src, __fp16 *dst, int k, int n, int ldc);
351void shl_c908_gemm_8x48_fp16_v256(__fp16 *dst, const __fp16 *sa, const __fp16 *sb, __fp16 *bias,
352 int m, int k, int n, int ldc);
353#endif
354
355#ifdef SHL_USE_DOT_INT4
356int shl_c908_conv2d_init_int4(struct csinn_tensor *input, struct csinn_tensor *output,
357 struct csinn_tensor *kernel, struct csinn_tensor *bias,
358 struct csinn_conv2d_params *params);
359
360int shl_c908_depthwise_conv2d_init_int4(struct csinn_tensor *input, struct csinn_tensor *output,
361 struct csinn_tensor *kernel, struct csinn_tensor *bias,
362 struct csinn_conv2d_params *params);
363#endif
364
365struct shl_c908_option {
366 struct shl_rvv_option base;
367};
368
369int shl_c908_set_packn_layout(struct csinn_session *sess, bool packn_layout);
370struct shl_c908_option *shl_c908_get_graph_option(struct csinn_session *sess);
371
372#endif // INCLUDE_SHL_C908_H_
Definition: csinn_data_structure.h:553
Definition: csinn_data_structure.h:596
Definition: csinn_data_structure.h:605
Definition: csinn_data_structure.h:502
Definition: csinn_data_structure.h:475