Skip to content
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

Merged
merged 9 commits into from
Oct 17, 2023

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Oct 12, 2023

PR types

Others

PR changes

Others

Description

添加place(warnings)、ndimensiondimndimitem 方法

相关链接:

@paddle-bot
Copy link

paddle-bot bot commented Oct 12, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Oct 12, 2023
@0x45f
Copy link
Contributor

0x45f commented Oct 16, 2023

hi田川,这里是否方便整理一个这样的列表:表里列出动态图Tensor、老IR下Varialbe、新IR下OpResult上patch的方法有哪些。这样我们可以直观的看到当前对齐的一个进度情况,可以整理一下发一个issue里~

0x45f
0x45f previously approved these changes Oct 16, 2023
Copy link
Contributor

@0x45f 0x45f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

)

@property
def _ndim_(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里最后为什么还有一个下划线,_item只有前下划线。可以统一一下,比如:

  1. 对于builtin 方法的映射,若有,可以「单下划线+名字+单下划线」,如 xx
  2. 对于 property 属性的映射,若有,可以「单下划线+名字」,如 _x
  3. 对于 方法的映射,若有,直接「名字」即可,如x

类似如上的约定

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, 已同步至动态图 Tensor 和老 IR Varialbe

>>> paddle.enable_static()

>>> # create a static OpResult
>>> with paddle.pir_utils.IrGuard():
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, 已全部删除

>>> paddle.enable_static()

>>> # create a static OpResult
>>> with paddle.pir_utils.IrGuard():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

>>> paddle.enable_static()

>>> # create a static OpResult
>>> with paddle.pir_utils.IrGuard():
Copy link
Contributor

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
@gouzil
Copy link
Member Author

gouzil commented Oct 16, 2023

hi田川,这里是否方便整理一个这样的列表:表里列出动态图Tensor、老IR下Varialbe、新IR下OpResult上patch的方法有哪些。这样我们可以直观的看到当前对齐的一个进度情况,可以整理一下发一个issue里~

#58118

@0x45f 0x45f merged commit c379f50 into PaddlePaddle:develop Oct 17, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants