legacy_ops.yaml 67.9 KB
Newer Older
1
# The apis in this file are unstandardized that may caused by a variety of reasons,
C
Chen Weihang 已提交
2
# we are trying to fix these apis and will move standardized apis into ops.yaml.
3

4
- op : abs
Z
zyfncg 已提交
5 6 7 8 9 10 11 12
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : RealAndImagInferMeta
  kernel :
    func : abs
  backward : abs_grad

13
- op : accuracy
Z
zyfncg 已提交
14 15 16 17 18 19 20 21
  args : (Tensor x, Tensor indices, Tensor label)
  output : Tensor(accuracy), Tensor(correct), Tensor(total)
  infer_meta :
    func : AccuracyInferMeta
  kernel :
    func : accuracy
    dtype : x

22
- op : adadelta_
Z
zyfncg 已提交
23 24 25 26 27 28
  args : (Tensor param, Tensor grad, Tensor avg_squared_grad, Tensor avg_squared_update, float rho, float epsilon)
  output : Tensor(param_out), Tensor(moment_out), Tensor(inf_norm_out)
  infer_meta :
    func : AdadeltaInferMeta
  kernel :
    func : adadelta
29
  inplace : (param -> param_out), (avg_squared_grad -> moment_out), (avg_squared_update -> inf_norm_out)
Z
zyfncg 已提交
30

31
- op : adagrad_
C
caozhou 已提交
32 33 34 35 36 37 38 39 40 41
  args : (Tensor param, Tensor grad, Tensor moment, Tensor learning_rate, float epsilon)
  output : Tensor(param_out), Tensor(moment_out)
  infer_meta :
    func : AdagradInferMeta
  kernel :
    func : adagrad {dense, dense, dense, dense -> dense, dense}
           adagrad_dense_param_sparse_grad {dense, selected_rows, dense, dense -> dense, dense}
    data_type : param
  inplace : (param -> param_out), (moment -> moment_out)

42
- op : adam_
Z
zyfncg 已提交
43 44
  args : (Tensor param, Tensor grad, Tensor learning_rate, Tensor moment1, Tensor moment2, Tensor beta1_pow, Tensor beta2_pow, Tensor master_param, Tensor skip_update, Scalar beta1, Scalar beta2, Scalar epsilon, bool lazy_mode, int64_t min_row_size_to_use_multithread, bool multi_precision, bool use_global_beta_pow)
  output : Tensor(param_out), Tensor(moment1_out), Tensor(moment2_out), Tensor(beta1_pow_out), Tensor(beta2_pow_out), Tensor(master_param_outs)
45 46 47 48 49 50
  infer_meta :
    func : AdamInferMeta
  kernel :
    func : adam {dense, dense, dense, dense, dense, dense, dense, dense, dense -> dense, dense, dense, dense, dense, dense},
           adam_dense_param_sparse_grad {dense, selected_rows, dense, dense, dense, dense, dense, dense, dense -> dense, dense, dense, dense, dense, dense}
    data_type : param
Z
zyfncg 已提交
51
  optional : master_param, skip_update
52
  inplace : (param -> param_out), (moment1 -> moment1_out), (moment2 -> moment2_out), (beta1_pow -> beta1_pow_out), (beta2_pow -> beta2_pow_out), (master_param -> master_param_outs)
Z
zyfncg 已提交
53

54
- op : adamax_
Z
zyfncg 已提交
55 56 57 58 59 60
  args : (Tensor param, Tensor grad, Tensor learning_rate, Tensor moment, Tensor inf_norm, Tensor beta1_pow, float beta1, float beta2, float epsilon)
  output : Tensor(param_out), Tensor(avg_squared_grad_out), Tensor(avg_squared_update_out)
  infer_meta :
    func : AdamaxInferMeta
  kernel :
    func : adamax
61
  inplace : (param -> param_out), (moment -> avg_squared_grad_out), (inf_norm -> avg_squared_update_out)
Z
zyfncg 已提交
62

63
- op : adamw_
Z
zyfncg 已提交
64 65
  args : (Tensor param, Tensor grad, Tensor learning_rate, Tensor moment1, Tensor moment2, Tensor beta1_pow, Tensor beta2_pow, Tensor master_param, Tensor skip_update, Scalar beta1, Scalar beta2, Scalar epsilon, float lr_ratio, float coeff, bool with_decay, bool lazy_mode, int64_t min_row_size_to_use_multithread, bool multi_precision, bool use_global_beta_pow)
  output : Tensor(param_out), Tensor(moment1_out), Tensor(moment2_out), Tensor(beta1_pow_out), Tensor(beta2_pow_out), Tensor(master_param_outs)
C
Charles-hit 已提交
66 67 68 69 70
  infer_meta :
    func : AdamwInferMeta
  kernel :
    func : adamw
    data_type : param
Z
zyfncg 已提交
71
  optional : master_param, skip_update
C
Charles-hit 已提交
72
  inplace : (param -> param_out), (moment1 -> moment1_out), (moment2 -> moment2_out), (beta1_pow -> beta1_pow_out), (beta2_pow -> beta2_pow_out), (master_param -> master_param_outs)
Z
zyfncg 已提交
73

74
- op : add
Z
zyfncg 已提交
75
  args : (Tensor x, Tensor y)
76
  output : Tensor(out)
Z
zyfncg 已提交
77 78 79 80
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : add
81
  inplace : (x -> out)
Z
zyfncg 已提交
82 83
  backward : add_grad

84
- op : add_n
85
  args : (Tensor[] inputs)
Z
zyfncg 已提交
86
  output : Tensor
87
  invoke : add_n_impl(inputs)
Z
zyfncg 已提交
88 89
  backward : add_n_grad

90
- op : addmm
91
  args : (Tensor input, Tensor x, Tensor y, float beta, float alpha)
Z
zyfncg 已提交
92 93 94 95 96 97 98
  output : Tensor
  infer_meta :
    func : AddmmInferMeta
  kernel :
    func : addmm
  backward : addmm_grad

99
- op : affine_grid
100
  args : (Tensor input, IntArray outputShape, bool align_corners=true, bool use_cudnn=true)
101 102 103 104 105 106 107 108 109 110 111
  output : Tensor
  infer_meta :
    func : AffineGridInferMeta
    param : [input, outputShape, align_corners]
  kernel :
    func : affine_grid
    param : [input, outputShape, align_corners]
    data_type : input
    use_gpudnn: use_cudnn
  backward : affine_grid_grad

112
- op : all
113
  args : (Tensor x, int64_t[] axis={}, bool keepdim=false)
Z
zyfncg 已提交
114 115 116 117 118 119
  output : Tensor(out)
  infer_meta :
    func : ReduceInferMeta
  kernel :
    func : all

120
- op : allclose
Z
zyfncg 已提交
121 122 123 124 125 126 127 128
  args : (Tensor x, Tensor y, Scalar rtol, Scalar atol, bool equal_nan)
  output : Tensor(out)
  infer_meta :
    func : AllValueCompareInferMeta
    param: [x, y]
  kernel :
    func : allclose

129
- op : amax
130
  args : (Tensor x, int64_t[] axis={}, bool keepdim=false)
131 132 133 134 135 136 137
  output : Tensor(out)
  infer_meta :
    func : ReduceInferMeta
  kernel :
    func : amax
  backward : amax_grad

138
- op : amin
139
  args : (Tensor x, int64_t[] axis={}, bool keepdim=false)
140 141 142 143 144 145 146
  output : Tensor(out)
  infer_meta :
    func : ReduceInferMeta
  kernel :
    func : amin
  backward : amin_grad

147
- op : any
148
  args : (Tensor x, int64_t[] axis={}, bool keepdim=false)
Z
zyfncg 已提交
149 150 151 152 153 154
  output : Tensor(out)
  infer_meta :
    func : ReduceInferMeta
  kernel :
    func : any

155
- op : arange
Z
zyfncg 已提交
156
  args : (Tensor start, Tensor end, Tensor step, DataType dtype, Place place={})
157
  output : Tensor(out)
Z
zyfncg 已提交
158 159 160 161 162 163 164 165 166 167 168
  infer_meta :
    func : ArangeInferMeta
    param : [start, end, step]
  kernel :
    func : arange
    param : [start, end, step]
    data_type : dtype
    backend : place
  data_transform :
    support_trans_dtype : start, end, step

169
- op : argmax
170
  args : (Tensor x, Scalar axis, bool keepdims, bool flatten, int dtype)
171
  output : Tensor(out)
Z
zyfncg 已提交
172 173 174 175 176
  infer_meta :
    func : ArgMinMaxInferMeta
  kernel :
    func : arg_max

177
- op : argmin
178
  args : (Tensor x, Scalar axis, bool keepdims, bool flatten, int dtype)
179
  output : Tensor(out)
Z
zyfncg 已提交
180 181 182 183 184
  infer_meta :
    func : ArgMinMaxInferMeta
  kernel :
    func : arg_min

185
- op : assign
Z
zyfncg 已提交
186 187 188 189 190 191 192 193
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : assign
  backward : assign_grad

194
- op : assign_out_
Z
zyfncg 已提交
195 196 197 198 199 200 201 202 203 204 205
  args : (Tensor x, Tensor output)
  output : Tensor(out)
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : assign
    param : [x]
  inplace : (output -> out)
  backward : assign_out__grad

206
- op : assign_value_
207 208 209 210 211 212 213 214 215 216
  args : (Tensor output, int[] shape, DataType dtype, Scalar[] values, Place place = {})
  output : Tensor(out)
  inplace: (output -> out)
  infer_meta :
    func : AssignValueInferMeta
    param : [shape, dtype]
  kernel :
    func : assign_value
    param : [shape, dtype, values]
    data_type : dtype
217
    backend : place > output
218

219
- op : auc
220
  args : (Tensor x, Tensor label, Tensor stat_pos, Tensor stat_neg, Tensor ins_tag_weight, str curve, int num_thresholds, int slide_steps)
Z
zyfncg 已提交
221 222 223 224 225
  output : Tensor(auc), Tensor(stat_pos_out), Tensor(stat_neg_out)
  infer_meta :
    func : AucInferMeta
  kernel :
    func : auc
226
  optional : ins_tag_weight
Z
zyfncg 已提交
227

228
- op : average_accumulates_
229 230 231 232 233 234 235 236 237
  args : (Tensor param, Tensor in_sum_1, Tensor in_sum_2, Tensor in_sum_3, Tensor in_num_accumulates, Tensor in_old_num_accumulates, Tensor in_num_updates, float average_window, int64_t max_average_window, int64_t min_average_window)
  output : Tensor(out_sum_1), Tensor(out_sum_2), Tensor(out_sum_3), Tensor(out_num_accumulates), Tensor(out_old_num_accumulates), Tensor(out_num_updates)
  infer_meta:
    func : AverageAccumulatesInferMeta
  kernel :
    func : average_accumulates {dense, dense, dense, dense, dense ,dense, dense -> dense, dense, dense, dense, dense, dense}
    data_type : param
  inplace : (in_sum_1 -> out_sum_1), (in_sum_2 -> out_sum_2), (in_sum_3 -> out_sum_3), (in_num_accumulates -> out_num_accumulates), (in_old_num_accumulates -> out_old_num_accumulates), (in_num_updates -> out_num_updates)

238
- op : batch_norm
239
  args : (Tensor x, Tensor mean, Tensor variance, Tensor scale, Tensor bias, bool is_test, float momentum, float epsilon, str data_layout, bool use_global_stats, bool trainable_statistics)
Z
zyfncg 已提交
240
  output : Tensor(out), Tensor(mean_out), Tensor(variance_out), Tensor(saved_mean), Tensor(saved_variance), Tensor(reserve_space)
241 242 243 244 245 246
  infer_meta:
    func : BatchNormInferMeta
  kernel :
    func : batch_norm
    data_type : x
  view : (mean -> mean_out), (variance -> variance_out)
Z
zyfncg 已提交
247 248
  backward : batch_norm_grad

249
- op : bce_loss
Z
zyfncg 已提交
250 251 252 253 254 255 256 257
  args : (Tensor input, Tensor label)
  output : Tensor
  infer_meta :
    func : BCELossInferMeta
  kernel :
    func : bce_loss
  backward : bce_loss_grad

258
- op : bicubic_interp
259 260 261 262 263 264 265 266 267 268
  args : (Tensor x, Tensor out_size, Tensor[] size_tensor, Tensor scale_tensor, str data_layout, int out_d, int out_h, int out_w, float[] scale, str interp_method, bool align_corners, int align_mode)
  output : Tensor(output)
  infer_meta :
    func : InterpolateInferMeta
  optional: out_size, size_tensor, scale_tensor
  kernel :
    func : bicubic_interp
    data_type : x
  backward : bicubic_interp_grad

269
- op : bilinear_interp
270 271 272 273 274 275 276 277 278 279
  args : (Tensor x, Tensor out_size, Tensor[] size_tensor, Tensor scale_tensor, str data_layout, int out_d, int out_h, int out_w, float[] scale, str interp_method, bool align_corners, int align_mode)
  output : Tensor(output)
  infer_meta :
    func : InterpolateInferMeta
  optional: out_size, size_tensor, scale_tensor
  kernel :
    func : bilinear_interp
    data_type : x
  backward : bilinear_interp_grad

280
- op : bilinear_tensor_product
281 282 283 284 285 286 287 288 289
  args : (Tensor x, Tensor y, Tensor weight, Tensor bias)
  output : Tensor
  infer_meta :
    func : BilinearTensorProductInferMeta
  kernel :
    func : bilinear_tensor_product
  optional : bias
  backward : bilinear_tensor_product_grad

290 291 292 293 294 295 296 297 298
- op : bincount
  args: (Tensor x, Tensor weights, Scalar minlength)
  output: Tensor(out)
  infer_meta:
    func: BincountInferMeta
  kernel:
    func: bincount
  optional: weights

299
- op : bitwise_and
Z
zyfncg 已提交
300
  args : (Tensor x, Tensor y)
301
  output : Tensor(out)
Z
zyfncg 已提交
302 303 304 305 306
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : bitwise_and

307
- op : bitwise_not
Z
zyfncg 已提交
308
  args : (Tensor x)
309
  output : Tensor(out)
Z
zyfncg 已提交
310 311 312 313 314
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : bitwise_not

315
- op : bitwise_or
Z
zyfncg 已提交
316
  args : (Tensor x, Tensor y)
317
  output : Tensor(out)
Z
zyfncg 已提交
318 319 320 321 322
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : bitwise_or

323
- op : bitwise_xor
Z
zyfncg 已提交
324
  args : (Tensor x, Tensor y)
325
  output : Tensor(out)
Z
zyfncg 已提交
326 327 328 329 330
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : bitwise_xor

331
- op : box_coder
L
lyq 已提交
332 333 334 335 336 337 338 339
  args : (Tensor prior_box, Tensor prior_box_var, Tensor target_box, str code_type, bool box_normalized, int axis, float[] variance)
  output : Tensor(output_box)
  infer_meta :
    func : BoxCoderInferMeta
  kernel :
    func : box_coder
  optional : prior_box_var

340 341 342 343 344 345 346 347 348
- op : broadcast_tensors
  args: (Tensor[] input)
  output: Tensor[]{input.size()}
  infer_meta:
    func: BroadcastTensorsInferMeta
  kernel:
    func: broadcast_tensors
  backward: broadcast_tensors_grad

349
- op : cast
350
  args : (Tensor x, DataType dtype)
Z
zyfncg 已提交
351 352 353 354 355
  output : Tensor
  infer_meta :
    func : CastInferMeta
  kernel :
    func : cast
356
    param : [x, dtype]
Z
zyfncg 已提交
357 358 359
    data_type : x
  backward : cast_grad

360 361 362 363 364 365 366 367 368 369 370 371
- op : check_finite_and_unscale_
  args : (Tensor[] x, Tensor scale, Tensor input_found_infinite)
  output : Tensor[](out){x.size()}, Tensor(output_found_infinite)
  infer_meta :
    func : CheckFiniteAndUnscaleInferMeta
    param : [x, scale]
  kernel :
    func : check_finite_and_unscale
    param : [x, scale]
    data_type : x
  inplace : (x -> out), (input_found_infinite -> output_found_infinite)

372
- op : class_center_sample
373 374 375
  args : (Tensor label, int num_classes, int num_samples, int ring_id, int rank, int nranks, bool fix_seed, int seed)
  output : Tensor(remapped_label), Tensor(sampled_local_class_center)
  infer_meta :
376
    func : ClassCenterSampleInferMeta
377
  kernel :
378
    func : class_center_sample
379

380
- op : clip
Z
zyfncg 已提交
381 382 383 384 385 386 387 388 389 390
  args : (Tensor x, Scalar(float) min, Scalar(float) max)
  output : Tensor(out)
  inplace : (x -> out)
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : clip
  backward : clip_grad

391
- op : clip_by_norm
L
lyq 已提交
392 393 394 395 396 397 398
  args : (Tensor x, float max_norm)
  output : Tensor(out)
  infer_meta :
    func : ClipByNormInferMeta
  kernel :
    func : clip_by_norm

399
- op : coalesce_tensor
400 401 402 403 404 405 406 407
  args : (Tensor[] input, DataType dtype, bool copy_data = false, bool set_constant = false, bool persist_output = false, float constant = 0.0, bool use_align = true, int align_size = -1, int size_of_dtype = -1, int64_t[] concated_shapes = {}, int64_t[] concated_ranks = {})
  output : Tensor[](output){input.size()}, Tensor(fused_output)
  infer_meta :
    func : CoalesceTensorInferMeta
  kernel :
    func : coalesce_tensor
    data_type : dtype

408
- op : complex
409
  args : (Tensor real, Tensor imag)
410 411 412 413 414 415 416
  output : Tensor
  infer_meta :
    func : ComplexInferMeta
  kernel :
    func : complex
  backward : complex_grad

417
- op : concat
Z
zyfncg 已提交
418 419 420 421 422 423 424 425 426
  args : (Tensor[] x, Scalar(int64_t) axis)
  output : Tensor
  infer_meta :
    func : ConcatInferMeta
    param : [x, axis]
  kernel :
    func : concat
  backward : concat_grad

427
- op : conj
Z
zyfncg 已提交
428 429 430 431 432 433 434 435
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : conj
  backward : conj_grad

436
- op : conv2d
437
  args : (Tensor input, Tensor filter, int[] strides, int[] paddings, str padding_algorithm, int[] dilations, int groups, str data_format)
Z
zyfncg 已提交
438
  output : Tensor
Z
zyfncg 已提交
439 440 441 442 443
  infer_meta :
    func : ConvInferMeta
  kernel :
    func : conv2d
    use_gpudnn : true
Z
zyfncg 已提交
444 445
  backward : conv2d_grad

446
- op : conv2d_transpose
447
  args : (Tensor x, Tensor filter, int[] strides, int[] paddings, int[] output_padding, IntArray output_size, str padding_algorithm, int groups, int[] dilations, str data_format)
Z
zyfncg 已提交
448 449
  output : Tensor(out)
  infer_meta :
450
    func : Conv2dTransposeInferMeta
Z
zyfncg 已提交
451 452 453 454 455
  kernel :
    func : conv2d_transpose
    use_gpudnn : true
  backward : conv2d_transpose_grad

456
- op : conv3d
457
  args : (Tensor input, Tensor filter, int[] strides, int[] paddings, str padding_algorithm, int groups, int[] dilations, str data_format)
Z
zyfncg 已提交
458
  output : Tensor
Z
zyfncg 已提交
459
  infer_meta :
460
    func : Conv3DInferMeta
Z
zyfncg 已提交
461 462 463
  kernel :
    func : conv3d
    use_gpudnn : true
Z
zyfncg 已提交
464 465
  backward : conv3d_grad

466
- op : conv3d_transpose
Z
zyfncg 已提交
467 468 469 470 471 472 473 474 475
  args : (Tensor x, Tensor filter, int[] strides, int[] paddings, int[] output_padding, int[] output_size, str padding_algorithm, int groups, int[] dilations, str data_format)
  output : Tensor(out)
  infer_meta :
    func : ConvTransposeInferMeta
  kernel :
    func : conv3d_transpose
    use_gpudnn : true
  backward : conv3d_transpose_grad

476
- op : copy_to
Z
zyfncg 已提交
477
  args : (Tensor x, Place place, bool blocking)
478
  output : Tensor(out)
Z
zyfncg 已提交
479 480
  invoke : copy_to_impl(x, place, blocking)

481
- op : crop
482 483 484
  args : (Tensor x, IntArray shape, IntArray offsets)
  output : Tensor(out)
  infer_meta :
485
    func : CropInferMeta
486
  kernel :
487
    func : crop
488
    data_type : x
489
  backward : crop_grad
490

Z
zyfncg 已提交
491
# Part of python API paddle.nn.functional.cross_entropy
492
- op : cross_entropy_with_softmax
Z
zyfncg 已提交
493 494 495 496 497 498 499 500 501
  args : (Tensor input, Tensor label, bool soft_label, bool use_softmax, bool numeric_stable_mode, int ignore_index, int axis)
  output : Tensor(softmax), Tensor(loss)
  infer_meta :
    func : CrossEntropyWithSoftmaxInferMeta
  kernel :
    func : cross_entropy_with_softmax
    data_type : input
  backward : cross_entropy_with_softmax_grad

502
- op : cumprod
Z
zyfncg 已提交
503 504 505 506 507 508 509 510 511
  args : (Tensor x,  int dim)
  output : Tensor(out)
  infer_meta :
    func : UnchangedInferMeta
    param: [x]
  kernel :
    func : cumprod
  backward : cumprod_grad

512
- op : cumsum
W
WangZhen 已提交
513
  args : (Tensor x, Scalar axis, bool flatten, bool exclusive, bool reverse)
Z
zyfncg 已提交
514 515
  output : Tensor(out)
  infer_meta :
W
WangZhen 已提交
516
    func : CumScalarAxisInferMeta
Z
zyfncg 已提交
517 518 519 520
  kernel :
    func : cumsum
  backward : cumsum_grad

521
- op : decode_jpeg
Y
YuanRisheng 已提交
522
  args : (Tensor x, str mode, Place place)
W
wuyefeilin 已提交
523 524 525
  output : Tensor(out)
  infer_meta :
    func : DecodeJpegInferMeta
Y
YuanRisheng 已提交
526
    param : [x, mode]
W
wuyefeilin 已提交
527 528
  kernel :
    func : decode_jpeg
Y
YuanRisheng 已提交
529 530
    param : [x, mode]
    backend : place
W
wuyefeilin 已提交
531

532
- op : deformable_conv
Z
zyfncg 已提交
533 534 535 536 537 538 539 540 541 542
  args : (Tensor x, Tensor offset, Tensor filter, Tensor mask, int[] strides, int[] paddings, int[] dilations, int deformable_groups, int groups, int im2col_step)
  output : Tensor(out)
  infer_meta :
    func : DeformableConvInferMeta
  kernel :
    func : deformable_conv
    data_type : x
  optional : mask
  backward : deformable_conv_grad

543
- op : depthwise_conv2d
544
  args : (Tensor x, Tensor filter, int[] strides, int[] paddings, str padding_algorithm, int groups, int[] dilations, str data_format)
Z
zyfncg 已提交
545 546
  output : Tensor(out)
  infer_meta :
547
    func : DepthwiseConvInferMeta
548
    param : [x, filter, strides, paddings, padding_algorithm, groups, dilations, data_format]
Z
zyfncg 已提交
549 550
  kernel :
    func : depthwise_conv2d
551
    param : [x, filter, strides, paddings, padding_algorithm, groups, dilations, data_format]
552
    use_gpudnn : true
Z
zyfncg 已提交
553 554
  backward : depthwise_conv2d_grad

555
- op : depthwise_conv2d_transpose
556
  args : (Tensor x, Tensor filter, int[] strides, int[] paddings, int[] output_padding, IntArray output_size, str padding_algorithm, int groups, int[] dilations, str data_format)
Z
zyfncg 已提交
557 558
  output : Tensor(out)
  infer_meta :
559
    func : Conv2dTransposeInferMeta
Z
zyfncg 已提交
560 561 562 563
  kernel :
    func : depthwise_conv2d_transpose
  backward : depthwise_conv2d_transpose_grad

564 565 566 567 568 569 570 571
- op : dirichlet
  args: (Tensor alpha)
  output: Tensor(out)
  infer_meta:
    func: DirichletInferMeta
  kernel:
    func: dirichlet

572
- op : distribute_fpn_proposals
573 574 575 576 577 578 579 580 581
  args : (Tensor fpn_rois, Tensor rois_num, int min_level, int max_level, int refer_level, int refer_scale, bool pixel_offset)
  output : Tensor[](multi_fpn_rois){max_level - min_level + 1}, Tensor[](multi_level_rois_num){max_level - min_level + 1}, Tensor(restore_index)
  infer_meta :
    func : DistributeFpnProposalsInferMeta
  kernel :
    func : distribute_fpn_proposals
    data_type : fpn_rois
  optional : rois_num

582
- op : divide
Z
zyfncg 已提交
583 584 585 586 587 588 589 590
  args : (Tensor x, Tensor y)
  output : Tensor
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : divide
  backward : divide_grad

591
- op : dropout
592
  args : (Tensor x, Tensor seed_tensor, Scalar p, bool is_test, str mode, int seed, bool fix_seed)
Z
zyfncg 已提交
593 594 595 596 597 598 599 600 601
  output : Tensor(out), Tensor(mask)
  infer_meta :
    func : DropoutInferMeta
  kernel :
    func : dropout
    data_type : x
  optional : seed_tensor
  backward : dropout_grad

602
- op : edit_distance
Z
zhiboniu 已提交
603 604 605 606 607 608 609 610 611
  args : (Tensor hyps, Tensor refs, Tensor hypslength, Tensor refslength, bool normalized = false)
  output : Tensor(sequencenum), Tensor(out)
  infer_meta :
    func : EditDistanceInferMeta
  kernel :
    func : edit_distance
    data_type: DataType::FLOAT32
  optional : hypslength, refslength

612
- op : eigvalsh
613 614 615 616 617 618 619 620
  args : (Tensor x, str uplo, bool is_test)
  output : Tensor(eigenvalues), Tensor(eigenvectors)
  infer_meta :
    func : EigvalshInferMeta
  kernel :
    func : eigvalsh
  backward : eigvalsh_grad

621
- op : einsum
Z
zyfncg 已提交
622 623 624
  args : (Tensor[] x, str equation)
  output : Tensor, Tensor[]{x.size()}, Tensor[]{x.size()}
  infer_meta :
625
    func : EinsumRawInferMeta
Z
zyfncg 已提交
626 627
    param : [x, equation]
  kernel :
628
    func : einsum_raw
Z
zyfncg 已提交
629 630
  backward : einsum_grad

631
- op : elementwise_pow
Z
zyfncg 已提交
632 633 634 635 636 637 638 639
  args : (Tensor x, Tensor y)
  output : Tensor(out)
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : elementwise_pow
  backward : elementwise_pow_grad

640
- op : embedding
Z
zyfncg 已提交
641 642
  args : (Tensor x, Tensor weight, int64_t padding_idx=-1, bool sparse=false)
  output : Tensor
643 644 645 646 647 648 649 650
  infer_meta :
    func : EmbeddingInferMeta
    param : [x, weight, padding_idx]
  kernel :
    func : embedding {dense, dense -> dense}
           sparse_weight_embedding {dense, selected_rows -> dense}
    param : [x, weight, padding_idx]
    data_type : weight
Z
zyfncg 已提交
651 652
  backward : embedding_grad

653
- op : empty
Z
zyfncg 已提交
654
  args : (IntArray shape, DataType dtype=DataType::FLOAT32, Place place=CPUPlace())
655
  output: Tensor(out)
Z
zyfncg 已提交
656 657 658 659 660 661 662 663 664
  infer_meta :
    func : CreateInferMeta
    param : [shape, dtype]
  kernel :
    func : empty
    param : [shape, dtype]
    data_type : dtype
    backend : place

665
- op : empty_like
Z
zyfncg 已提交
666
  args : (Tensor x, DataType dtype = DataType::UNDEFINED, Place place = {})
667
  output: Tensor(out)
Z
zyfncg 已提交
668 669 670 671 672 673 674 675 676
  infer_meta :
    func : CreateLikeInferMeta
    param : [x, dtype]
  kernel :
    func : empty_like
    param : [x, dtype]
    data_type : dtype > x
    backend : place > x

677
- op : equal
678
  args : (Tensor x, Tensor y)
679
  output : Tensor(out)
Z
zyfncg 已提交
680 681 682 683 684
  infer_meta :
    func : CompareInferMeta
  kernel :
    func : equal

685
- op : expand
Z
zyfncg 已提交
686 687 688 689 690 691 692 693
  args : (Tensor x, IntArray shape)
  output : Tensor
  infer_meta :
    func : ExpandInferMeta
  kernel :
    func : expand
  backward : expand_grad

694
- op : expand_as
Z
zyfncg 已提交
695 696 697 698 699 700 701 702 703
  args : (Tensor x, Tensor y, int[] target_shape)
  output : Tensor
  infer_meta :
    func : ExpandAsInferMeta
  kernel :
    func : expand_as
  optional : y
  backward : expand_as_grad

704
- op : exponential_
705
  args : (Tensor x, float lam)
706 707 708 709 710 711 712 713 714
  output : Tensor(out)
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : exponential
  inplace : (x -> out)
  backward : exponential__grad

715
- op : eye
716
  args : (Scalar num_rows, Scalar num_columns, DataType dtype=DataType::FLOAT32, Place place={})
Z
zyfncg 已提交
717 718 719 720 721 722 723 724 725 726
  output : Tensor(out)
  infer_meta :
    func : EyeInferMeta
    param : [num_rows, num_columns, dtype]
  kernel :
    func : eye
    param : [num_rows, num_columns, dtype]
    data_type : dtype
    backend : place

727
- op : fill
728 729 730 731 732 733 734 735 736 737
  args : (Tensor x, Scalar value)
  output : Tensor(out)
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : fill
  inplace : (x -> out)
  backward: fill_grad

738
- op : fill_diagonal
Z
zhiboniu 已提交
739 740 741 742 743 744 745 746 747
  args : (Tensor x, float value, int offset, bool wrap)
  output : Tensor(out)
  infer_meta :
    func : FillDiagonalInferMeta
  kernel :
    func : fill_diagonal
  inplace : (x -> out)
  backward : fill_diagonal_grad

748
- op : flatten
Z
zyfncg 已提交
749 750 751 752 753 754 755 756 757 758 759 760
  args : (Tensor x, int start_axis, int stop_axis)
  output : Tensor(out), Tensor(xshape)
  infer_meta :
    func : FlattenWithXShapeInferMeta
  kernel :
    func : flatten_with_xshape
    backend : x
  inplace : (x -> out)
  view : (x -> out)
  intermediate : xshape
  backward : flatten_grad

761
- op : floor_divide
Z
zyfncg 已提交
762 763 764 765 766 767 768
  args : (Tensor x, Tensor y)
  output : Tensor(out)
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : floor_divide

769
- op : fmax
770
  args : (Tensor x, Tensor y)
Z
zyfncg 已提交
771 772 773 774 775 776 777 778
  output : Tensor(out)
  infer_meta :
    param: [x, y]
    func : ElementwiseInferMeta
  kernel :
    func : fmax
  backward : fmax_grad

779
- op : fmin
780
  args : (Tensor x, Tensor y)
Z
zyfncg 已提交
781 782 783 784 785 786 787 788
  output : Tensor(out)
  infer_meta :
    param: [x, y]
    func : ElementwiseInferMeta
  kernel :
    func : fmin
  backward : fmin_grad

789
- op : frame
C
Charles-hit 已提交
790 791 792 793 794 795
  args : (Tensor x, int frame_length, int hop_length, int axis)
  output : Tensor(out)
  infer_meta :
    func : FrameInferMeta
  kernel :
    func : frame
796
  backward : frame_grad
C
Charles-hit 已提交
797

798
- op : frobenius_norm
Z
zyfncg 已提交
799 800 801 802 803 804 805 806
  args : (Tensor x, int64_t[] axis,  bool keep_dim,  bool reduce_all)
  output : Tensor(out)
  infer_meta :
    func : ReduceInferMetaBase
  kernel :
    func : frobenius_norm
  backward : frobenius_norm_grad

807
- op : full
Z
zyfncg 已提交
808
  args : (IntArray shape, Scalar value, DataType dtype=DataType::FLOAT32, Place place=CPUPlace())
809
  output: Tensor(out)
Z
zyfncg 已提交
810 811 812 813 814 815 816 817 818
  infer_meta :
    func : CreateInferMeta
    param : [shape, dtype]
  kernel :
    func : full
    param : [shape, value, dtype]
    data_type : dtype
    backend : place

819
- op : full_
820 821 822 823 824 825 826 827 828 829 830 831
  args : (Tensor output, IntArray shape, Scalar value, DataType dtype=DataType::FLOAT32, Place place=CPUPlace())
  output : Tensor(out)
  inplace : (output -> out)
  infer_meta :
    func : CreateInferMeta
    param : [shape, dtype]
  kernel :
    func : full
    param : [shape, value, dtype]
    data_type : dtype
    backend : place

832
- op : full_batch_size_like
Z
zyfncg 已提交
833
  args : (Tensor input, int[] shape, DataType dtype, Scalar value, int input_dim_idx, int output_dim_idx, Place place=CPUPlace())
834
  output: Tensor(out)
Z
zyfncg 已提交
835 836 837 838 839 840 841 842 843
  infer_meta :
    func : FullBatchSizeLikeInferMeta
    param : [input, shape, value, dtype, input_dim_idx, output_dim_idx]
  kernel :
    func : full_batch_size_like
    param : [input, shape, value, dtype, input_dim_idx, output_dim_idx]
    data_type : dtype
    backend : place

844
- op : full_like
Z
zyfncg 已提交
845
  args : (Tensor x, Scalar value, DataType dtype = DataType::UNDEFINED, Place place = {})
846
  output: Tensor(out)
Z
zyfncg 已提交
847 848 849 850 851 852 853 854 855 856 857
  infer_meta :
    func : CreateLikeInferMeta
    param : [x, dtype]
  kernel :
    func : full_like
    param : [x, value, dtype]
    data_type : dtype > x
    backend : place > x
  data_transform :
    skip_transform : x

858
- op : gather
Z
zyfncg 已提交
859 860 861 862 863 864 865 866 867
  args : (Tensor x, Tensor index, Scalar(int) axis=0)
  output : Tensor(out)
  infer_meta :
    func : GatherInferMeta
  kernel :
    func : gather
    data_type: x
  backward : gather_grad

868
- op : gather_nd
Z
zyfncg 已提交
869 870 871 872 873 874 875 876 877
  args : (Tensor x, Tensor index)
  output : Tensor
  infer_meta :
    func : GatherNdInferMeta
  kernel :
    func : gather_nd
    data_type : x
  backward : gather_nd_grad

878
- op : gaussian
Z
zyfncg 已提交
879
  args : (IntArray shape, float mean, float std, int seed, DataType dtype, Place place={})
880
  output: Tensor(out)
Z
zyfncg 已提交
881
  infer_meta :
882
    func : GaussianInferMeta
Z
zyfncg 已提交
883 884
    param : [shape, mean, std, seed, dtype]
  kernel :
885
    func : gaussian
Z
zyfncg 已提交
886 887 888 889
    param : [shape, mean, std, seed, dtype]
    data_type : dtype
    backend : place

890
- op : generate_proposals
Z
zhiboniu 已提交
891 892 893 894 895 896 897
  args : (Tensor scores, Tensor bbox_deltas, Tensor im_shape, Tensor anchors, Tensor variances, int pre_nms_top_n, int post_nms_top_n, float nms_thresh, float min_size, float eta, bool pixel_offset=true)
  output : Tensor(rpn_rois), Tensor(rpn_roi_probs), Tensor(rpn_rois_num)
  infer_meta :
    func : GenerateProposalsV2InferMeta
  kernel :
    func : generate_proposals_v2

898
- op : greater_equal
899
  args : (Tensor x, Tensor y)
900
  output : Tensor(out)
Z
zyfncg 已提交
901 902 903 904 905
  infer_meta :
    func : CompareInferMeta
  kernel :
    func : greater_equal

906
- op : greater_than
907
  args : (Tensor x, Tensor y)
908
  output : Tensor(out)
Z
zyfncg 已提交
909 910 911 912 913
  infer_meta :
    func : CompareInferMeta
  kernel :
    func : greater_than

914
- op : grid_sample
W
Wang Bojun 已提交
915 916 917 918 919 920 921 922 923 924
  args : (Tensor x, Tensor grid, str mode, str padding_mode, bool align_corners)
  output : Tensor(out)
  infer_meta :
    func : GridSampleBaseInferMeta
    param : [x, grid]
  kernel:
    func : grid_sample
    data_type : x
  backward : grid_sample_grad

925
- op : group_norm
Z
zyfncg 已提交
926 927 928 929 930 931 932 933 934 935
  args : (Tensor x, Tensor scale, Tensor bias, float epsilon, int groups, str data_layout)
  output : Tensor(y), Tensor(mean), Tensor(variance)
  infer_meta :
    func : GroupNormInferMeta
  kernel :
    func : group_norm
  optional : scale, bias
  intermediate : mean, variance
  backward : group_norm_grad

