SHL 2.2.x
Loading...
Searching...
No Matches
shl_gref.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_GREF_H_
22#define INCLUDE_SHL_GREF_H_
23#include "csi_nn.h"
24#include "shl_node.h"
25#include "shl_utils.h"
26
27int shl_gref_acos(struct csinn_tensor *input, struct csinn_tensor *output,
28 struct csinn_siso_params *params);
29int shl_gref_acos_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
30 struct csinn_siso_params *params);
31
32int shl_gref_acosh(struct csinn_tensor *input, struct csinn_tensor *output,
33 struct csinn_siso_params *params);
34int shl_gref_acosh_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
35 struct csinn_siso_params *params);
36
37int shl_gref_cos(struct csinn_tensor *input, struct csinn_tensor *output,
38 struct csinn_siso_params *params);
39int shl_gref_cos_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
40 struct csinn_siso_params *params);
41
42int shl_gref_cosh(struct csinn_tensor *input, struct csinn_tensor *output,
43 struct csinn_siso_params *params);
44int shl_gref_cosh_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
45 struct csinn_siso_params *params);
46
47int shl_gref_asin(struct csinn_tensor *input, struct csinn_tensor *output,
48 struct csinn_siso_params *params);
49int shl_gref_asin_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
50 struct csinn_siso_params *params);
51
52int shl_gref_asinh(struct csinn_tensor *input, struct csinn_tensor *output,
53 struct csinn_siso_params *params);
54int shl_gref_asinh_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
55 struct csinn_siso_params *params);
56
57int shl_gref_tan(struct csinn_tensor *input, struct csinn_tensor *output,
58 struct csinn_siso_params *params);
59int shl_gref_tan_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
60 struct csinn_siso_params *params);
61
62int shl_gref_atan(struct csinn_tensor *input, struct csinn_tensor *output,
63 struct csinn_siso_params *params);
64int shl_gref_atan_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
65 struct csinn_siso_params *params);
66
67int shl_gref_atanh(struct csinn_tensor *input, struct csinn_tensor *output,
68 struct csinn_siso_params *params);
69int shl_gref_atanh_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
70 struct csinn_siso_params *params);
71
72int shl_gref_threshold_relu(struct csinn_tensor *input, struct csinn_tensor *output,
73 struct csinn_relu_params *params);
74int shl_gref_threshold_relu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
75 struct csinn_relu_params *params);
76
77int shl_gref_trunc(struct csinn_tensor *input, struct csinn_tensor *output,
78 struct csinn_siso_params *params);
79int shl_gref_trunc_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
80 struct csinn_siso_params *params);
81
82int shl_gref_topk(struct csinn_tensor *input, struct csinn_tensor *output1,
83 struct csinn_tensor *output2, struct csinn_topk_params *params);
84int shl_gref_topk_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output1,
85 struct csinn_tensor *output2, struct csinn_topk_params *params);
86
87int shl_gref_cumprod(struct csinn_tensor *input, struct csinn_tensor *output,
88 struct csinn_cumprod_params *params);
89int shl_gref_cumprod_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
90 struct csinn_cumprod_params *params);
91
92int shl_gref_cumsum(struct csinn_tensor *input, struct csinn_tensor *output,
93 struct csinn_cumsum_params *params);
94int shl_gref_cumsum_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
95 struct csinn_cumsum_params *params);
96
97int shl_gref_conv1d(struct csinn_tensor *input, struct csinn_tensor *output,
98 struct csinn_tensor *kernel, struct csinn_tensor *bias,
99 struct csinn_conv1d_params *params);
100int shl_gref_conv1d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
101 struct csinn_tensor *kernel, struct csinn_tensor *bias,
102 struct csinn_conv1d_params *params);
103
104int shl_gref_depthwise_conv1d(struct csinn_tensor *input, struct csinn_tensor *output,
105 struct csinn_tensor *kernel, struct csinn_tensor *bias,
106 struct csinn_conv1d_params *params);
107int shl_gref_depthwise_conv1d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
108 struct csinn_tensor *kernel, struct csinn_tensor *bias,
109 struct csinn_conv1d_params *params);
110
111int shl_gref_conv2d(struct csinn_tensor *input, struct csinn_tensor *output,
112 struct csinn_tensor *kernel, struct csinn_tensor *bias,
113 struct csinn_conv2d_params *params);
114int shl_gref_conv2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
115 struct csinn_tensor *kernel, struct csinn_tensor *bias,
116 struct csinn_conv2d_params *params);
117
118int shl_gref_depthwise_conv2d(struct csinn_tensor *input, struct csinn_tensor *output,
119 struct csinn_tensor *kernel, struct csinn_tensor *bias,
120 struct csinn_conv2d_params *params);
121int shl_gref_depthwise_conv2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
122 struct csinn_tensor *kernel, struct csinn_tensor *bias,
123 struct csinn_conv2d_params *params);
124
125int shl_gref_group_conv2d(struct csinn_tensor *input, struct csinn_tensor *output,
126 struct csinn_tensor *kernel, struct csinn_tensor *bias,
127 struct csinn_conv2d_params *params);
128int shl_gref_group_conv2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
129 struct csinn_tensor *kernel, struct csinn_tensor *bias,
130 struct csinn_conv2d_params *params);
131
132int shl_gref_group_conv2d_relu(struct csinn_tensor *input, struct csinn_tensor *output,
133 struct csinn_tensor *kernel, struct csinn_tensor *bias,
134 struct csinn_conv2d_params *params);
135int shl_gref_group_conv2d_relu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
136 struct csinn_tensor *kernel, struct csinn_tensor *bias,
137 struct csinn_conv2d_params *params);
138
139int shl_gref_conv2d_relu(struct csinn_tensor *input, struct csinn_tensor *output,
140 struct csinn_tensor *kernel, struct csinn_tensor *bias,
141 struct csinn_conv2d_params *params);
142int shl_gref_conv2d_relu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
143 struct csinn_tensor *kernel, struct csinn_tensor *bias,
144 struct csinn_conv2d_params *params);
145
146int shl_gref_conv2d_relu6(struct csinn_tensor *input, struct csinn_tensor *output,
147 struct csinn_tensor *kernel, struct csinn_tensor *bias,
148 struct csinn_conv2d_params *params);
149int shl_gref_conv2d_relu6_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
150 struct csinn_tensor *kernel, struct csinn_tensor *bias,
151 struct csinn_conv2d_params *params);
152
153int shl_gref_conv3d(struct csinn_tensor *input, struct csinn_tensor *output,
154 struct csinn_tensor *kernel, struct csinn_tensor *bias,
155 struct csinn_conv3d_params *params);
156int shl_gref_conv3d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
157 struct csinn_tensor *kernel, struct csinn_tensor *bias,
158 struct csinn_conv3d_params *params);
159
160int shl_gref_deconv2d(struct csinn_tensor *input, struct csinn_tensor *output,
161 struct csinn_tensor *kernel, struct csinn_tensor *bias,
162 struct csinn_conv2d_params *params);
163int shl_gref_deconv2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
164 struct csinn_tensor *kernel, struct csinn_tensor *bias,
165 struct csinn_conv2d_params *params);
166
167int shl_gref_deconv3d(struct csinn_tensor *input, struct csinn_tensor *output,
168 struct csinn_tensor *kernel, struct csinn_tensor *bias,
169 struct csinn_conv3d_params *params);
170int shl_gref_deconv3d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
171 struct csinn_tensor *kernel, struct csinn_tensor *bias,
172 struct csinn_conv3d_params *params);
173
174int shl_gref_depthwise_deconv2d(struct csinn_tensor *input, struct csinn_tensor *output,
175 struct csinn_tensor *kernel, struct csinn_tensor *bias,
176 struct csinn_conv2d_params *params);
177int shl_gref_depthwise_deconv2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
178 struct csinn_tensor *kernel, struct csinn_tensor *bias,
179 struct csinn_conv2d_params *params);
180
181int shl_gref_depthwise_conv2d_relu(struct csinn_tensor *input, struct csinn_tensor *output,
182 struct csinn_tensor *kernel, struct csinn_tensor *bias,
183 struct csinn_conv2d_params *params);
184int shl_gref_depthwise_conv2d_relu_infer_shape(struct csinn_tensor *input,
185 struct csinn_tensor *output,
186 struct csinn_tensor *kernel,
187 struct csinn_tensor *bias,
188 struct csinn_conv2d_params *params);
189
190int shl_gref_depthwise_conv2d_relu6(struct csinn_tensor *input, struct csinn_tensor *output,
191 struct csinn_tensor *kernel, struct csinn_tensor *bias,
192 struct csinn_conv2d_params *params);
193int shl_gref_depthwise_conv2d_relu6_infer_shape(struct csinn_tensor *input,
194 struct csinn_tensor *output,
195 struct csinn_tensor *kernel,
196 struct csinn_tensor *bias,
197 struct csinn_conv2d_params *params);
198
199int shl_gref_fsmn(struct csinn_tensor *frame, struct csinn_tensor *l_filter,
200 struct csinn_tensor *r_filter, struct csinn_tensor *frame_sequence,
201 struct csinn_tensor *frame_counter, struct csinn_tensor *output,
202 struct csinn_fsmn_params *params);
203int shl_gref_fsmn_infer_shape(struct csinn_tensor *frame, struct csinn_tensor *l_filter,
204 struct csinn_tensor *r_filter, struct csinn_tensor *frame_sequence,
205 struct csinn_tensor *frame_counter, struct csinn_tensor *output,
206 struct csinn_fsmn_params *params);
207
208int shl_gref_fullyconnected(struct csinn_tensor *input, struct csinn_tensor *output,
209 struct csinn_tensor *weights, struct csinn_tensor *bias,
210 struct csinn_fc_params *params);
211int shl_gref_fullyconnected_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
212 struct csinn_tensor *weights, struct csinn_tensor *bias,
213 struct csinn_fc_params *params);
214
215int shl_gref_fullyconnected_relu(struct csinn_tensor *input, struct csinn_tensor *output,
216 struct csinn_tensor *weights, struct csinn_tensor *bias,
217 struct csinn_fc_params *params);
218int shl_gref_fullyconnected_relu_infer_shape(struct csinn_tensor *input,
219 struct csinn_tensor *output,
220 struct csinn_tensor *weights,
221 struct csinn_tensor *bias,
222 struct csinn_fc_params *params);
223
224int shl_gref_maxpool2d(struct csinn_tensor *input, struct csinn_tensor *output,
225 struct csinn_pool_params *params);
226int shl_gref_maxpool2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
227 struct csinn_pool_params *params);
228
229int shl_gref_maxpool3d(struct csinn_tensor *input, struct csinn_tensor *output,
230 struct csinn_pool_params *params);
231int shl_gref_maxpool3d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
232 struct csinn_pool_params *params);
233
234int shl_gref_avgpool2d(struct csinn_tensor *input, struct csinn_tensor *output,
235 struct csinn_pool_params *params);
236int shl_gref_avgpool2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
237 struct csinn_pool_params *params);
238
239int shl_gref_avgpool3d(struct csinn_tensor *input, struct csinn_tensor *output,
240 struct csinn_pool_params *params);
241int shl_gref_avgpool3d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
242 struct csinn_pool_params *params);
243
244int shl_gref_global_avgpool3d(struct csinn_tensor *input, struct csinn_tensor *output,
245 struct csinn_pool_params *params);
246int shl_gref_global_avgpool3d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
247 struct csinn_pool_params *params);
248
249int shl_gref_global_avgpool2d(struct csinn_tensor *input, struct csinn_tensor *output,
250 struct csinn_pool_params *params);
251int shl_gref_global_avgpool2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
252 struct csinn_pool_params *params);
253
254int shl_gref_global_maxpool2d(struct csinn_tensor *input, struct csinn_tensor *output,
255 struct csinn_pool_params *params);
256int shl_gref_global_maxpool2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
257 struct csinn_pool_params *params);
258
259int shl_gref_l2pool(struct csinn_tensor *input, struct csinn_tensor *output,
260 struct csinn_pool_params *params);
261int shl_gref_l2pool_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
262 struct csinn_pool_params *params);
263
264int shl_gref_pool_with_argmax(struct csinn_tensor *input, struct csinn_tensor *output,
265 struct csinn_pool_params *params);
266int shl_gref_pool_with_argmax_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
267 struct csinn_pool_params *params);
268
269int shl_gref_maxpool2d_locat(struct csinn_tensor *input, struct csinn_tensor *output,
270 struct csinn_pool_params *params);
271int shl_gref_maxpool2d_locat_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
272 struct csinn_pool_params *params);
273
274int shl_gref_mod(struct csinn_tensor *input0, struct csinn_tensor *input1,
275 struct csinn_tensor *output, struct csinn_diso_params *params);
276int shl_gref_mod_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
277 struct csinn_tensor *output, struct csinn_diso_params *params);
278
279int shl_gref_non_max_suppression(struct csinn_tensor *input0, struct csinn_tensor *input1,
280 struct csinn_tensor *output,
281 struct csinn_non_max_suppression_params *params);
282int shl_gref_non_max_suppression_infer_shape(struct csinn_tensor *input0,
283 struct csinn_tensor *input1,
284 struct csinn_tensor *output,
285 struct csinn_non_max_suppression_params *params);
286
287int shl_gref_unpooling(struct csinn_tensor *input, struct csinn_tensor *mask,
288 struct csinn_tensor *output, struct csinn_unpooling_params *params);
289int shl_gref_unpooling_infer_shape(struct csinn_tensor *input, struct csinn_tensor *mask,
290 struct csinn_tensor *output,
291 struct csinn_unpooling_params *params);
292
293int shl_gref_negative(struct csinn_tensor *input, struct csinn_tensor *output,
294 struct csinn_siso_params *params);
295int shl_gref_negative_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
296 struct csinn_siso_params *params);
297
298int shl_gref_floor(struct csinn_tensor *input, struct csinn_tensor *output,
299 struct csinn_siso_params *params);
300int shl_gref_floor_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
301 struct csinn_siso_params *params);
302
303int shl_gref_ceil(struct csinn_tensor *input, struct csinn_tensor *output,
304 struct csinn_siso_params *params);
305int shl_gref_ceil_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
306 struct csinn_siso_params *params);
307
308int shl_gref_clip(struct csinn_tensor *input, struct csinn_tensor *output,
309 struct csinn_siso_params *params);
310int shl_gref_clip_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
311 struct csinn_siso_params *params);
312
313int shl_gref_abs(struct csinn_tensor *input, struct csinn_tensor *output,
314 struct csinn_siso_params *params);
315int shl_gref_abs_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
316 struct csinn_siso_params *params);
317
318int shl_gref_exp(struct csinn_tensor *input, struct csinn_tensor *output,
319 struct csinn_siso_params *params);
320int shl_gref_exp_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
321 struct csinn_siso_params *params);
322
323int shl_gref_sin(struct csinn_tensor *input, struct csinn_tensor *output,
324 struct csinn_siso_params *params);
325int shl_gref_sin_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
326 struct csinn_siso_params *params);
327
328int shl_gref_sinh(struct csinn_tensor *input, struct csinn_tensor *output,
329 struct csinn_siso_params *params);
330int shl_gref_sinh_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
331 struct csinn_siso_params *params);
332
333int shl_gref_tanh(struct csinn_tensor *input, struct csinn_tensor *output,
334 struct csinn_siso_params *params);
335int shl_gref_tanh_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
336 struct csinn_siso_params *params);
337
338int shl_gref_sqrt(struct csinn_tensor *input, struct csinn_tensor *output,
339 struct csinn_siso_params *params);
340int shl_gref_sqrt_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
341 struct csinn_siso_params *params);
342
343int shl_gref_rsqrt(struct csinn_tensor *input, struct csinn_tensor *output,
344 struct csinn_siso_params *params);
345int shl_gref_rsqrt_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
346 struct csinn_siso_params *params);
347
348int shl_gref_square(struct csinn_tensor *input, struct csinn_tensor *output,
349 struct csinn_siso_params *params);
350int shl_gref_square_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
351 struct csinn_siso_params *params);
352
353int shl_gref_sigmoid(struct csinn_tensor *input, struct csinn_tensor *output,
354 struct csinn_sigmoid_params *params);
355int shl_gref_sigmoid_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
356 struct csinn_sigmoid_params *params);
357
358int shl_gref_softsign(struct csinn_tensor *input, struct csinn_tensor *output,
359 struct csinn_siso_params *params);
360int shl_gref_softsign_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
361 struct csinn_siso_params *params);
362
363int shl_gref_space_to_batch_nd(struct csinn_tensor *input, struct csinn_tensor *output,
364 struct csinn_space_to_batch_nd_params *params);
365int shl_gref_space_to_batch_nd_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
366 struct csinn_space_to_batch_nd_params *params);
367
368int shl_gref_elu(struct csinn_tensor *input, struct csinn_tensor *output,
369 struct csinn_relu_params *params);
370int shl_gref_elu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
371 struct csinn_relu_params *params);
372
373int shl_gref_relu(struct csinn_tensor *input, struct csinn_tensor *output,
374 struct csinn_relu_params *params);
375int shl_gref_relu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
376 struct csinn_relu_params *params);
377
378int shl_gref_relu1(struct csinn_tensor *input, struct csinn_tensor *output,
379 struct csinn_relu_params *params);
380int shl_gref_relu1_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
381 struct csinn_relu_params *params);
382
383int shl_gref_relu6(struct csinn_tensor *input, struct csinn_tensor *output,
384 struct csinn_relu_params *params);
385int shl_gref_relu6_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
386 struct csinn_relu_params *params);
387
388int shl_gref_relun(struct csinn_tensor *input, struct csinn_tensor *output,
389 struct csinn_relu_params *params);
390int shl_gref_relun_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
391 struct csinn_relu_params *params);
392
393int shl_gref_roi_align(struct csinn_tensor *data, struct csinn_tensor *rois,
394 struct csinn_tensor *output, struct csinn_roi_align_params *params);
395int shl_gref_roi_align_infer_shape(struct csinn_tensor *data, struct csinn_tensor *rois,
396 struct csinn_tensor *output,
397 struct csinn_roi_align_params *params);
398
399int shl_gref_roipool(struct csinn_tensor *data, struct csinn_tensor *rois,
400 struct csinn_tensor *output, struct csinn_roi_pool_params *params);
401int shl_gref_roipool_infer_shape(struct csinn_tensor *data, struct csinn_tensor *rois,
402 struct csinn_tensor *output, struct csinn_roi_pool_params *params);
403
404int shl_gref_round(struct csinn_tensor *input, struct csinn_tensor *output,
405 struct csinn_siso_params *params);
406int shl_gref_round_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
407 struct csinn_siso_params *params);
408
409int shl_gref_leaky_relu(struct csinn_tensor *input, struct csinn_tensor *output,
410 struct csinn_relu_params *params);
411int shl_gref_leaky_relu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
412 struct csinn_relu_params *params);
413
414int shl_gref_softrelu(struct csinn_tensor *input, struct csinn_tensor *output,
415 struct csinn_relu_params *params);
416int shl_gref_softrelu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
417 struct csinn_relu_params *params);
418
419int shl_gref_prelu(struct csinn_tensor *input, struct csinn_tensor *alpha,
420 struct csinn_tensor *output, struct csinn_prelu_params *params);
421int shl_gref_prelu_infer_shape(struct csinn_tensor *input, struct csinn_tensor *alpha,
422 struct csinn_tensor *output, struct csinn_prelu_params *params);
423
424int shl_gref_softplus(struct csinn_tensor *input, struct csinn_tensor *output,
425 struct csinn_siso_params *params);
426int shl_gref_softplus_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
427 struct csinn_siso_params *params);
428
429int shl_gref_softmax(struct csinn_tensor *input, struct csinn_tensor *output,
430 struct csinn_softmax_params *params);
431int shl_gref_softmax_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
432 struct csinn_softmax_params *params);
433
434int shl_gref_batch_normalization(struct csinn_tensor *input, struct csinn_tensor *mean,
435 struct csinn_tensor *variance, struct csinn_tensor *gamma,
436 struct csinn_tensor *beta, struct csinn_tensor *output,
437 struct csinn_bn_params *params);
438int shl_gref_batch_normalization_infer_shape(struct csinn_tensor *input, struct csinn_tensor *mean,
439 struct csinn_tensor *variance,
440 struct csinn_tensor *gamma, struct csinn_tensor *beta,
441 struct csinn_tensor *output,
442 struct csinn_bn_params *params);
443
444int shl_gref_l2_normalization(struct csinn_tensor *input, struct csinn_tensor *output,
445 struct csinn_l2n_params *params);
446int shl_gref_l2_normalization_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
447 struct csinn_l2n_params *params);
448
449int shl_gref_lrn(struct csinn_tensor *input, struct csinn_tensor *output,
450 struct csinn_lrn_params *params);
451int shl_gref_lrn_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
452 struct csinn_lrn_params *params);
453
454int shl_gref_matmul(struct csinn_tensor *mat0, struct csinn_tensor *mat1,
455 struct csinn_tensor *output, struct csinn_matmul_params *params);
456int shl_gref_matmul_infer_shape(struct csinn_tensor *mat0, struct csinn_tensor *mat1,
457 struct csinn_tensor *output, struct csinn_matmul_params *params);
458
459int shl_gref_add(struct csinn_tensor *input0, struct csinn_tensor *input1,
460 struct csinn_tensor *output, struct csinn_diso_params *params);
461int shl_gref_add_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
462 struct csinn_tensor *output, struct csinn_diso_params *params);
463
464int shl_gref_sub(struct csinn_tensor *input0, struct csinn_tensor *input1,
465 struct csinn_tensor *output, struct csinn_diso_params *params);
466int shl_gref_sub_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
467 struct csinn_tensor *output, struct csinn_diso_params *params);
468
469int shl_gref_mul(struct csinn_tensor *input0, struct csinn_tensor *input1,
470 struct csinn_tensor *output, struct csinn_diso_params *params);
471int shl_gref_mul_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
472 struct csinn_tensor *output, struct csinn_diso_params *params);
473
474int shl_gref_div(struct csinn_tensor *input0, struct csinn_tensor *input1,
475 struct csinn_tensor *output, struct csinn_diso_params *params);
476int shl_gref_div_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
477 struct csinn_tensor *output, struct csinn_diso_params *params);
478
479int shl_gref_floor_divide(struct csinn_tensor *input0, struct csinn_tensor *input1,
480 struct csinn_tensor *output, struct csinn_diso_params *params);
481int shl_gref_floor_divide_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
482 struct csinn_tensor *output,
483 struct csinn_diso_params *params);
484
485int shl_gref_floor_mod(struct csinn_tensor *input0, struct csinn_tensor *input1,
486 struct csinn_tensor *output, struct csinn_diso_params *params);
487int shl_gref_floor_mod_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
488 struct csinn_tensor *output, struct csinn_diso_params *params);
489
490int shl_gref_maximum(struct csinn_tensor *input0, struct csinn_tensor *input1,
491 struct csinn_tensor *output, struct csinn_diso_params *params);
492int shl_gref_maximum_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
493 struct csinn_tensor *output, struct csinn_diso_params *params);
494
495int shl_gref_minimum(struct csinn_tensor *input0, struct csinn_tensor *input1,
496 struct csinn_tensor *output, struct csinn_diso_params *params);
497int shl_gref_minimum_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
498 struct csinn_tensor *output, struct csinn_diso_params *params);
499
500int shl_gref_power(struct csinn_tensor *input0, struct csinn_tensor *input1,
501 struct csinn_tensor *output, struct csinn_diso_params *params);
502int shl_gref_power_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
503 struct csinn_tensor *output, struct csinn_diso_params *params);
504
505int shl_gref_greater(struct csinn_tensor *input0, struct csinn_tensor *input1,
506 struct csinn_tensor *output, struct csinn_diso_params *params);
507int shl_gref_greater_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
508 struct csinn_tensor *output, struct csinn_diso_params *params);
509
510int shl_gref_less(struct csinn_tensor *input0, struct csinn_tensor *input1,
511 struct csinn_tensor *output, struct csinn_diso_params *params);
512int shl_gref_less_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
513 struct csinn_tensor *output, struct csinn_diso_params *params);
514
515int shl_gref_log_softmax(struct csinn_tensor *input, struct csinn_tensor *output,
516 struct csinn_softmax_params *params);
517int shl_gref_log_softmax_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
518 struct csinn_softmax_params *params);
519
520int shl_gref_log(struct csinn_tensor *input, struct csinn_tensor *output,
521 struct csinn_siso_params *params);
522int shl_gref_log_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
523 struct csinn_siso_params *params);
524
525int shl_gref_log1p(struct csinn_tensor *input, struct csinn_tensor *output,
526 struct csinn_siso_params *params);
527int shl_gref_log1p_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
528 struct csinn_siso_params *params);
529
530int shl_gref_equal(struct csinn_tensor *input0, struct csinn_tensor *input1,
531 struct csinn_tensor *output, struct csinn_diso_params *params);
532int shl_gref_equal_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
533 struct csinn_tensor *output, struct csinn_diso_params *params);
534
535int shl_gref_not_equal(struct csinn_tensor *input0, struct csinn_tensor *input1,
536 struct csinn_tensor *output, struct csinn_diso_params *params);
537int shl_gref_not_equal_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
538 struct csinn_tensor *output, struct csinn_diso_params *params);
539
540int shl_gref_not(struct csinn_tensor *input, struct csinn_tensor *output,
541 struct csinn_siso_params *params);
542int shl_gref_not_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
543 struct csinn_siso_params *params);
544
545int shl_gref_reduce_logsumexp(struct csinn_tensor *input, struct csinn_tensor *output,
546 struct csinn_reduce_params *params);
547int shl_gref_reduce_logsumexp_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
548 struct csinn_reduce_params *params);
549
550int shl_gref_reduce_max(struct csinn_tensor *input, struct csinn_tensor *output,
551 struct csinn_reduce_params *params);
552int shl_gref_reduce_max_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
553 struct csinn_reduce_params *params);
554
555int shl_gref_reduce_mean(struct csinn_tensor *input, struct csinn_tensor *output,
556 struct csinn_reduce_params *params);
557int shl_gref_reduce_mean_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
558 struct csinn_reduce_params *params);
559
560int shl_gref_reduce_min(struct csinn_tensor *input, struct csinn_tensor *output,
561 struct csinn_reduce_params *params);
562int shl_gref_reduce_min_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
563 struct csinn_reduce_params *params);
564
565int shl_gref_reduce_prod(struct csinn_tensor *input, struct csinn_tensor *output,
566 struct csinn_reduce_params *params);
567int shl_gref_reduce_prod_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
568 struct csinn_reduce_params *params);
569
570int shl_gref_reduce_sum(struct csinn_tensor *input, struct csinn_tensor *output,
571 struct csinn_reduce_params *params);
572int shl_gref_reduce_sum_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
573 struct csinn_reduce_params *params);
574
575int shl_gref_greater_equal(struct csinn_tensor *input0, struct csinn_tensor *input1,
576 struct csinn_tensor *output, struct csinn_diso_params *params);
577int shl_gref_greater_equal_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
578 struct csinn_tensor *output,
579 struct csinn_diso_params *params);
580
581int shl_gref_less_equal(struct csinn_tensor *input0, struct csinn_tensor *input1,
582 struct csinn_tensor *output, struct csinn_diso_params *params);
583int shl_gref_less_equal_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
584 struct csinn_tensor *output, struct csinn_diso_params *params);
585
586int shl_gref_select(struct csinn_tensor *condition, struct csinn_tensor *input0,
587 struct csinn_tensor *input1, struct csinn_tensor *output,
588 struct csinn_select_params *params);
589int shl_gref_select_infer_shape(struct csinn_tensor *condition, struct csinn_tensor *input0,
590 struct csinn_tensor *input1, struct csinn_tensor *output,
591 struct csinn_select_params *params);
592
593int shl_gref_and(struct csinn_tensor *input0, struct csinn_tensor *input1,
594 struct csinn_tensor *output, struct csinn_diso_params *params);
595int shl_gref_and_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
596 struct csinn_tensor *output, struct csinn_diso_params *params);
597
598int shl_gref_or(struct csinn_tensor *input0, struct csinn_tensor *input1,
599 struct csinn_tensor *output, struct csinn_diso_params *params);
600int shl_gref_or_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
601 struct csinn_tensor *output, struct csinn_diso_params *params);
602
603int shl_gref_pad(struct csinn_tensor *input, struct csinn_tensor *output,
604 struct csinn_pad_params *params);
605int shl_gref_pad_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
606 struct csinn_pad_params *params);
607
608int shl_gref_resize(struct csinn_tensor *input, struct csinn_tensor *output,
609 struct csinn_resize_params *params);
610int shl_gref_resize_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
611 struct csinn_resize_params *params);
612
613int shl_gref_concat(struct csinn_tensor **input, struct csinn_tensor *output,
614 struct csinn_concat_params *params);
615int shl_gref_concat_infer_shape(struct csinn_tensor **input, struct csinn_tensor *output,
616 struct csinn_concat_params *params);
617
618int shl_gref_proposal(struct csinn_tensor *cls_prob, struct csinn_tensor *bbox_pred,
619 struct csinn_tensor *im_info, struct csinn_tensor *output,
620 struct csinn_proposal_params *params);
621int shl_gref_proposal_infer_shape(struct csinn_tensor *cls_prob, struct csinn_tensor *bbox_pred,
622 struct csinn_tensor *im_info, struct csinn_tensor *output,
623 struct csinn_proposal_params *params);
624
625int shl_gref_psroipooling(struct csinn_tensor *data, struct csinn_tensor *rois,
626 struct csinn_tensor *output, struct csinn_psroipooling_params *params);
627int shl_gref_psroipooling_infer_shape(struct csinn_tensor *data, struct csinn_tensor *rois,
628 struct csinn_tensor *output,
629 struct csinn_psroipooling_params *params);
630
631int shl_gref_transpose(struct csinn_tensor *input, struct csinn_tensor *output,
632 struct csinn_transpose_params *params);
633int shl_gref_transpose_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
634 struct csinn_transpose_params *params);
635
636int shl_gref_reshape(struct csinn_tensor *input, struct csinn_tensor *output,
637 struct csinn_reshape_params *params);
638int shl_gref_reshape_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
639 struct csinn_reshape_params *params);
640
641int shl_gref_shape(struct csinn_tensor *input, struct csinn_tensor *output,
642 struct csinn_shape_params *params);
643int shl_gref_shape_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
644 struct csinn_shape_params *params);
645
646int shl_gref_strided_slice(struct csinn_tensor *input, struct csinn_tensor *output,
647 struct csinn_strided_slice_params *params);
648int shl_gref_strided_slice_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
649 struct csinn_strided_slice_params *params);
650
651int shl_gref_expand_dims(struct csinn_tensor *input, struct csinn_tensor *output,
652 struct csinn_expand_dims_params *params);
653int shl_gref_expand_dims_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
654 struct csinn_expand_dims_params *params);
655
656int shl_gref_expm1(struct csinn_tensor *input, struct csinn_tensor *output,
657 struct csinn_siso_params *params);
658int shl_gref_expm1_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
659 struct csinn_siso_params *params);
660
661int shl_gref_reverse(struct csinn_tensor *input, struct csinn_tensor *output,
662 struct csinn_reverse_params *params);
663int shl_gref_reverse_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
664 struct csinn_reverse_params *params);
665
666int shl_gref_flatten(struct csinn_tensor *input, struct csinn_tensor *output,
667 struct csinn_flatten_params *params);
668int shl_gref_flatten_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
669 struct csinn_flatten_params *params);
670
671int shl_gref_crop(struct csinn_tensor *input, struct csinn_tensor *output,
672 struct csinn_crop_params *params);
673int shl_gref_crop_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
674 struct csinn_crop_params *params);
675
676int shl_gref_slice(struct csinn_tensor *input, struct csinn_tensor *output,
677 struct csinn_slice_params *params);
678int shl_gref_slice_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
679 struct csinn_slice_params *params);
680
681int shl_gref_split(struct csinn_tensor *input, struct csinn_tensor **output,
682 struct csinn_split_params *params);
683int shl_gref_split_infer_shape(struct csinn_tensor *input, struct csinn_tensor **output,
684 struct csinn_split_params *params);
685
686int shl_gref_stack(struct csinn_tensor **input, struct csinn_tensor *output,
687 struct csinn_stack_params *params);
688int shl_gref_stack_infer_shape(struct csinn_tensor **input, struct csinn_tensor *output,
689 struct csinn_stack_params *params);
690
691int shl_gref_tile(struct csinn_tensor *input, struct csinn_tensor *output,
692 struct csinn_tile_params *params);
693int shl_gref_tile_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
694 struct csinn_tile_params *params);
695
696int shl_gref_arange(struct csinn_tensor *output, struct csinn_arange_params *params);
697int shl_gref_arange_infer_shape(struct csinn_tensor *output, struct csinn_arange_params *params);
698
699int shl_gref_where(struct csinn_tensor *condition, struct csinn_tensor *x, struct csinn_tensor *y,
700 struct csinn_tensor *output, struct csinn_where_params *params);
701int shl_gref_where_infer_shape(struct csinn_tensor *condition, struct csinn_tensor *x,
702 struct csinn_tensor *y, struct csinn_tensor *output,
703 struct csinn_where_params *params);
704
705int shl_gref_where_softmax(struct csinn_tensor *condition, struct csinn_tensor *y,
706 struct csinn_tensor *output, struct csinn_where_softmax_params *params);
707int shl_gref_where_softmax_infer_shape(struct csinn_tensor *condition, struct csinn_tensor *y,
708 struct csinn_tensor *output,
709 struct csinn_where_softmax_params *params);
710
711int shl_gref_unstack(struct csinn_tensor *input, struct csinn_tensor **output,
712 struct csinn_unstack_params *params);
713int shl_gref_unstack_infer_shape(struct csinn_tensor *input, struct csinn_tensor **output,
714 struct csinn_unstack_params *params);
715
716int shl_gref_gather(struct csinn_tensor *input, struct csinn_tensor *indices,
717 struct csinn_tensor *output, struct csinn_gather_params *params);
718int shl_gref_gather_infer_shape(struct csinn_tensor *input, struct csinn_tensor *indices,
719 struct csinn_tensor *output, struct csinn_gather_params *params);
720
721int shl_gref_gather_nd(struct csinn_tensor *input, struct csinn_tensor *indices,
722 struct csinn_tensor *output, struct csinn_gather_nd_params *params);
723int shl_gref_gather_nd_infer_shape(struct csinn_tensor *input, struct csinn_tensor *indices,
724 struct csinn_tensor *output,
725 struct csinn_gather_nd_params *params);
726
727int shl_gref_hard_sigmoid(struct csinn_tensor *input, struct csinn_tensor *output,
728 struct csinn_sigmoid_params *params);
729int shl_gref_hard_sigmoid_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
730 struct csinn_sigmoid_params *params);
731
732int shl_gref_isnan_bool(struct csinn_tensor *input, struct csinn_tensor *output,
733 struct csinn_siso_params *params);
734int shl_gref_isnan_bool_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
735 struct csinn_siso_params *params);
736
737int shl_gref_logical_and(struct csinn_tensor *input0, struct csinn_tensor *input1,
738 struct csinn_tensor *output, struct csinn_diso_params *params);
739int shl_gref_logical_and_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
740 struct csinn_tensor *output, struct csinn_diso_params *params);
741
742int shl_gref_logical_not(struct csinn_tensor *input, struct csinn_tensor *output,
743 struct csinn_siso_params *params);
744int shl_gref_logical_not_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
745 struct csinn_siso_params *params);
746
747int shl_gref_logical_or(struct csinn_tensor *input0, struct csinn_tensor *input1,
748 struct csinn_tensor *output, struct csinn_diso_params *params);
749int shl_gref_logical_or_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
750 struct csinn_tensor *output, struct csinn_diso_params *params);
751
752int shl_gref_logical_xor(struct csinn_tensor *input0, struct csinn_tensor *input1,
753 struct csinn_tensor *output, struct csinn_diso_params *params);
754int shl_gref_logical_xor_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
755 struct csinn_tensor *output, struct csinn_diso_params *params);
756
757int shl_gref_squeeze(struct csinn_tensor *input, struct csinn_tensor *output,
758 struct csinn_squeeze_params *params);
759int shl_gref_squeeze_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
760 struct csinn_squeeze_params *params);
761
762int shl_gref_segment_max(struct csinn_tensor *input0, struct csinn_tensor *input1,
763 struct csinn_tensor *output, struct csinn_segment_params *params);
764int shl_gref_segment_max_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
765 struct csinn_tensor *output,
766 struct csinn_segment_params *params);
767
768int shl_gref_segment_mean(struct csinn_tensor *input0, struct csinn_tensor *input1,
769 struct csinn_tensor *output, struct csinn_segment_params *params);
770int shl_gref_segment_mean_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
771 struct csinn_tensor *output,
772 struct csinn_segment_params *params);
773
774int shl_gref_segment_min(struct csinn_tensor *input0, struct csinn_tensor *input1,
775 struct csinn_tensor *output, struct csinn_segment_params *params);
776int shl_gref_segment_min_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
777 struct csinn_tensor *output,
778 struct csinn_segment_params *params);
779
780int shl_gref_segment_prod(struct csinn_tensor *input0, struct csinn_tensor *input1,
781 struct csinn_tensor *output, struct csinn_segment_params *params);
782int shl_gref_segment_prod_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
783 struct csinn_tensor *output,
784 struct csinn_segment_params *params);
785
786int shl_gref_segment_sum(struct csinn_tensor *input0, struct csinn_tensor *input1,
787 struct csinn_tensor *output, struct csinn_segment_params *params);
788int shl_gref_segment_sum_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
789 struct csinn_tensor *output,
790 struct csinn_segment_params *params);
791
792int shl_gref_scatter_nd(struct csinn_tensor *input, struct csinn_tensor *indices,
793 struct csinn_tensor *updates, struct csinn_tensor *output,
794 struct csinn_scatter_nd_params *params);
795int shl_gref_scatter_nd_infer_shape(struct csinn_tensor *input, struct csinn_tensor *indices,
796 struct csinn_tensor *updates, struct csinn_tensor *output,
797 struct csinn_scatter_nd_params *params);
798
799int shl_gref_shuffle_channel(struct csinn_tensor *input, struct csinn_tensor *output,
800 struct csinn_shuffle_channel_params *params);
801int shl_gref_shuffle_channel_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
802 struct csinn_shuffle_channel_params *params);
803
804int shl_gref_sign(struct csinn_tensor *input, struct csinn_tensor *output,
805 struct csinn_siso_params *params);
806int shl_gref_sign_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
807 struct csinn_siso_params *params);
808
809int shl_gref_ndarray_size(struct csinn_tensor *input, struct csinn_tensor *output,
810 struct csinn_ndarray_size_params *params);
811int shl_gref_ndarray_size_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
812 struct csinn_ndarray_size_params *params);
813
814int shl_gref_space_to_batch(struct csinn_tensor *input, struct csinn_tensor *output,
815 struct csinn_space_to_batch_params *params);
816int shl_gref_space_to_batch_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
817 struct csinn_space_to_batch_params *params);
818
819int shl_gref_batch_to_space(struct csinn_tensor *input, struct csinn_tensor *output,
820 struct csinn_batch_to_space_params *params);
821int shl_gref_batch_to_space_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
822 struct csinn_batch_to_space_params *params);
823
824int shl_gref_batch_to_space_nd(struct csinn_tensor *input, struct csinn_tensor *output,
825 struct csinn_batch_to_space_nd_params *params);
826int shl_gref_batch_to_space_nd_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
827 struct csinn_batch_to_space_nd_params *params);
828
829int shl_gref_space_to_depth(struct csinn_tensor *input, struct csinn_tensor *output,
830 struct csinn_space_to_depth_params *params);
831int shl_gref_space_to_depth_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
832 struct csinn_space_to_depth_params *params);
833
834int shl_gref_depth_to_space(struct csinn_tensor *input, struct csinn_tensor *output,
835 struct csinn_depth_to_space_params *params);
836int shl_gref_depth_to_space_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
837 struct csinn_depth_to_space_params *params);
838
839int shl_gref_broadcast_to(struct csinn_tensor *input, struct csinn_tensor *output,
840 struct csinn_broadcast_to_params *params);
841int shl_gref_broadcast_to_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
842 struct csinn_broadcast_to_params *params);
843
844int shl_gref_one_hot(struct csinn_tensor *input, struct csinn_tensor *output,
845 struct csinn_one_hot_params *params);
846int shl_gref_one_hot_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
847 struct csinn_one_hot_params *params);
848
849int shl_gref_sequence_mask(struct csinn_tensor *input0, struct csinn_tensor *input1,
850 struct csinn_tensor *output, struct csinn_sequence_mask_params *params);
851int shl_gref_sequence_mask_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
852 struct csinn_tensor *output,
853 struct csinn_sequence_mask_params *params);
854
855int shl_gref_im2col(struct csinn_tensor *input, struct csinn_tensor *output,
856 struct csinn_im2col_params *params);
857int shl_gref_im2col_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
858 struct csinn_im2col_params *params);
859
860int shl_gref_col2im(struct csinn_tensor *input, struct csinn_tensor *output,
861 struct csinn_tensor *kernel, struct csinn_col2im_params *params);
862int shl_gref_col2im_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
863 struct csinn_tensor *kernel, struct csinn_col2im_params *params);
864
865int shl_gref_sum(struct csinn_tensor *input, struct csinn_tensor *output,
866 struct csinn_reduce_params *params);
867int shl_gref_sum_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
868 struct csinn_reduce_params *params);
869
870int shl_gref_mean(struct csinn_tensor *input, struct csinn_tensor *output,
871 struct csinn_reduce_params *params);
872int shl_gref_mean_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
873 struct csinn_reduce_params *params);
874
875int shl_gref_max(struct csinn_tensor *input, struct csinn_tensor *output,
876 struct csinn_reduce_params *params);
877int shl_gref_max_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
878 struct csinn_reduce_params *params);
879
880int shl_gref_min(struct csinn_tensor *input, struct csinn_tensor *output,
881 struct csinn_reduce_params *params);
882int shl_gref_min_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
883 struct csinn_reduce_params *params);
884
885int shl_gref_prod(struct csinn_tensor *input, struct csinn_tensor *output,
886 struct csinn_reduce_params *params);
887int shl_gref_prod_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
888 struct csinn_reduce_params *params);
889
890int shl_gref_argmin(struct csinn_tensor *input, struct csinn_tensor *output,
891 struct csinn_reduce_params *params);
892int shl_gref_argmin_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
893 struct csinn_reduce_params *params);
894
895int shl_gref_argmax(struct csinn_tensor *input, struct csinn_tensor *output,
896 struct csinn_reduce_params *params);
897int shl_gref_argmax_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
898 struct csinn_reduce_params *params);
899
900int shl_gref_all(struct csinn_tensor *input, struct csinn_tensor *output,
901 struct csinn_reduce_params *params);
902int shl_gref_all_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
903 struct csinn_reduce_params *params);
904
905int shl_gref_any(struct csinn_tensor *input, struct csinn_tensor *output,
906 struct csinn_reduce_params *params);
907int shl_gref_any_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
908 struct csinn_reduce_params *params);
909
910int shl_gref_reorg(struct csinn_tensor *input, struct csinn_tensor *output,
911 struct csinn_reorg_params *params);
912int shl_gref_reorg_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
913 struct csinn_reorg_params *params);
914
915int shl_gref_erf(struct csinn_tensor *input, struct csinn_tensor *output,
916 struct csinn_siso_params *params);
917int shl_gref_erf_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
918 struct csinn_siso_params *params);
919
920int shl_gref_xor(struct csinn_tensor *input0, struct csinn_tensor *input1,
921 struct csinn_tensor *output, struct csinn_diso_params *params);
922int shl_gref_xor_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
923 struct csinn_tensor *output, struct csinn_diso_params *params);
924
925int shl_gref_yuv_rgb_scale(struct csinn_tensor *input, struct csinn_tensor *output,
926 struct csinn_siso_params *params);
927int shl_gref_yuv_rgb_scale_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
928 struct csinn_siso_params *params);
929
930int shl_gref_layer_norm(struct csinn_tensor *input, struct csinn_tensor *output,
931 struct csinn_tensor *gamma, struct csinn_tensor *beta,
932 struct csinn_layer_norm_params *params);
933int shl_gref_layer_norm_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
934 struct csinn_tensor *gamma, struct csinn_tensor *beta,
935 struct csinn_layer_norm_params *params);
936
937int shl_gref_cache_matmul(struct csinn_tensor *input, struct csinn_tensor *output,
938 struct csinn_tensor *weight, struct csinn_tensor *bias,
939 struct csinn_cache_matmul_params *params);
940int shl_gref_cache_matmul_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
941 struct csinn_tensor *weight, struct csinn_tensor *bias,
942 struct csinn_cache_matmul_params *params);
943
944int shl_gref_cache_conv1d(struct csinn_tensor *input, struct csinn_tensor *output,
945 struct csinn_tensor *weight, struct csinn_tensor *bias,
946 struct csinn_cache_conv1d_params *params);
947int shl_gref_cache_conv1d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
948 struct csinn_tensor *weight, struct csinn_tensor *bias,
949 struct csinn_cache_conv1d_params *params);
950
951int shl_gref_data_convert(struct csinn_tensor *input, struct csinn_tensor *output,
952 struct csinn_siso_params *params);
953int shl_gref_data_convert_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
954 struct csinn_siso_params *params);
955
956int shl_gref_cast(struct csinn_tensor *input, struct csinn_tensor *output,
957 struct csinn_cast_params *params);
958int shl_gref_cast_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
959 struct csinn_cast_params *params);
960
961struct shl_ref_graph *shl_subgraph_establish(struct shl_ref_graph *ograph);
962struct shl_ref_graph *shl_gref_get_graph(struct csinn_session *sess);
963int shl_gref_graph_insert(struct shl_node *node, struct shl_ref_graph *graph);
964void shl_gref_post_dfs(struct shl_ref_graph *graph,
965 void (*fvisit)(struct shl_ref_graph *, struct shl_node *));
966int shl_gref_is_root_node(struct shl_ref_graph *graph, struct shl_node *node);
967struct shl_node *shl_gref_get_input_subgraph(struct shl_ref_graph *graph, struct shl_node *node,
968 int index);
969void shl_gref_reset_graph_visit(struct shl_ref_graph *graph);
970void shl_gref_update_input_output(struct shl_ref_graph *graph, int index);
971int shl_gref_siso_op(struct csinn_tensor *input, struct csinn_tensor *output, int op, void *params);
972int shl_gref_diso_op(struct csinn_tensor *input0, struct csinn_tensor *input1,
973 struct csinn_tensor *output, int op, void *params);
974int shl_gref_sidcso_op(struct csinn_tensor *input, struct csinn_tensor *output,
975 struct csinn_tensor *const0, struct csinn_tensor *const1, int op,
976 void *params);
977void shl_gref_set_tensor(struct csinn_tensor *tensor, struct csinn_session *sess);
978void shl_gref_set_const_tensor(struct csinn_tensor *tensor, struct csinn_session *sess);
979int shl_gref_get_tensor(int index, struct csinn_tensor *ret, struct csinn_session *sess);
980void shl_gref_nbg(struct csinn_tensor **input, struct csinn_tensor **output, uint32_t inputs_count,
981 uint32_t outputs_count, const char *url);
982
983void shl_subgraph_alloc(struct shl_node *node, struct shl_ref_graph *ograph,
984 struct shl_ref_graph *ggraph);
985int shl_subgraph_setup(struct shl_node *n);
986int shl_subgraph_deinit(struct shl_node *n);
987int shl_subgraph_run_init(struct shl_node *n);
988int shl_subgraph_run(struct shl_node *n);
989int shl_subgraph_run_deinit(struct shl_node *n, struct shl_ref_graph *graph);
990
991struct shl_ref_graph *shl_subgraph_generate(struct shl_ref_graph *ograph);
992struct shl_ref_graph *shl_subgraph_rebuild(struct shl_ref_graph *subgraph);
993struct shl_ref_graph *shl_subgraph_topology_sort(struct shl_ref_graph *graph);
994void shl_subgraph_fvisit_fuse(struct shl_ref_graph *graph, struct shl_node *node);
995void shl_subgraph_fvisit_print(struct shl_ref_graph *graph, struct shl_node *node);
996int shl_subgraph_get_device(struct shl_node *node);
997void *shl_gref_runtime_callback(int api);
998
999int shl_gref_siso_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
1000 void *params);
1001int shl_gref_diso_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
1002 struct csinn_tensor *output, void *params);
1003int shl_gref_pooling2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
1004 struct csinn_pool_params *params);
1005int shl_gref_pooling3d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
1006 struct csinn_pool_params *params);
1007int shl_gref_global_pooling2d_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
1008 struct csinn_pool_params *params);
1009int shl_gref_reduce_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
1010 struct csinn_reduce_params *params);
1011int shl_gref_segment_infer_shape(struct csinn_tensor *input0, struct csinn_tensor *input1,
1012 struct csinn_tensor *output, struct csinn_segment_params *params);
1013int shl_gref_stride_infer_shape(struct csinn_tensor *input, struct csinn_tensor *output,
1014 struct csinn_reduce_params *params);
1015
1016int shl_gref_call_layer_func(void *fn, struct shl_node *node);
1017struct csinn_callback *shl_gref_best_callback(struct shl_node *node);
1018int shl_gref_size_align(int orig, int align);
1019#endif // INCLUDE_SHL_GREF_H_
Definition: csinn_data_structure.h:893
Definition: csinn_data_structure.h:969
Definition: csinn_data_structure.h:959
Definition: csinn_data_structure.h:705
Definition: csinn_data_structure.h:1074
Definition: csinn_data_structure.h:524
Definition: csinn_data_structure.h:1117
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:854
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:1033
Definition: csinn_data_structure.h:676
Definition: csinn_data_structure.h:1047
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:1002
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:951
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
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