-
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
[New-IR] add pass registry #56729
[New-IR] add pass registry #56729
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
7233626
to
4d29549
Compare
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
@@ -514,7 +508,8 @@ void BindPassManager(pybind11::module *m) { | |||
py::arg("opt_level") = 2) | |||
.def("add_pass", | |||
[](PassManager &self, std::string pass_name) { |
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.
std::string作为函数参数,最好还是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.
fix it in the next pr
) # apply pass to elimitate dead code | ||
pm.run(new_program) | ||
op_names = [op.name() for op in new_program.block().ops] | ||
# print(op_names) | ||
# TODO(zhiqiu): unify the name of pass |
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.
可以考虑所有的pass name都统一改为小写加下划线形式
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.
fix it in the next pr
* add pass registry * add pass registry macro
PR types
New features
PR changes
Others
Description
[New-IR] add pass registry
Pcard-67164