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

fix the XXX_GRAD_CASE bug by HexToString #32004

Merged
merged 9 commits into from
Apr 8, 2021

Conversation

HexToString
Copy link
Contributor

PR types

Bug fixes

PR changes

OPs

Describe

修复厂内用户发现的expand_v2、tile两个OP反向梯度求解,当shape维度为6时,返回梯度信息为None的bug
代码搜查同时发现其他四个OP:expand、expand_as、expand_as_v2、meshgrid存在同样问题一并修复。
问题原因:
BOOST_PP_REPEAT()是个高级宏,会生成从0-(N-1)的传入的下面的宏,当传入n=6时候,宏展开生成的代码中包含0-5的case
而代码中,switch-case的判断变量dims取的是size,取值范围为1-6,故当取6时候,找不到对应的case.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Apr 1, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@CLAassistant
Copy link

CLAassistant commented Apr 1, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@Superjomn Superjomn left a comment

Choose a reason for hiding this comment

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

LGTM

@Superjomn Superjomn merged commit f74f976 into PaddlePaddle:develop Apr 8, 2021
@HexToString HexToString deleted the develop branch July 11, 2022 02:05
@HexToString HexToString restored the develop branch July 11, 2022 02:08
@HexToString HexToString deleted the develop branch March 6, 2023 13:14
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