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

[PIR] Adapt paddle.assign to pir #57780

Merged
merged 4 commits into from
Sep 27, 2023

Conversation

YuanRisheng
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Pcard-67164
适配paddle.assign满足新ir

@paddle-bot
Copy link

paddle-bot bot commented Sep 26, 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.

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM overall。最后一个comment可否确认下?

)
dtype = core.DataType.FLOAT32

if dtype == core.VarDesc.VarType.BOOL or dtype == core.DataType.BOOL:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if dtype == core.VarDesc.VarType.BOOL or dtype == core.DataType.BOOL:
if dtype in [core.VarDesc.VarType.BOOL, core.DataType.BOOL]:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

感谢,下个pr修改

_current_expected_place(),
)
if in_dynamic_mode():
_C_ops.assign_value_(
Copy link
Contributor

Choose a reason for hiding this comment

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

这里动态图下没有返回么?还是说其实返回了output本身。如果是后者的话,其实这里可以统一成一个分支?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

动态图没返回,因为是inplace的,而新IR下inplace是需要返回一个新value来表示的,故拆成俩个分支

@YuanRisheng YuanRisheng merged commit 3627571 into PaddlePaddle:develop Sep 27, 2023
27 checks passed
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants