Skip to content

Conversation

@thisjiang
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

BuildCinnPass为图中传过来的kSkipGcVarNames添加fetch op以避免临时变量被消除。

@paddle-bot
Copy link

paddle-bot bot commented Jan 4, 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.

bool is_only_used_internal = true;
// And should not in skip gc var
bool is_only_used_internal = !skip_gc_var_names.count(var_node->Name());
for (auto* next_op_node : var_node->outputs) {
Copy link
Contributor

Choose a reason for hiding this comment

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

若 is_only_used_internal = False, 这里的for循环是不是可以提前break?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

的确可以,感谢提醒,我改下

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

@Aurelius84 Aurelius84 merged commit c1ce54b into PaddlePaddle:develop Jan 5, 2023
@thisjiang thisjiang deleted the add_fetch_op_for_skip_gc_vars branch January 5, 2023 07:01
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