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

temporarily fix advanced-setitem grad error #57737

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

zoooo0820
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Description

Pcard-66985

#57023 中,由于动态图下stride机制的支持,针对高级索引赋值的场景,移除了一次多余的set_value OP操作。即流程由 基础索引get -> index_put获取高级索引赋值结果 -> set_value回写 变为 基础索引get到原tensor的view -> index_put_在view上执行inplace赋值

上述修改在目前的动态图反向机制上存在一定问题,反向只以被赋值节点作为出发点,这导致index_put_等操作只完成了前向过程中修改值的功能,但并未参与到反向,导致部分模型无法收敛。经讨论,这个问题需要在 #57628 中修复,但由于涉及整体反向机制,需要一些时间。

因此这个PR将高级索引赋值改回此前的流程,执行一次额外的set_value赋值,保证前序操作均在反向流程中。当上述机制问题修复后再移除

@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.

@zhwesky2010 zhwesky2010 merged commit 8abb036 into PaddlePaddle:develop Sep 26, 2023
@zoooo0820 zoooo0820 deleted the add_extra_set_value branch September 26, 2023 08:25
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.

2 participants