Skip to content

[cherry-pick] fix save inference model conditional op (#37579) #38739

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

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

JZZ-NOTE
Copy link
Contributor

@JZZ-NOTE JZZ-NOTE commented Jan 6, 2022

PR types

Others

PR changes

Others

Describe

更新剪裁逻辑:
在以下三种情况,op 会被保留下来:

op 是 target,函数 IsTarget 判断
op 有 dependent outputs,即 op 在 feed 和 target 的通路上,函数 HasDependentOutputVar 判断
除了以上两种情况以外,涉及到 subblock 的 op 需要特殊处理。如果 op 有 subblock 或者在 subblock 中,并且 op 的 output vars 中有 feed vars,这样的 op 也需要保留下来。函数 IsSubBlockDependent 判断

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jan 6, 2022

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 f2a3405 into PaddlePaddle:release/2.2 Jan 12, 2022
@JZZ-NOTE JZZ-NOTE deleted the jzz_2.2_prune branch March 17, 2022 09:26
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