CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[CINN]Unify compilation of broadcast group and other groups #66768
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]Unify compilation of broadcast group and other groups #66768
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -197,7 +197,7 @@ class OpLoweringGroup { | |||
this->alignment_schedule_info_ = alignment_schedule_info; | |||
} | |||
|
|||
std::shared_ptr<OpLoweringGroup> Clone(const int& group_idx) const; | |||
std::shared_ptr<OpLoweringGroup> Clone(const std::string name_suffix) const; |
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.
const std::string&
直接传const T仍然会有拷贝
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.
LGTM for const_cast
PirCompiler pir_compiler(cinn::common::DefaultDeviceTarget()); | ||
pir_compiler.BuildBroadcastTree(group_list, group_info.second); | ||
continue; |
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.
这个分支的处理与68行不是同一类,看上去不太协调
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.
这个文件是不和最新的流程已经不匹配了?
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.
匹配的,目前只对外提供一个接口:即获取可以使用控制流优化的broadcast groups。
这个文件主要完成将broadcast origin group的信息转换为broadcast tree,最后压平成为一组broadcast groups的功能,这些broadcast group对应的host func将会按照控制流组织起来放入switch host func中。
GroupDimExprInfo group_dim_expr_info = GetGroupDimExprInfo(group); | ||
return group_dim_expr_info.all_value_dim_exprs; | ||
}(); | ||
UpdateGroupShapeOrDataExprs(const_cast<OpLoweringGroupPtr&>(group)); |
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.
将broadcast的编译放到pre-analysis,还需要更新group的符号映射map吗?
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.
非cache版本需要更新映射
…ddle#66768) * [CINN]Unify compilation of broadcast group and other groups * fix
PR Category
CINN
PR Types
Improvements
Description
Pcard-67164
This PR unifies compilation of broadcast group and other groups.