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

[cherry-pick]fix the bug in repeated_fc_relu_fuse_pass. (#33386) #33431

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

winter-wang
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Describe

在repeated_fc_relu_fuse_pass里面,检测一个Variable节点是不是fc 算子的参数时,认为该Variable节点只会被一个算子使用,所以直接去拿Variable节点的第一个输出算子的参数进行对比。
当该Variable同时被多个算子使用时,它的第一个输出算子不一定是fc算子。通过该算子去拿参数时,就会因为相应的参数不存在而直接崩溃。
在本次pr中,改为遍历Variable节点的所有输出算子,先判断算子类型是不是fc,再进行下一步。

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 8, 2021

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

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 c4a417f into PaddlePaddle:release/2.1 Jun 10, 2021
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