936
- op : hardswish
937
  args : (Tensor x)
Z
zyfncg 已提交
938 939 940 941 942 943
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : hard_swish
944
  backward : hardswish_grad
Z
zyfncg 已提交
945

946 947 948 949 950 951 952 953 954 955
- op : hardtanh
  args : (Tensor x, float t_min, float t_max)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : hard_tanh
  backward : hardtanh_grad

956
- op : histogram
957
  args : (Tensor input, int64_t bins, int min, int max)
958
  output : Tensor(out)
Z
zyfncg 已提交
959 960 961 962 963
  infer_meta :
    func : HistogramInferMeta
  kernel :
    func : histogram

964 965 966 967 968 969 970 971 972 973 974
- op : hsigmoid_loss
  args : (Tensor x, Tensor w, Tensor label, Tensor path, Tensor code, Tensor bias, int num_classes, bool remote_prefetch, int trainer_id, int64_t[] height_sections, str[] epmap, str[] table_names, bool is_sparse)
  output : Tensor(out), Tensor(pre_out), Tensor(w_out)
  infer_meta :
    func : HSigmoidLossInferMeta
  optional: path, code, bias
  kernel :
    func : hsigmoid_loss
    data_type : x
  backward : hsigmoid_loss_grad

975
- op : huber_loss
Z
zyfncg 已提交
976 977 978 979 980 981 982 983
  args : (Tensor input, Tensor label, float delta)
  output : Tensor(out), Tensor(residual)
  infer_meta :
    func : HuberLossInferMeta
  kernel :
    func : huber_loss
  backward : huber_loss_grad

984
- op : imag
Z
zyfncg 已提交
985 986 987 988 989 990 991 992
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : RealAndImagInferMeta
  kernel :
    func : imag
  backward : imag_grad

993
- op : increment
Z
zyfncg 已提交
994
  args : (Tensor x, float value)
995
  output : Tensor(out)
Z
zyfncg 已提交
996 997 998 999
  infer_meta :
    func : IncrementInferMeta
  kernel :
    func : increment
H
hong 已提交
1000
  inplace : (x -> out)
Z
zyfncg 已提交
1001

1002
- op : index_add
L
Li Min 已提交
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012
  args : (Tensor x, Tensor index,  Tensor add_value, int axis)
  output : Tensor(out)
  infer_meta :
    func : IndexAddInferMeta
  kernel :
    func : index_add
    data_type : x
  inplace : (x -> out)
  backward : index_add_grad

1013
- op : index_sample
Z
zyfncg 已提交
1014 1015 1016 1017 1018 1019 1020 1021 1022
  args : (Tensor x, Tensor index)
  output : Tensor
  infer_meta :
    func : IndexSampleInferMeta
  kernel :
    func : index_sample
    data_type : x
  backward : index_sample_grad

1023
- op : index_select
1024
  args : (Tensor x, Tensor index,  int axis)
Z
zyfncg 已提交
1025 1026 1027 1028 1029 1030 1031 1032
  output : Tensor(out)
  infer_meta :
    func : IndexSelectInferMeta
  kernel :
    func : index_select
    data_type : x
  backward : index_select_grad

1033
- op : instance_norm
Z
zyfncg 已提交
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044
  args : (Tensor x, Tensor scale, Tensor bias, float epsilon)
  output : Tensor(y), Tensor(saved_mean), Tensor(saved_variance)
  infer_meta :
    func : InstanceNormInferMeta
  kernel :
    func : instance_norm
    data_type : x
  optional : scale, bias
  intermediate : saved_mean, saved_variance
  backward : instance_norm_grad

1045
- op : inverse
1046 1047 1048 1049 1050 1051 1052 1053
  args : (Tensor x)
  output : Tensor(out)
  infer_meta :
    func : InverseInferMeta
  kernel :
    func : inverse
  backward : inverse_grad

1054
- op : is_empty
Z
zyfncg 已提交
1055
  args : (Tensor x)
1056
  output : Tensor(out)
Z
zyfncg 已提交
1057 1058 1059 1060 1061
  infer_meta :
    func : IsEmptyInferMeta
  kernel :
    func : is_empty

1062
- op : isclose
Z
zyfncg 已提交
1063 1064 1065 1066 1067 1068 1069 1070
  args : (Tensor x, Tensor y, Scalar rtol, Scalar atol,  bool equal_nan)
  output : Tensor(out)
  infer_meta :
    func : ValueCompareInferMeta
    param: [x, y]
  kernel :
    func : isclose

1071
- op : isfinite
Z
zyfncg 已提交
1072
  args : (Tensor x)
1073
  output : Tensor(out)
Z
zyfncg 已提交
1074 1075 1076
  infer_meta :
    func : IsfiniteInferMeta
  kernel :
1077 1078
    func : isfinite {dense -> dense},
           infinite_sr {selected_rows -> selected_rows}
Z
zyfncg 已提交
1079

1080
- op : isinf
Z
zyfncg 已提交
1081
  args : (Tensor x)
1082
  output : Tensor(out)
Z
zyfncg 已提交
1083 1084 1085
  infer_meta :
    func : IsfiniteInferMeta
  kernel :
1086 1087
    func : isinf {dense -> dense},
           isinf_sr {selected_rows -> selected_rows}
Z
zyfncg 已提交
1088

1089
- op : isnan
Z
zyfncg 已提交
1090
  args : (Tensor x)
1091
  output : Tensor(out)
Z
zyfncg 已提交
1092 1093 1094
  infer_meta :
    func : IsfiniteInferMeta
  kernel :
1095 1096
    func : isnan {dense -> dense},
           isnan_sr {selected_rows -> selected_rows}
Z
zyfncg 已提交
1097

1098
- op : kldiv_loss
Z
zyfncg 已提交
1099 1100 1101 1102 1103 1104 1105 1106 1107
  args : (Tensor x, Tensor label, str reduction)
  output : Tensor(out)
  infer_meta :
    func : KLDivInferMeta
  kernel :
    func : kldiv_loss
    data_type : x
  backward : kldiv_loss_grad

1108
- op : kron
Z
zyfncg 已提交
1109 1110 1111 1112 1113 1114 1115 1116
  args : (Tensor x, Tensor y)
  output : Tensor
  infer_meta :
    func : KronInferMeta
  kernel :
    func : kron
  backward : kron_grad

1117
- op : kthvalue
Z
zyfncg 已提交
1118 1119 1120 1121 1122 1123 1124 1125
  args : (Tensor x, int k, int axis, bool keepdim)
  output : Tensor(out), Tensor(indices)
  infer_meta :
    func : KthvalueInferMeta
  kernel :
    func : kthvalue
  backward : kthvalue_grad

1126
- op : label_smooth
Z
zyfncg 已提交
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137
  args : (Tensor label, Tensor prior_dist, float epsilon)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [label]
  kernel :
    func : label_smooth
    data_type : label
  optional : prior_dist
  backward : label_smooth_grad

1138
- op : lamb_
T
Thomas Young 已提交
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149
  args : (Tensor param, Tensor grad, Tensor learning_rate, Tensor moment1, Tensor moment2, Tensor beta1_pow, Tensor beta2_pow, Tensor master_param, Tensor skip_update, float weight_decay, float beta1, float beta2, float epsilon, bool multi_precision)
  output : Tensor(param_out), Tensor(moment1_out), Tensor(moment2_out), Tensor(beta1_pow_out), Tensor(beta2_pow_out), Tensor(master_param_outs)
  infer_meta :
    func : LambInferMeta
  kernel :
    func : lamb {dense, dense, dense, dense, dense, dense, dense, dense, dense -> dense, dense, dense, dense, dense, dense},
           lamb_sr {dense, selected_rows, dense, dense, dense, dense, dense, dense, dense -> dense, dense, dense, dense, dense, dense}
    data_type : param
  optional : master_param, skip_update
  inplace : (param -> param_out), (moment1 -> moment1_out), (moment2 -> moment2_out), (beta1_pow -> beta1_pow_out), (beta2_pow -> beta2_pow_out), (master_param -> master_param_outs)

1150
- op : layer_norm
Z
zyfncg 已提交
1151 1152 1153 1154 1155 1156 1157 1158 1159 1160
  args : (Tensor x, Tensor scale, Tensor bias, float epsilon, int begin_norm_axis, bool is_test)
  output : Tensor(out), Tensor(mean), Tensor(variance)
  infer_meta :
    func : LayerNormInferMeta
  kernel :
    func : layer_norm
    data_type : x
  backward : layer_norm_grad
  optional : scale, bias

1161
- op : lerp
Z
zyfncg 已提交
1162
  args : (Tensor x, Tensor y, Tensor weight)
1163
  output : Tensor(out)
Z
zyfncg 已提交
1164 1165 1166 1167
  infer_meta :
    func : LerpInferMeta
  kernel :
    func : lerp
1168
  inplace : (x -> out)
Z
zyfncg 已提交
1169 1170
  backward : lerp_grad

1171
- op : less_equal
1172
  args : (Tensor x, Tensor y)
1173
  output : Tensor(out)
Z
zyfncg 已提交
1174 1175 1176 1177 1178
  infer_meta :
    func : CompareInferMeta
  kernel :
    func : less_equal

1179
- op : less_than
1180
  args : (Tensor x, Tensor y)
1181
  output : Tensor(out)
Z
zyfncg 已提交
1182 1183 1184 1185 1186
  infer_meta :
    func : CompareInferMeta
  kernel :
    func : less_than

1187
- op : linear_interp
1188 1189 1190 1191 1192 1193
  args : (Tensor x, Tensor out_size, Tensor[] size_tensor, Tensor scale_tensor, str data_layout, int out_d, int out_h, int out_w, float[] scale, str interp_method, bool align_corners, int align_mode)
  output : Tensor(output)
  infer_meta :
    func : InterpolateInferMeta
  optional: out_size, size_tensor, scale_tensor
  kernel :
1194
    func : linear_interp
1195
    data_type : x
1196
  backward : linear_interp_grad
1197

1198
- op : linspace
1199
  args : (Tensor start, Tensor stop, Tensor number, DataType dtype, Place place)
1200
  output : Tensor(out)
Z
zyfncg 已提交
1201 1202
  infer_meta :
    func : LinspaceInferMeta
1203
    param: [start, stop, number, dtype]
Z
zyfncg 已提交
1204 1205
  kernel :
    func : linspace
1206
    param: [start, stop, number, dtype]
Z
zyfncg 已提交
1207
    data_type : dtype
1208
    backend : place
Z
zyfncg 已提交
1209

1210
- op : log_loss
Z
zyfncg 已提交
1211 1212 1213 1214 1215 1216 1217 1218
  args : (Tensor input, Tensor label, float epsilon)
  output : Tensor
  infer_meta :
    func : LogLossInferMeta
  kernel :
    func : log_loss
  backward : log_loss_grad

1219
- op : log_softmax
Z
zyfncg 已提交
1220 1221 1222 1223 1224 1225 1226 1227
  args : (Tensor x,  int axis)
  output : Tensor(out)
  infer_meta :
    func : UnchangedInferMetaCheckAxis
  kernel :
    func : log_softmax
  backward : log_softmax_grad

1228
- op : logcumsumexp
Z
zyfncg 已提交
1229 1230 1231 1232 1233 1234 1235 1236
  args : (Tensor x, int axis, bool flatten, bool exclusive, bool reverse)
  output : Tensor(out)
  infer_meta :
    func : CumInferMeta
  kernel :
    func : logcumsumexp
  backward : logcumsumexp_grad

1237
- op : logical_and
Z
zyfncg 已提交
1238
  args : (Tensor x, Tensor y)
1239
  output : Tensor(out)
Z
zyfncg 已提交
1240 1241 1242 1243 1244
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : logical_and

1245
- op : logical_not
Z
zyfncg 已提交
1246
  args : (Tensor x)
1247
  output : Tensor(out)
Z
zyfncg 已提交
1248 1249 1250 1251 1252
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : logical_not

1253
- op : logical_or
Z
zyfncg 已提交
1254
  args : (Tensor x, Tensor y)
1255
  output : Tensor(out)
Z
zyfncg 已提交
1256 1257 1258 1259 1260
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : logical_or

1261
- op : logical_xor
Z
zyfncg 已提交
1262
  args : (Tensor x, Tensor y)
1263
  output : Tensor(out)
Z
zyfncg 已提交
1264 1265 1266 1267 1268
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : logical_xor

1269
- op : logsumexp
Z
zyfncg 已提交
1270 1271 1272 1273 1274 1275 1276 1277
  args : (Tensor x, int64_t[] axis,  bool keepdim,  bool reduce_all)
  output : Tensor(out)
  infer_meta :
    func : LogsumexpInferMeta
  kernel :
    func : logsumexp
  backward : logsumexp_grad

1278
- op : lstsq
1279 1280 1281 1282 1283 1284 1285 1286
  args : (Tensor x, Tensor y, Scalar rcond, str driver)
  output : Tensor(solution), Tensor(residuals), Tensor(rank), Tensor(singular_values)
  infer_meta :
    func : LstsqInferMeta
    dtype : x
  kernel :
    func : lstsq

1287
- op : lu
L
Lin Manhui 已提交
1288 1289 1290 1291 1292 1293 1294 1295
  args : (Tensor x, bool pivot)
  output : Tensor(out), Tensor(pivots), Tensor(infos)
  infer_meta :
    func : LUInferMeta
  kernel :
    func : lu
  backward : lu_grad

1296
- op : lu_unpack
1297
  args : (Tensor x, Tensor y, bool unpack_ludata, bool unpack_pivots)
1298 1299 1300 1301 1302 1303 1304 1305
  output : Tensor(pmat), Tensor(l), Tensor(u)
  infer_meta :
    func : LUUnpackInferMeta
  kernel :
    func : lu_unpack
    data_type : x
  backward : lu_unpack_grad

1306
- op : margin_cross_entropy
1307 1308 1309 1310 1311 1312 1313 1314 1315
  args : (Tensor logits, Tensor label, bool return_softmax, int ring_id, int rank, int nranks, float margin1, float margin2, float margin3, float scale)
  output : Tensor(softmax), Tensor(loss)
  infer_meta :
    func : MarginCrossEntropyInferMeta
  kernel :
    func : margin_cross_entropy
    data_type : logits
  backward : margin_cross_entropy_grad

1316
- op : masked_select
Z
zyfncg 已提交
1317 1318 1319 1320 1321 1322 1323 1324 1325
  args : (Tensor x, Tensor mask)
  output : Tensor
  infer_meta :
    func : MaskedSelectInferMeta
  kernel :
    func : masked_select
    data_type : x
  backward : masked_select_grad

1326
- op : matmul
Z
zyfncg 已提交
1327 1328 1329 1330 1331 1332 1333 1334
  args : (Tensor x, Tensor y, bool transpose_x = false, bool transpose_y = false)
  output : Tensor
  infer_meta :
    func : MatmulInferMeta
  kernel :
    func : matmul
  backward : matmul_grad

1335
- op : matrix_nms
Z
zhiboniu 已提交
1336 1337 1338 1339 1340 1341 1342
  args : (Tensor bboxes, Tensor scores, float score_threshold, int nms_top_k, int keep_top_k, float post_threshold=0., bool use_gaussian = false, float gaussian_sigma = 2.0, int background_label = 0, bool normalized = true)
  output : Tensor(out), Tensor(index), Tensor(roisnum)
  infer_meta :
    func : MatrixNMSInferMeta
  kernel :
    func : matrix_nms

1343
- op : matrix_power
Z
zyfncg 已提交
1344 1345 1346 1347 1348 1349 1350 1351 1352
  args : (Tensor x, int n)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : matrix_power
  backward : matrix_power_grad

1353
- op : matrix_rank
Z
zyfncg 已提交
1354 1355 1356 1357 1358 1359 1360 1361
  args : (Tensor x, float tol, bool use_default_tol=true, bool hermitian=false)
  output : Tensor(out)
  infer_meta :
    func : MatrixRankInferMeta
    param : [x, use_default_tol, hermitian]
  kernel :
    func : matrix_rank

1362
- op : matrix_rank_tol
Z
zyfncg 已提交
1363 1364 1365 1366 1367 1368 1369
  args : (Tensor x, Tensor atol_tensor, bool use_default_tol=true, bool hermitian=false)
  output : Tensor(out)
  infer_meta :
    func : MatrixRankTolInferMeta
  kernel :
    func : matrix_rank_tol

1370
- op : max
1371
  args : (Tensor x, IntArray axis={}, bool keepdim=false)
Z
zyfncg 已提交
1372 1373
  output : Tensor(out)
  infer_meta :
1374
    func : ReduceIntArrayAxisInferMeta
Z
zyfncg 已提交
1375 1376 1377 1378
  kernel :
    func : max
  backward : max_grad

1379
- op : max_pool2d_with_index
Z
zyfncg 已提交
1380 1381 1382 1383 1384 1385 1386 1387
  args : (Tensor x, int[] kernel_size, int[] strides, int[] paddings, bool global_pooling, bool adaptive)
  output : Tensor(out), Tensor(mask)
  infer_meta :
    func : MaxPoolWithIndexInferMeta
  kernel :
    func : max_pool2d_with_index
  backward : max_pool2d_with_index_grad

1388
- op : max_pool3d_with_index
Z
zyfncg 已提交
1389 1390 1391 1392 1393 1394 1395 1396
  args : (Tensor x, int[] kernel_size, int[] strides, int[] paddings, bool global_pooling, bool adaptive)
  output : Tensor(out), Tensor(mask)
  infer_meta :
    func : MaxPoolWithIndexInferMeta
  kernel :
    func : max_pool3d_with_index
  backward : max_pool3d_with_index_grad

1397
- op : maximum
Z
zyfncg 已提交
1398 1399 1400 1401 1402 1403 1404 1405
  args : (Tensor x, Tensor y)
  output : Tensor(out)
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : maximum
  backward : maximum_grad

1406
- op : maxout
Z
zyfncg 已提交
1407 1408 1409 1410 1411 1412 1413 1414
  args : (Tensor x, int groups, int axis)
  output : Tensor(out)
  infer_meta :
    func : MaxOutInferMeta
  kernel :
    func : maxout
  backward : maxout_grad

1415
- op : mean
1416
  args : (Tensor x, IntArray axis={}, bool keepdim=false)
Z
zyfncg 已提交
1417 1418
  output : Tensor(out)
  infer_meta :
1419
    func : ReduceIntArrayAxisInferMeta
Z
zyfncg 已提交
1420 1421 1422 1423
  kernel :
    func : mean
  backward : mean_grad

1424
- op : mean_all
Z
zyfncg 已提交
1425 1426 1427 1428 1429 1430 1431 1432
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : MeanAllInferMeta
  kernel :
    func : mean_all
  backward : mean_all_grad

1433 1434 1435 1436 1437 1438 1439 1440
- op : merge_selected_rows
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : merge_selected_rows {selected_rows -> selected_rows}

1441
- op : merged_adam_
1442 1443 1444 1445 1446 1447 1448 1449 1450 1451
  args : (Tensor[] param, Tensor[] grad, Tensor[] learning_rate, Tensor[] moment1, Tensor[] moment2, Tensor[] beta1_pow, Tensor[] beta2_pow, Tensor[] master_param, Scalar beta1, Scalar beta2, Scalar epsilon, bool multi_precision, bool use_global_beta_pow)
  output : Tensor[](param_out){param.size()}, Tensor[](moment1_out){param.size()}, Tensor[](moment2_out){param.size()}, Tensor[](beta1_pow_out){param.size()}, Tensor[](beta2_pow_out){param.size()}, Tensor[](master_param_out){param.size()}
  infer_meta :
    func : MergedAdamInferMeta
  optional: master_param
  kernel :
    func : merged_adam
    data_type : param
  inplace : (param -> param_out), (moment1 -> moment1_out), (moment2 -> moment2_out), (beta1_pow -> beta1_pow_out), (beta2_pow -> beta2_pow_out), (master_param -> master_param_out)

1452
- op : merged_momentum_
1453 1454 1455 1456 1457 1458 1459 1460 1461 1462
  args : (Tensor[] param, Tensor[] grad, Tensor[] velocity, Tensor[] learning_rate, Tensor[] master_param, float mu, bool use_nesterov = false, str[] regularization_method = {}, float[] regularization_coeff = {}, bool multi_precision = false, float rescale_grad = 1.0f)
  output : Tensor[](param_out){param.size()}, Tensor[](velocity_out){param.size()}, Tensor[](master_param_out){param.size()}
  infer_meta :
    func : MergedMomentumInferMeta
  optional: master_param
  kernel :
    func : merged_momentum
    data_type : param
  inplace : (param -> param_out), (velocity -> velocity_out), (master_param -> master_param_out)

1463
- op : meshgrid
Z
zyfncg 已提交
1464 1465 1466 1467 1468 1469 1470 1471
  args : (Tensor[] inputs)
  output : Tensor[]{inputs.size()}
  infer_meta :
    func : MeshgridInferMeta
  kernel :
    func : meshgrid
  backward : meshgrid_grad

1472
- op : min
1473
  args : (Tensor x, IntArray axis={}, bool keepdim=false)
Z
zyfncg 已提交
1474 1475
  output : Tensor(out)
  infer_meta :
1476
    func : ReduceIntArrayAxisInferMeta
Z
zyfncg 已提交
1477 1478 1479 1480
  kernel :
    func : min
  backward : min_grad

1481
- op : minimum
Z
zyfncg 已提交
1482 1483 1484 1485 1486 1487 1488 1489
  args : (Tensor x, Tensor y)
  output : Tensor(out)
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : minimum
  backward : minimum_grad

1490
- op : mish
Z
zyfncg 已提交
1491 1492 1493 1494 1495 1496 1497 1498 1499
  args : (Tensor x, float lambda)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : mish
  backward : mish_grad

1500
- op : mode
Z
zyfncg 已提交
1501 1502 1503 1504 1505 1506 1507 1508
  args : (Tensor x,  int axis,  bool keepdim)
  output : Tensor(out), Tensor(indices)
  infer_meta :
    func : ModeInferMeta
  kernel :
    func : mode
  backward : mode_grad

1509
- op : momentum_
Z
zyfncg 已提交
1510 1511
  args : (Tensor param, Tensor grad, Tensor velocity, Tensor learning_rate, Tensor master_param, float mu, bool use_nesterov = false, str regularization_method = "", float regularization_coeff = 0.0, bool multi_precision = false, float rescale_grad = 1.0f)
  output : Tensor(param_out), Tensor(velocity_out), Tensor(master_param_out)
1512 1513 1514 1515 1516
  infer_meta:
    func : MomentumInferMeta
  kernel :
    func : momentum
    data_type : param
Z
zyfncg 已提交
1517
  optional : master_param
1518
  inplace : (param -> param_out), (velocity -> velocity_out), (master_param -> master_param_out)
Z
zyfncg 已提交
1519

1520
- op : multi_dot
Z
zyfncg 已提交
1521 1522 1523 1524 1525 1526 1527 1528
  args : (Tensor[] x)
  output : Tensor
  infer_meta :
    func : MultiDotInferMeta
  kernel :
    func : multi_dot
  backward : multi_dot_grad

1529
- op : multiclass_nms3
1530 1531 1532 1533 1534 1535 1536 1537
  args : (Tensor bboxes, Tensor scores, Tensor rois_num, float score_threshold, int nms_top_k, int keep_top_k, float nms_threshold=0.3, bool normalized=true, float nms_eta=1.0, int background_label=0)
  output : Tensor(out), Tensor(index), Tensor(nms_rois_num)
  infer_meta :
    func : MultiClassNMSInferMeta
  kernel :
    func : multiclass_nms3
  optional : rois_num

1538
- op : multinomial
1539
  args : (Tensor x, Scalar num_samples, bool replacement)
1540
  output : Tensor(out)
Z
zyfncg 已提交
1541 1542 1543 1544 1545
  infer_meta :
    func : MultinomialInferMeta
  kernel :
    func : multinomial

1546
- op : multiplex
1547
  args : (Tensor[] inputs, Tensor index)
Z
zyfncg 已提交
1548 1549 1550 1551 1552
  output : Tensor
  infer_meta :
    func : MultiplexInferMeta
  kernel :
    func : multiplex
1553
    data_type : inputs
Z
zyfncg 已提交
1554 1555
  backward : multiplex_grad

1556
- op : multiply
Z
zyfncg 已提交
1557 1558 1559 1560 1561
  args : (Tensor x, Tensor y)
  output : Tensor
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
1562 1563
    func : multiply {dense, dense -> dense},
           multiply_sr {selected_rows, dense -> selected_rows}
Z
zyfncg 已提交
1564 1565
  backward : multiply_grad

1566
- op : nearest_interp
1567 1568 1569 1570 1571 1572 1573 1574 1575 1576
  args : (Tensor x, Tensor out_size, Tensor[] size_tensor, Tensor scale_tensor, str data_layout, int out_d, int out_h, int out_w, float[] scale, str interp_method, bool align_corners, int align_mode)
  output : Tensor(output)
  infer_meta :
    func : InterpolateInferMeta
  optional: out_size, size_tensor, scale_tensor
  kernel :
    func : nearest_interp
    data_type : x
  backward : nearest_interp_grad

1577
- op : nll_loss
Z
zyfncg 已提交
1578 1579 1580 1581 1582 1583 1584 1585 1586 1587
  args : (Tensor input, Tensor label, Tensor weight, int64_t ignore_index, str reduction)
  output : Tensor(out), Tensor(total_weight)
  infer_meta :
    func : NllLossRawInferMeta
  kernel :
    func : nll_loss
    data_type : input
  optional : weight
  backward : nll_loss_grad

1588
- op : nms
1589 1590 1591 1592 1593 1594 1595 1596
  args : (Tensor x, float threshold)
  output : Tensor(out)
  infer_meta :
    func : NMSInferMeta
  kernel :
    func : nms
    data_type : x

1597 1598 1599 1600 1601 1602 1603 1604
- op : nonzero
  args : (Tensor condition)
  output : Tensor(out)
  infer_meta :
    func : NonZeroInferMeta
  kernel :
    func : nonzero

1605
- op : norm
Z
zyfncg 已提交
1606 1607 1608 1609 1610 1611 1612 1613
  args : (Tensor x, int axis, float epsilon, bool is_test)
  output : Tensor(out), Tensor(norm)
  infer_meta :
    func : NormInferMeta
  kernel :
    func : norm
  backward : norm_grad

1614
- op : not_equal
1615
  args : (Tensor x, Tensor y)
1616
  output : Tensor(out)
Z
zyfncg 已提交
1617 1618 1619 1620 1621
  infer_meta :
    func : CompareInferMeta
  kernel :
    func : not_equal

1622 1623 1624 1625 1626 1627 1628 1629 1630 1631
- op : numel
  args : (Tensor x)
  output : Tensor(size)
  infer_meta :
    func : SizeInferMeta
  kernel :
    func : size
  data_transform:
    skip_transform : x

1632
- op : one_hot
Z
zyfncg 已提交
1633
  args : (Tensor x, Scalar(int) num_classes)
1634
  output : Tensor(out)
Z
zyfncg 已提交
1635 1636 1637 1638 1639
  infer_meta :
    func : OneHotInferMeta
  kernel :
    func : one_hot

1640
- op : ones
1641
  args : (IntArray shape, DataType dtype=DataType::FLOAT32, Place place=CPUPlace())
1642
  output : Tensor(out)
1643 1644
  invoke : full(shape, 1, dtype, place)

1645
- op : ones_like
Z
zyfncg 已提交
1646
  args : (Tensor x, DataType dtype=DataType::UNDEFINED, Place place={})
1647
  output : Tensor(out)
Z
zyfncg 已提交
1648 1649
  invoke : full_like(x, 1, dtype, place)

1650 1651 1652 1653 1654 1655 1656 1657 1658
- op : overlap_add
  args: (Tensor x, int hop_length, int axis)
  output: Tensor
  infer_meta:
    func: OverlapAddInferMeta
  kernel:
    func: overlap_add
  backward: overlap_add_grad

1659
- op : p_norm
Z
zyfncg 已提交
1660 1661 1662 1663 1664 1665 1666 1667
  args : (Tensor x,  float porder,  int axis,  float epsilon,  bool keepdim,  bool asvector=false)
  output : Tensor(out)
  infer_meta :
    func : PNormInferMeta
  kernel :
    func : p_norm
  backward : p_norm_grad

1668
- op : pad
1669
  args : (Tensor x, int[] paddings, Scalar pad_value)
Z
zyfncg 已提交
1670 1671 1672 1673 1674 1675 1676
  output : Tensor
  infer_meta :
    func : PadInferMeta
  kernel :
    func : pad
  backward : pad_grad

1677
- op : pad3d
Z
zyfncg 已提交
1678 1679 1680 1681 1682 1683 1684 1685
  args : (Tensor x, IntArray paddings, str mode,  float pad_value, str data_format)
  output : Tensor(out)
  infer_meta :
    func : Pad3dInferMeta
  kernel :
    func : pad3d
  backward : pad3d_grad

1686
- op : pixel_shuffle
Z
zyfncg 已提交
1687 1688 1689 1690 1691 1692 1693 1694
  args : (Tensor x, int upscale_factor, str data_format)
  output : Tensor
  infer_meta :
    func : PixelShuffleInferMeta
  kernel :
    func : pixel_shuffle
  backward : pixel_shuffle_grad

1695
- op : pool2d
1696
  args : (Tensor x, IntArray kernel_size, int[] strides, int[] paddings, bool ceil_mode, bool exclusive, str data_format, str pooling_type, bool global_pooling, bool adaptive, str padding_algorithm, bool use_gpudnn)
Z
zyfncg 已提交
1697 1698
  output : Tensor(out)
  infer_meta :
1699
    func : Pool2DInferMeta
1700
    param : [x, kernel_size, strides, paddings, ceil_mode, exclusive, data_format, pooling_type, global_pooling, adaptive, padding_algorithm]
Z
zyfncg 已提交
1701 1702
  kernel :
    func : pool2d
1703 1704
    param : [x, kernel_size, strides, paddings, ceil_mode, exclusive, data_format, pooling_type, global_pooling, adaptive, padding_algorithm]
    use_gpudnn : use_gpudnn
Z
zyfncg 已提交
1705 1706
  backward : pool2d_grad

1707
- op : pool3d
1708
  args : (Tensor x, int[] kernel_size, int[] strides, int[] paddings, bool ceil_mode, bool exclusive, str data_format, str pooling_type, bool global_pooling, bool adaptive, str padding_algorithm, bool use_gpudnn)
Z
zyfncg 已提交
1709 1710 1711
  output : Tensor(out)
  infer_meta :
    func : PoolInferMeta
1712
    param : [x, kernel_size, strides, paddings, ceil_mode, exclusive, data_format, pooling_type, global_pooling, adaptive, padding_algorithm]
Z
zyfncg 已提交
1713 1714
  kernel :
    func : pool3d
1715 1716
    param : [x, kernel_size, strides, paddings, ceil_mode, exclusive, data_format, pooling_type, global_pooling, adaptive, padding_algorithm]
    use_gpudnn : use_gpudnn
Z
zyfncg 已提交
1717 1718
  backward : pool3d_grad

1719
- op : pow
1720
  args : (Tensor x, Scalar y)
Z
zyfncg 已提交
1721 1722 1723 1724 1725 1726 1727 1728
  output : Tensor(out)
  infer_meta :
    func : UnchangedInferMeta
    param: [x]
  kernel :
    func : pow
  backward : pow_grad

1729
- op : prelu
Z
zyfncg 已提交
1730 1731 1732 1733 1734 1735 1736 1737
  args : (Tensor x, Tensor alpha, str data_format, str mode)
  output : Tensor(out)
  infer_meta :
    func : PReluInferMeta
  kernel :
    func : prelu
  backward : prelu_grad

1738
- op : prior_box
Z
zhiboniu 已提交
1739 1740 1741 1742 1743 1744 1745
  args : (Tensor input, Tensor image, float[] min_sizes, float[] aspect_ratios, float[] variances, float[] max_sizes = {}, bool flip=true, bool clip=true, float step_w=0.0, float step_h=0.0, float offset=0.5, bool min_max_aspect_ratios_order=false)
  output : Tensor(out), Tensor(var)
  infer_meta :
    func : PriorBoxInferMeta
  kernel :
    func : prior_box

1746 1747 1748 1749 1750 1751 1752 1753 1754
- op : prod
  args : (Tensor x, IntArray dims, bool keep_dim, bool reduce_all)
  output : Tensor
  infer_meta :
    func : ReduceIntArrayAxisInferMetaBase
  kernel :
    func : prod_raw
  backward : prod_grad

1755
- op : psroi_pool
Z
zyfncg 已提交
1756 1757 1758 1759 1760 1761 1762 1763 1764 1765
  args : (Tensor x, Tensor boxes, Tensor boxes_num, int pooled_height, int pooled_width, int output_channels, float spatial_scale)
  output : Tensor
  infer_meta :
    func : PsroiPoolInferMeta
  kernel :
    func : psroi_pool
    data_type : x
  optional : boxes_num
  backward : psroi_pool_grad

1766
- op : put_along_axis
1767
  args : (Tensor arr, Tensor indices, Tensor values, int axis, str reduce)
1768
  output : Tensor(out)
Z
zyfncg 已提交
1769 1770
  infer_meta :
    func : UnchangedInferMeta
1771
    param : [arr]
Z
zyfncg 已提交
1772 1773
  kernel :
    func : put_along_axis
1774 1775
    data_type : arr
  inplace : (arr -> out)
Z
zyfncg 已提交
1776 1777
  backward : put_along_axis_grad

1778
- op : qr
Z
zyfncg 已提交
1779 1780 1781 1782 1783 1784
  args : (Tensor x, str mode)
  output : Tensor(q), Tensor(r)
  infer_meta :
    func : QrInferMeta
  kernel :
    func : qr
Y
Yulong Ao 已提交
1785
  backward : qr_grad
Z
zyfncg 已提交
1786

1787
- op : randint
Z
zyfncg 已提交
1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798
  args : (int low, int high, IntArray shape, DataType dtype=DataType::INT64, Place place={})
  output : Tensor(out)
  infer_meta :
    func : RandintInferMeta
    param : [low, high, shape, dtype]
  kernel :
    func : randint
    param : [low, high, shape, dtype]
    data_type : dtype
    backend : place

1799
- op : randperm
Z
zyfncg 已提交
1800
  args : (int n, DataType dtype, Place place={})
1801
  output : Tensor(out)
Z
zyfncg 已提交
1802 1803 1804 1805 1806 1807 1808 1809 1810
  infer_meta :
    func : RandpermInferMeta
    param : [n, dtype]
  kernel :
    func : randperm
    param : [n, dtype]
    data_type : dtype
    backend : place

1811
- op : real
Z
zyfncg 已提交
1812 1813 1814 1815 1816 1817 1818 1819
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : RealAndImagInferMeta
  kernel :
    func : real
  backward : real_grad

1820
- op : relu6
1821
  args : (Tensor x)
1822 1823 1824 1825 1826 1827 1828 1829
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : relu6
  backward : relu6_grad

1830
- op : remainder
C
Chen Weihang 已提交
1831 1832 1833 1834 1835 1836 1837 1838
  args : (Tensor x, Tensor y)
  output : Tensor
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : remainder
  inplace : (x -> out)

1839
- op : renorm
S
seemingwang 已提交
1840 1841 1842 1843 1844 1845 1846 1847 1848
  args : (Tensor x, float p, int axis, float max_norm)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : renorm
  backward : renorm_grad

1849
- op : repeat_interleave
1850
  args : (Tensor x, int repeats, int axis)
S
seemingwang 已提交
1851 1852 1853 1854 1855 1856 1857
  output : Tensor(out)
  infer_meta :
    func : RepeatInterleaveInferMeta
  kernel :
    func : repeat_interleave
  backward: repeat_interleave_grad

1858
- op : repeat_interleave_with_tensor_index
1859
  args : (Tensor x, Tensor repeats, int axis)
S
seemingwang 已提交
1860 1861 1862 1863 1864 1865 1866 1867
  output : Tensor(out)
  infer_meta :
    func : RepeatInterleaveWithTensorIndexInferMeta
  kernel :
    func : repeat_interleave_with_tensor_index
    data_type : x
  backward: repeat_interleave_with_tensor_index_grad

1868
- op : reshape
Z
zyfncg 已提交
1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879
  args : (Tensor x, IntArray shape)
  output : Tensor(out), Tensor(xshape)
  infer_meta :
    func : ReshapeWithXShapeInferMeta
  kernel :
    func : reshape_with_xshape
  inplace : (x -> out)
  view: (x -> out)
  intermediate : xshape
  backward: reshape_grad

1880
- op : reverse
1881
  args : (Tensor x, IntArray axis)
W
wanghuancoder 已提交
1882 1883 1884 1885 1886 1887 1888
  output : Tensor
  infer_meta :
    func : ReverseInferMeta
  kernel :
    func : reverse
  backward : reverse_grad

1889
- op : rmsprop_
C
caozhou 已提交
1890 1891 1892 1893 1894 1895 1896 1897 1898 1899
  args : (Tensor param, Tensor mean_square, Tensor grad, Tensor moment, Tensor learning_rate, Tensor mean_grad, float epsilon, float decay, float momentum, bool centered)
  output : Tensor(param_out), Tensor(moment_out), Tensor(mean_square_out), Tensor(mean_grad_out)
  infer_meta :
    func : RmspropInferMeta
  kernel :
    func : rmsprop {dense, dense, dense, dense, dense, dense -> dense, dense, dense, dense}
           rmsprop_dense_param_sparse_grad {dense, dense, selected_rows, dense, dense, dense -> dense, dense, dense, dense}
    optional : mean_grad
  inplace : (param -> param_out), (moment -> moment_out), (mean_square -> mean_square_out), (mean_grad -> mean_grad_out)

1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914
- op : rnn
  args: (Tensor x, Tensor[] pre_state, Tensor[] weight_list, Tensor sequence_length, Tensor dropout_state_in, float dropout_prob=0.0, bool is_bidirec=false, int input_size=10, int hidden_size=100, int num_layers=1, str mode="RNN_TANH", int seed=0, bool is_test=false)
  output: Tensor(out), Tensor(dropout_state_out), Tensor[](state){pre_state.size()}, Tensor(reserve)
  infer_meta:
    func: RnnInferMeta
    param : [x, pre_state, weight_list, sequence_length, dropout_prob, is_bidirec, input_size, hidden_size, num_layers, mode, seed, is_test]
  kernel:
    func: rnn
    param : [x, pre_state, weight_list, sequence_length, dropout_prob, is_bidirec, input_size, hidden_size, num_layers, mode, seed, is_test]
    data_type: x
  backward: rnn_grad
  optional : sequence_length
  intermediate : reserve
  view : (dropout_state_in -> dropout_state_out)

1915
- op : roi_align
Z
zyfncg 已提交
1916 1917 1918 1919 1920 1921 1922 1923 1924 1925
  args : (Tensor x, Tensor boxes, Tensor boxes_num, int pooled_height, int pooled_width, float spatial_scale, int sampling_ratio, bool aligned)
  output : Tensor
  infer_meta :
    func : RoiAlignInferMeta
  kernel :
    func : roi_align
    data_type : x
  optional : boxes_num
  backward : roi_align_grad

1926
- op : roi_pool
Z
zyfncg 已提交
1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937
  args : (Tensor x, Tensor boxes, Tensor boxes_num, int pooled_height, int pooled_width, float spatial_scale)
  output : Tensor(out), Tensor(arg_max)
  infer_meta :
    func : RoiPoolInferMeta
  kernel :
    func : roi_pool
    data_type : x
  optional : boxes_num
  intermediate : arg_max
  backward : roi_pool_grad

1938
- op : roll
Z
zyfncg 已提交
1939 1940 1941 1942 1943 1944 1945 1946
  args : (Tensor x, IntArray shifts, int64_t[] axis)
  output : Tensor(out)
  infer_meta :
    func : RollInferMeta
  kernel :
    func : roll
  backward : roll_grad

1947
- op : scale
Z
zyfncg 已提交
1948
  args : (Tensor x, Scalar scale, float bias, bool bias_after_scale)
1949
  output : Tensor(out)
Z
zyfncg 已提交
1950 1951 1952 1953
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
1954 1955
    func : scale {dense -> dense},
           scale_sr {selected_rows -> selected_rows}
Z
zyfncg 已提交
1956 1957 1958
  inplace : (x -> out)
  backward : scale_grad

1959
- op : scatter
Z
zyfncg 已提交
1960
  args : (Tensor x, Tensor index, Tensor updates, bool overwrite)
1961
  output : Tensor(out)
Z
zyfncg 已提交
1962 1963 1964 1965 1966
  infer_meta :
    func : ScatterInferMeta
    dtype : x
  kernel :
    func : scatter
1967
  inplace : (x -> out)
Z
zyfncg 已提交
1968 1969
  backward : scatter_grad

1970
- op : scatter_nd_add
Z
zyfncg 已提交
1971 1972 1973 1974 1975 1976 1977 1978 1979
  args : (Tensor x, Tensor index, Tensor updates)
  output : Tensor
  infer_meta :
    func : ScatterNdAddInferMeta
    dtype : x
  kernel :
    func : scatter_nd_add
  backward : scatter_nd_add_grad

1980
- op : searchsorted
1981
  args : (Tensor sorted_sequence, Tensor values, bool out_int32, bool right)
Z
zyfncg 已提交
1982 1983 1984 1985 1986 1987 1988
  output : Tensor(out)
  infer_meta :
    func : SearchsortedInferMeta
  kernel :
    func : searchsorted
    data_type : sorted_sequence

1989
- op : segment_pool
Z
zyfncg 已提交
1990 1991 1992 1993 1994 1995 1996 1997 1998
  args : (Tensor x, Tensor segment_ids, str pooltype)
  output : Tensor(out), Tensor(summed_ids)
  infer_meta :
    func : SegmentPoolInferMeta
  kernel :
    func : segment_pool
    data_type : x
  backward : segment_pool_grad

1999
- op : selu
Z
zyfncg 已提交
2000 2001 2002 2003 2004 2005 2006 2007 2008
  args : (Tensor x, float scale, float alpha)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : selu
  backward : selu_grad

2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030
- op : send_u_recv
  args : (Tensor x, Tensor src_index, Tensor dst_index, str reduce_op = "SUM", IntArray out_size = {0})
  output : Tensor(out), Tensor(dst_count)
  infer_meta :
    func : SendURecvInferMeta
  kernel :
    func : send_u_recv
    data_type : x
  intermediate : dst_count
  backward : send_u_recv_grad

- op : send_ue_recv
  args : (Tensor x, Tensor y, Tensor src_index, Tensor dst_index, str message_op, str reduce_op, IntArray out_size)
  output : Tensor(out), Tensor(dst_count)
  infer_meta :
    func : SendUERecvInferMeta
  kernel :
    func : send_ue_recv
    data_type : x
  intermediate : dst_count
  backward : send_ue_recv_grad

2031
- op : sgd_
Z
zyfncg 已提交
2032 2033
  args : (Tensor param, Tensor learning_rate, Tensor grad, Tensor master_param, bool multi_precision)
  output : Tensor(param_out), Tensor(master_param_out)
2034 2035 2036 2037 2038 2039 2040 2041 2042
  infer_meta :
    func : SgdInferMeta
  kernel :
    func : sgd {dense, dense, dense, dense -> dense, dense},
           sgd_dense_param_sparse_grad {dense, dense, selected_rows, dense -> dense, dense},
           sgd_sparse_param_sparse_grad {selected_rows, dense, selected_rows, selected_rows -> selected_rows, selected_rows}
    data_type : param
  data_transform :
    support_trans_dtype : learning_rate
Z
zyfncg 已提交
2043
  optional : master_param
2044
  inplace : (param -> param_out), (master_param -> master_param_out)
Z
zyfncg 已提交
2045

2046
- op : shape
Z
zyfncg 已提交
2047
  args : (Tensor input)
2048
  output : Tensor(out)
Z
zyfncg 已提交
2049 2050 2051
  infer_meta :
    func : ShapeInferMeta
  kernel :
2052 2053
    func : shape {dense -> dense},
           shape_sr {selected_rows -> selected_rows}
Z
zyfncg 已提交
2054 2055 2056
  data_transform:
    skip_transform : input

2057
- op : shard_index
2058
  args : (Tensor input, int index_num, int nshards, int shard_id, int ignore_value)
2059
  output : Tensor(out)
Z
zyfncg 已提交
2060 2061 2062 2063 2064
  infer_meta :
    func : ShardIndexInferMeta
  kernel :
    func : shard_index

2065
- op : sigmoid_cross_entropy_with_logits
Z
zyfncg 已提交
2066 2067 2068 2069 2070 2071 2072 2073
  args : (Tensor x, Tensor label, bool normalize, int ignore_index)
  output : Tensor
  infer_meta :
    func : SigmoidCrossEntropyWithLogitsInferMeta
  kernel :
    func : sigmoid_cross_entropy_with_logits
  backward : sigmoid_cross_entropy_with_logits_grad

2074
- op : sign
Z
zyfncg 已提交
2075
  args : (Tensor x)
2076
  output : Tensor(out)
Z
zyfncg 已提交
2077 2078 2079 2080
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : sign
2081
  backward : sign_grad
Z
zyfncg 已提交
2082

2083
- op : slice
Z
zyfncg 已提交
2084 2085 2086 2087 2088 2089 2090 2091
  args : (Tensor input, int64_t[] axes, IntArray starts, IntArray ends, int64_t[] infer_flags, int64_t[] decrease_axis)
  output : Tensor
  infer_meta :
    func : SliceRawInferMeta
  kernel :
    func : slice
  backward : slice_grad

2092
- op : slogdet
2093 2094 2095 2096 2097 2098 2099 2100
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : slogdeterminant
  backward : slogdet_grad

2101
- op : softmax
Z
zyfncg 已提交
2102
  args : (Tensor x, int axis)
2103
  output : Tensor(out)
Z
zyfncg 已提交
2104 2105 2106 2107 2108
  infer_meta :
    func : SoftmaxInferMeta
  kernel :
    func : softmax
    use_gpudnn : true
2109
  inplace : (x -> out)
Z
zyfncg 已提交
2110 2111
  backward : softmax_grad

2112
- op : spectral_norm
2113 2114 2115 2116 2117
  args : (Tensor weight, Tensor u, Tensor v, int dim, int power_iters, float eps)
  output : Tensor
  infer_meta :
    func : SpectralNormInferMeta
  kernel :
2118
    func : spectral_norm
2119
    data_type : weight
2120
  backward : spectral_norm_grad
2121

2122
- op : split
C
Charles-hit 已提交
2123 2124 2125 2126 2127 2128
  args : (Tensor x, IntArray sections, Scalar(int) axis)
  output : Tensor[]{sections.size()}
  infer_meta :
    func : SplitInferMeta
  kernel :
    func : split
Z
zyfncg 已提交
2129 2130
  backward : split_grad

2131
- op : split_with_num
C
Charles-hit 已提交
2132 2133 2134 2135 2136 2137 2138 2139
  args : (Tensor x, int num, Scalar(int) axis)
  output : Tensor[]{num}
  infer_meta :
    func : SplitWithNumInferMeta
  kernel :
    func : split_with_num
  backward : split_with_num_grad

2140
- op : squared_l2_norm
2141 2142 2143 2144 2145 2146 2147 2148
  args : (Tensor x)
  output : Tensor
  infer_meta :
    func : SquaredL2NormInferMeta
  kernel :
    func : squared_l2_norm
  backward : squared_l2_norm_grad

2149
- op : squeeze
2150
  args : (Tensor x, IntArray axis)
Z
zyfncg 已提交
2151 2152
  output : Tensor(out), Tensor(xshape)
  infer_meta :
2153
    func : SqueezeWithXShapeInferMeta
Z
zyfncg 已提交
2154
  kernel :
2155
    func : squeeze_with_xshape
2156
  inplace : (x -> out)
Z
zyfncg 已提交
2157 2158 2159 2160
  view: (x -> out)
  intermediate : xshape
  backward : squeeze_grad

2161
- op : stack
Z
zyfncg 已提交
2162 2163 2164 2165 2166 2167 2168 2169
  args : (Tensor[] x, int axis)
  output : Tensor
  infer_meta :
    func : StackInferMeta
  kernel :
    func : stack
  backward : stack_grad

2170
- op : strided_slice
Z
zyfncg 已提交
2171 2172 2173 2174 2175 2176 2177 2178
  args : (Tensor x, int[] axes, IntArray starts, IntArray ends, IntArray strides)
  output : Tensor
  infer_meta :
    func : StridedSliceInferMeta
  kernel :
    func : strided_slice
  backward : strided_slice_grad

2179
- op : subtract
Z
zyfncg 已提交
2180
  args : (Tensor x, Tensor y)
2181
  output : Tensor(out)
Z
zyfncg 已提交
2182 2183 2184 2185
  infer_meta :
    func : ElementwiseInferMeta
  kernel :
    func : subtract
2186
  inplace : (x -> out)
Z
zyfncg 已提交
2187 2188
  backward : subtract_grad

2189
- op : sum
2190
  args : (Tensor x, IntArray axis={}, DataType dtype=DataType::UNDEFINED, bool keepdim=false)
Z
zyfncg 已提交
2191 2192 2193 2194 2195 2196 2197 2198
  output : Tensor(out)
  infer_meta :
    func : SumInferMeta
  kernel :
    func : sum
    data_type : x
  backward : sum_grad

2199
- op : svd
2200
  args : (Tensor x, bool full_matrices)
