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.8] Update rearrange_load_instruction pass #70437

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

LittleHeroZZZX
Copy link
Contributor

PR Category

CINN

PR Types

Improvements

Description

Update rearrange_load_instruction pass

Copy link

paddle-bot bot commented Dec 24, 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 24, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Dec 25, 2024
Comment on lines +207 to +213
struct LoadReplacer : public ir::IRMutator<>, public ir::stmt::StmtMutator<> {
explicit LoadReplacer(const std::unordered_map<std::string, ir::Var>& var_map)
: var_map_(var_map) {}

void operator()(ir::Expr* expr) { ir::IRMutator<>::Visit(expr, expr); }

void operator()(StmtRef stmt) { ir::stmt::StmtMutator<>::VisitStmt(stmt); }
Copy link
Contributor

Choose a reason for hiding this comment

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

如果对于所有stmt都是一样的,只修改其中包含的expr,可以直接用ExprPass来完成

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个不能把LoadReplacer拆成专门的pass吧,这里还是依赖前一步的映射表的

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.

3 participants