Skip to content

Commit ec877d1

Browse files
authored
support auto generate for dirichlet (#51601)
* support auto generate for dirichlet * use uppercase in args * use op_compat for name mapping
1 parent d04c9cd commit ec877d1

File tree

4 files changed

+14
-54
lines changed

4 files changed

+14
-54
lines changed

paddle/fluid/operators/dirichlet_op.cc

Lines changed: 0 additions & 46 deletions
This file was deleted.

paddle/phi/api/yaml/legacy_ops.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -448,14 +448,6 @@
448448
func : depthwise_conv2d_transpose
449449
backward : depthwise_conv2d_transpose_grad
450450

451-
- op : dirichlet
452-
args: (Tensor alpha)
453-
output: Tensor(out)
454-
infer_meta:
455-
func: DirichletInferMeta
456-
kernel:
457-
func: dirichlet
458-
459451
- op : distribute_fpn_proposals
460452
args : (Tensor fpn_rois, Tensor rois_num, int min_level, int max_level, int refer_level, int refer_scale, bool pixel_offset)
461453
output : Tensor[](multi_fpn_rois){max_level - min_level + 1}, Tensor[](multi_level_rois_num){max_level - min_level + 1}, Tensor(restore_index)

paddle/phi/api/yaml/op_compat.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,12 @@
458458
outputs :
459459
out : Out
460460

461+
- op : dirichlet
462+
inputs :
463+
alpha : Alpha
464+
outputs :
465+
out : Out
466+
461467
- op : dist
462468
inputs :
463469
{x : X, y : Y}

paddle/phi/api/yaml/ops.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,14 @@
384384
func : digamma
385385
backward : digamma_grad
386386

387+
- op : dirichlet
388+
args: (Tensor alpha)
389+
output: Tensor(out)
390+
infer_meta:
391+
func: DirichletInferMeta
392+
kernel:
393+
func: dirichlet
394+
387395
- op : dist
388396
args : (Tensor x, Tensor y, float p = 2.0)
389397
output : Tensor

0 commit comments

Comments
 (0)