2201 2202 2203 2204 2205 2206 2207
  output : Tensor(u), Tensor(s), Tensor(vh)
  infer_meta :
    func : SvdInferMeta
  kernel :
    func : svd
  backward : svd_grad

2208
- op : swish
2209
  args : (Tensor x)
Z
zyfncg 已提交
2210 2211 2212 2213 2214 2215 2216 2217
  output : Tensor(out)
  infer_meta :
    func : UnchangedInferMeta
    param : [x]
  kernel :
    func : swish
  backward : swish_grad

2218
- op : sync_batch_norm_
2219
  args : (Tensor x, Tensor mean, Tensor variance, Tensor scale, Tensor bias, bool is_test, float momentum, float epsilon, str data_layout, bool use_global_stats, bool trainable_statistics)
2220 2221 2222 2223 2224
  output : Tensor(out), Tensor(mean_out), Tensor(variance_out), Tensor(saved_mean), Tensor(saved_variance), Tensor(reserve_space)
  infer_meta :
    func : BatchNormInferMeta
  kernel :
    func : sync_batch_norm
2225
    data_type : x
2226
  backward : sync_batch_norm_grad
2227
  inplace : (mean -> mean_out), (variance -> variance_out)
2228

2229
- op : take_along_axis
2230
  args : (Tensor arr, Tensor indices, int axis)
Z
zyfncg 已提交
2231 2232 2233
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
2234
    param : [indices]
Z
zyfncg 已提交
2235 2236
  kernel :
    func : take_along_axis
2237
    data_type : arr
Z
zyfncg 已提交
2238 2239
  backward : take_along_axis_grad

2240
- op : temporal_shift
C
ccrrong 已提交
2241 2242 2243 2244 2245 2246 2247 2248
  args : (Tensor x, int seg_num, float shift_ratio, str data_format_str)
  output : Tensor
  infer_meta :
    func : TemporalShiftInferMeta
  kernel :
    func : temporal_shift
  backward : temporal_shift_grad

2249
- op : tile
Z
zyfncg 已提交
2250 2251 2252 2253 2254 2255 2256 2257
  args : (Tensor x, IntArray repeat_times)
  output : Tensor
  infer_meta :
    func : TileInferMeta
  kernel :
    func : tile
  backward : tile_grad

2258
- op : topk
Z
zyfncg 已提交
2259 2260 2261 2262 2263 2264
  args : (Tensor x, Scalar k, int axis = -1, bool largest = true, bool sorted = true)
  output : Tensor(out), Tensor(indices)
  infer_meta :
    func : TopKInferMeta
  kernel :
    func : top_k
2265
  backward : topk_grad
Z
zyfncg 已提交
2266

2267
- op : transpose
2268
  args : (Tensor x, int[] perm)
Z
zyfncg 已提交
2269 2270 2271 2272 2273 2274 2275
  output : Tensor
  infer_meta :
    func : TransposeInferMeta
  kernel :
    func : transpose
  backward : transpose_grad

2276
- op : triangular_solve
Z
zyfncg 已提交
2277 2278 2279 2280 2281 2282 2283 2284
  args : (Tensor x, Tensor y, bool upper, bool transpose, bool unitriangular)
  output : Tensor
  infer_meta :
    func : TriangularSolveInferMeta
  kernel :
    func : triangular_solve
  backward : triangular_solve_grad

2285 2286 2287 2288 2289 2290 2291 2292 2293
- op : tril
  args : (Tensor x,  int diagonal,  bool lower)
  output : Tensor(out)
  infer_meta :
    func : TrilInferMeta
  kernel :
    func : tril
  backward : tril_grad

2294
- op : tril_indices
Z
zyfncg 已提交
2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305
  args : (int rows, int cols, int offset, DataType dtype, Place place={})
  output : Tensor(out)
  infer_meta :
    func : TrilIndicesInferMeta
    param : [rows, cols, offset, dtype]
  kernel :
    func : tril_indices
    param : [rows, cols, offset, dtype]
    data_type : dtype
    backend : place

2306
- op : trilinear_interp
2307 2308 2309 2310 2311 2312 2313 2314 2315 2316
  args : (Tensor x, Tensor out_size, Tensor[] size_tensor, Tensor scale_tensor, str data_layout, int out_d, int out_h, int out_w, float[] scale, str interp_method, bool align_corners, int align_mode)
  output : Tensor(output)
  infer_meta :
    func : InterpolateInferMeta
  optional: out_size, size_tensor, scale_tensor
  kernel :
    func : trilinear_interp
    data_type : x
  backward : trilinear_interp_grad

2317
- op : triu_indices
2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328
  args : (int row, int col, int offset, DataType dtype, Place place={})
  output : Tensor(out)
  infer_meta :
    func : TriuIndicesInferMeta
    param : [row, col, offset, dtype]
  kernel :
    func : triu_indices
    param : [row, col, offset, dtype]
    data_type : dtype
    backend : place

Z
zyfncg 已提交
2329
# python API: paddle.nn.initializer.TruncatedNormal
2330
- op : truncated_gaussian_random
Z
zyfncg 已提交
2331
  args : (int[] shape, float mean, float std, int seed, DataType dtype=DataType::FLOAT32, Place place={})
2332
  output : Tensor(out)
Z
zyfncg 已提交
2333 2334 2335 2336 2337 2338 2339 2340 2341
  infer_meta :
    func : TruncatedGaussianRandomInferMeta
    param : [shape, mean, std, seed, dtype]
  kernel :
    func : truncated_gaussian_random
    param : [shape, mean, std, seed, dtype]
    backend : place
    data_type : dtype

2342
- op : unbind
Z
zyfncg 已提交
2343 2344 2345 2346 2347 2348 2349 2350
  args : (Tensor input, int axis)
  output : Tensor[] {axis<0 ? input.dims()[input.dims().size()+axis]:input.dims()[axis]}
  infer_meta :
    func : UnbindInferMeta
  kernel :
    func : unbind
  backward : unbind_grad

2351
- op : uniform
2352
  args : (IntArray shape,  DataType dtype,  Scalar min,  Scalar max,  int seed, Place place={})
Z
zyfncg 已提交
2353 2354 2355
  output : Tensor(out)
  infer_meta :
    func : UniformRandomInferMeta
2356
    param: [shape, dtype]
Z
zyfncg 已提交
2357
  kernel :
2358
    func : uniform
Z
zyfncg 已提交
2359 2360 2361 2362
    param: [shape, dtype, min, max, seed]
    data_type : dtype
    backend : place

2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373
- op : uniform_inplace
  args: (Tensor x, float min, float max, int seed, int diag_num, int diag_step, float diag_val)
  output: Tensor(out)
  infer_meta:
    func: UniformRandomInplaceInferMeta
  kernel:
    func: uniform_inplace
    data_type: x
  inplace: (x -> out)
  backward: uniform_inplace_grad

Z
zyfncg 已提交
2374
# The `axis` argument of Python API paddle.unique is not vector
2375
- op : unique
Z
zyfncg 已提交
2376 2377 2378 2379 2380 2381 2382 2383
  args : (Tensor x, bool return_index, bool return_inverse, bool return_counts, int[] axis, DataType dtype=DataType::INT64)
  output : Tensor(out), Tensor(indices), Tensor(inverse), Tensor(counts)
  infer_meta :
    func : UniqueInferMeta
  kernel :
    func : unique
    data_type : x

2384
- op : unique_consecutive
2385 2386 2387 2388 2389 2390 2391 2392
  args : (Tensor x, bool return_inverse, bool return_counts, int[] axis, int dtype)
  output : Tensor(out), Tensor(index), Tensor(counts)
  infer_meta :
      func : UniqueConsecutiveInferMeta
  kernel :
    func : unique_consecutive
    data_type : x

2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412
- op : unpool
  args: (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, IntArray output_size, str data_format)
  output: Tensor(out)
  infer_meta:
    func: UnpoolInferMeta
  kernel:
    func: unpool
    data_type: x
  backward: unpool_grad

- op : unpool3d
  args: (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, int[] output_size, str data_format)
  output: Tensor(out)
  infer_meta:
    func: Unpool3dInferMeta
  kernel:
    func: unpool3d
    data_type: x
  backward: unpool3d_grad

2413
- op : unsqueeze
Z
zyfncg 已提交
2414 2415 2416
  args : (Tensor x, IntArray axis)
  output : Tensor(out), Tensor(xshape)
  infer_meta :
2417
    func : UnsqueezeWithXShapeInferMeta
Z
zyfncg 已提交
2418
  kernel :
2419
    func : unsqueeze_with_xshape
2420
  inplace : (x -> out)
Z
zyfncg 已提交
2421 2422 2423 2424
  view: (x -> out)
  intermediate : xshape
  backward : unsqueeze_grad

2425
- op : unstack
2426 2427 2428 2429 2430 2431 2432 2433
  args : (Tensor x, int axis, int num)
  output : Tensor[]{num}
  infer_meta :
    func : UnStackInferMeta
  kernel :
    func : unstack
  backward : unstack_grad

2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444
- op : update_loss_scaling_
  args : (Tensor[] x, Tensor found_infinite, Tensor prev_loss_scaling, Tensor in_good_steps, Tensor in_bad_steps, int incr_every_n_steps, int decr_every_n_nan_or_inf, float incr_ratio, float decr_ratio, Scalar stop_update)
  output : Tensor[](out){x.size()}, Tensor(loss_scaling), Tensor(out_good_steps), Tensor(out_bad_steps)
  infer_meta :
    func : UpdateLossScalingInferMeta
    param : [x, found_infinite, prev_loss_scaling, in_good_steps, in_bad_steps]
  kernel :
    func : update_loss_scaling
    data_type : x
  inplace : (x -> out), (prev_loss_scaling -> loss_scaling), (in_good_steps -> out_good_steps), (in_bad_steps -> out_bad_steps)

2445
- op : viterbi_decode
2446
  args : (Tensor potentials, Tensor transition_params, Tensor lengths, bool include_bos_eos_tag)
Z
zyfncg 已提交
2447 2448 2449 2450 2451
  output : Tensor(scores), Tensor(path)
  infer_meta :
    func : ViterbiDecodeInferMeta
  kernel :
    func : viterbi_decode
2452
    data_type : potentials
Z
zyfncg 已提交
2453

2454
- op : warpctc
Z
Zhong Hui 已提交
2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465
  args : (Tensor logits, Tensor label, Tensor logits_length, Tensor labels_length, int blank, bool norm_by_times)
  output :  Tensor(loss), Tensor(warpctcgrad)
  infer_meta :
    func : WarpctcInferMeta
  kernel :
    func : warpctc
    data_type: logits
  optional: logits_length, labels_length
  intermediate: warpctcgrad
  backward : warpctc_grad

2466
- op : where
Z
zyfncg 已提交
2467 2468 2469 2470 2471 2472 2473 2474
  args : (Tensor condition, Tensor x, Tensor y)
  output : Tensor
  infer_meta :
    func : WhereInferMeta
  kernel :
    func : where
  backward : where_grad

2475
- op : yolo_box
Z
zyfncg 已提交
2476 2477 2478 2479 2480 2481 2482 2483
  args : (Tensor x, Tensor img_size, int[] anchors, int class_num, float conf_thresh, int downsample_ratio, bool clip_bbox, float scale_x_y=1.0, bool iou_aware=false, float iou_aware_factor=0.5)
  output : Tensor(boxes), Tensor(scores)
  infer_meta :
    func : YoloBoxInferMeta
  kernel :
    func : yolo_box
    data_type : x

2484
- op : yolo_loss
2485 2486 2487
  args : (Tensor x, Tensor gt_box, Tensor gt_label, Tensor gt_score, int[] anchors, int[] anchor_mask, int class_num, float ignore_thresh, int downsample_ratio, bool use_label_smooth=true, float scale_x_y=1.0)
  output : Tensor(loss), Tensor(objectness_mask), Tensor(gt_match_mask)
  infer_meta :
2488
    func : YoloLossInferMeta
2489
  kernel :
2490
    func : yolo_loss
2491 2492
    data_type : x
  optional : gt_score
2493
  backward : yolo_loss_grad
2494

2495
- op : zeros
2496
  args : (IntArray shape, DataType dtype=DataType::FLOAT32, Place place=CPUPlace())
2497
  output : Tensor(out)
2498 2499
  invoke : full(shape, 0, dtype, place)

2500
- op : zeros_like
Z
zyfncg 已提交
2501
  args : (Tensor x, DataType dtype=DataType::UNDEFINED, Place place = {})
2502
  output : Tensor(out)
Z
zyfncg 已提交
2503
  invoke : full_like(x, 0, dtype, place)