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

[ Dy2Static ] fix bugs in prepare_gradient_aggregation #45268

Conversation

2742195759
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

修复了一些段错误的问题,之前的prepare_gradient_aggregation没有考虑到动转静会跳过append backward中插入的一些成对的shape + fill_constant的Op,因此会找到这类fill constant,所以出现段错误,具体的在RunProgramGradKernel中。

TODO:直接在Program中进行删除,减少这种表示和执行的差异(trick方法),可以减少系统的复杂度。希望Python端最后执行的Program是啥样,跑的就是啥样,C++端进行选择跳过容易造成后续人员的误解。

@paddle-bot
Copy link

paddle-bot bot commented Aug 19, 2022

你的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.

@2742195759 2742195759 changed the title fix bugs in prepare_gradient_aggregation [ Dy2Static ] fix bugs in prepare_gradient_aggregation Aug 19, 2022
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

@2742195759 2742195759 merged commit c7027d9 into PaddlePaddle:develop Aug 19, 2022
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.

2 participants