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.7] Update merge_block_utils #70406

Merged

Conversation

LittleHeroZZZX
Copy link
Contributor

PR Category

CINN

PR Types

Improvements

Description

改造了merge_block_utils

Copy link

paddle-bot bot commented Dec 23, 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 23, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Dec 23, 2024
Comment on lines +37 to 47
struct ForInfoAnalyzer {
public:
void operator()(ir::Expr* expr) { ir::IRMutator<>::Visit(expr, expr); }
void operator()(const For& for_stmt) { Visit(for_stmt); }

ForTreeNode BuildTreeNode(const ir::For* node) {
ForTreeNode BuildTreeNode(const For& node) {
ForTreeNode tree_node = {node, std::vector<ForTreeNode>()};
for (const auto for_node : for_to_children_[node]) {
tree_node.children.push_back(BuildTreeNode(for_node));
for (const For& stmt : for_to_children_[node]) {
tree_node.children.push_back(BuildTreeNode(stmt));
}
return tree_node;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

可以尝试使用一下Paddle/paddle/cinn/ir/stmt_visitors.h的Visit函数来分析收集信息

Copy link
Contributor

Choose a reason for hiding this comment

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

这里暂时不用考虑if内的for,可以不修改,后续 @Dmovic 再扩展

@Hongqing-work Hongqing-work merged commit b3afa7b into PaddlePaddle:develop Dec 24, 2024
28 checks passed
@LittleHeroZZZX LittleHeroZZZX deleted the dev_merge_block_utils branch December 24, 2024 03:42
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