Skip to content

Commit 3c7e94d

Browse files
[Prim] Add op map (#50673)
* fix flatten op map * remove prim op all list * add op map info of full_like * polish code
1 parent 457defe commit 3c7e94d

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

paddle/phi/api/yaml/op_compat.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,14 @@
594594
outputs :
595595
out : Out
596596

597+
- op : flatten (flatten_contiguous_range)
598+
inputs :
599+
x : X
600+
outputs :
601+
{out : Out, xshape : XShape}
602+
attrs :
603+
{start_axis : start_axis, stop_axis : stop_axis}
604+
597605
- op : flip
598606
inputs :
599607
x : X
@@ -648,6 +656,14 @@
648656
extra :
649657
attrs : [bool use_mkldnn = false]
650658

659+
- op : full_like (fill_any_like)
660+
inputs :
661+
x : X
662+
outputs :
663+
out : Out
664+
attrs :
665+
{value: value, dtype: dtype}
666+
651667
- op : fused_conv2d
652668
extra :
653669
attrs : [bool use_cudnn = false, float fuse_alpha = 0.0f, float fuse_beta = 0.0f, float Scale_in = 1.0f,

python/paddle/incubate/autograd/primitives.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
from paddle.tensor.creation import assign # noqa: F401
6060
from paddle.tensor.manipulation import cast # noqa: F401
6161

62+
"""
6263
math_op = [
6364
'add',
6465
'subtract',
@@ -116,11 +117,4 @@
116117
'reshape',
117118
'full',
118119
]
119-
120-
__all__ = []
121-
__all__.extend(math_op)
122-
__all__.extend(trigonometric_op)
123-
__all__.extend(sub_prim)
124-
__all__.extend(others)
125-
126-
__all__.sort()
120+
"""

0 commit comments

Comments
 (0)