-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[CINN][Backend Pass Update No.3] Update extern_call_process pass #70191
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
请先完成对应的注释任务 |
paddle/cinn/optim/optimize.cc
Outdated
// ExternCallMultiOutputShallowStore(&copied->body); | ||
BlockPassManager pass_manager; | ||
pass_manager.AddPass(CreateExternCallMultiOutputShallowStorePass()); | ||
pass_manager.AddPass(CreateExternCallRemoveTupleGetStatementsPass()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExternCallRemoveTupleGetStatements没有使用,且之前没有实现,可以不实现并删除
if (call && call->is_extern_call() && !call->write_args.empty()) { | ||
new_stmts.emplace_back(store_op->value); | ||
} else { |
There was a problem hiding this comment.
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包装一下
等到加注释任务合入后可以将注释迁移一下,建议是直接将原头文件重命名然后加上新的修改,这样commit能自动绑定映射一下 |
好的 |
6d830fd
to
6e526f5
Compare
// ExternCallMultiOutputShallowStore(&copied->body); | ||
BlockPassManager pass_manager0; | ||
pass_manager0.AddPass(CreateExternCallMultiOutputShallowStorePass()); | ||
pass_manager0.Run(copied); | ||
VLOG(10) << "After Optimize ExternCallMultiOutputShallowStore and " | ||
"ExternCallRemoveTupleGetStatements:" | ||
<< copied; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里打印可以之后的PR再顺带修改一下,注释也可以删除了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里打印可以之后的PR再顺带修改一下,注释也可以删除了
好的
PR Category
CINN
PR Types
Improvements
Description
改造了 extern_call_process Pass