-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Hackathon 5th No.49][pir] add some method property - Part 2 #58042
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
hi田川,这里是否方便整理一个这样的列表:表里列出动态图Tensor、老IR下Varialbe、新IR下OpResult上patch的方法有哪些。这样我们可以直观的看到当前对齐的一个进度情况,可以整理一下发一个issue里~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
python/paddle/pir/math_op_patch.py
Outdated
) | ||
|
||
@property | ||
def _ndim_(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里最后为什么还有一个下划线,_item只有前下划线。可以统一一下,比如:
- 对于builtin 方法的映射,若有,可以「单下划线+名字+单下划线」,如 xx
- 对于 property 属性的映射,若有,可以「单下划线+名字」,如 _x
- 对于 方法的映射,若有,直接「名字」即可,如x
类似如上的约定
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, 已同步至动态图 Tensor 和老 IR Varialbe
python/paddle/pir/math_op_patch.py
Outdated
>>> paddle.enable_static() | ||
|
||
>>> # create a static OpResult | ||
>>> with paddle.pir_utils.IrGuard(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里新加的接口如果和之前是一致的,这里可以去掉with paddle.pir_utils.IrGuard(),后期pir推广默认不需要这个guard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, 已全部删除
python/paddle/pir/math_op_patch.py
Outdated
>>> paddle.enable_static() | ||
|
||
>>> # create a static OpResult | ||
>>> with paddle.pir_utils.IrGuard(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
python/paddle/pir/math_op_patch.py
Outdated
>>> paddle.enable_static() | ||
|
||
>>> # create a static OpResult | ||
>>> with paddle.pir_utils.IrGuard(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
…operty # Conflicts: # python/paddle/pir/math_op_patch.py
|
PR types
Others
PR changes
Others
Description
添加
place
(warnings)、ndimension
、dim
、ndim
、item
方法相关链接: