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

[CINN][Backend Pass Update No.3] Update extern_call_process pass #70191

Merged

Conversation

Albresky
Copy link
Contributor

PR Category

CINN

PR Types

Improvements

Description

改造了 extern_call_process Pass

Copy link

paddle-bot bot commented Dec 12, 2024

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label Dec 12, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Dec 13, 2024
@luotao1
Copy link
Contributor

luotao1 commented Dec 13, 2024

请先完成对应的注释任务

// ExternCallMultiOutputShallowStore(&copied->body);
BlockPassManager pass_manager;
pass_manager.AddPass(CreateExternCallMultiOutputShallowStorePass());
pass_manager.AddPass(CreateExternCallRemoveTupleGetStatementsPass());
Copy link
Contributor

Choose a reason for hiding this comment

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

ExternCallRemoveTupleGetStatements没有使用,且之前没有实现,可以不实现并删除

Comment on lines 31 to 33
if (call && call->is_extern_call() && !call->write_args.empty()) {
new_stmts.emplace_back(store_op->value);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

call现在是个Expr,如果要它脱离store成为一条stmt需要使用Evaluate stmt包装一下

@Hongqing-work
Copy link
Contributor

等到加注释任务合入后可以将注释迁移一下,建议是直接将原头文件重命名然后加上新的修改,这样commit能自动绑定映射一下

@Albresky
Copy link
Contributor Author

等到加注释任务合入后可以将注释迁移一下,建议是直接将原头文件重命名然后加上新的修改,这样commit能自动绑定映射一下

好的

@Albresky Albresky force-pushed the cinn-pass-extern_call_process branch 2 times, most recently from 6d830fd to 6e526f5 Compare December 25, 2024 03:09
Comment on lines +102 to +108
// ExternCallMultiOutputShallowStore(&copied->body);
BlockPassManager pass_manager0;
pass_manager0.AddPass(CreateExternCallMultiOutputShallowStorePass());
pass_manager0.Run(copied);
VLOG(10) << "After Optimize ExternCallMultiOutputShallowStore and "
"ExternCallRemoveTupleGetStatements:"
<< copied;
Copy link
Contributor

Choose a reason for hiding this comment

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

这里打印可以之后的PR再顺带修改一下,注释也可以删除了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里打印可以之后的PR再顺带修改一下,注释也可以删除了

好的

@Hongqing-work Hongqing-work merged commit 86d6c88 into PaddlePaddle:develop Dec 26, 2024
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants