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

[New-IR] add pass registry #56729

Merged
merged 2 commits into from
Aug 29, 2023
Merged

Conversation

zhiqiu
Copy link
Contributor

@zhiqiu zhiqiu commented Aug 28, 2023

PR types

New features

PR changes

Others

Description

[New-IR] add pass registry
Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Aug 28, 2023

你的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.

@zyfncg zyfncg requested a review from yuanlehome August 29, 2023 09:46
Copy link
Contributor

@yuanlehome yuanlehome left a 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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

std::string作为函数参数,最好还是const&吧

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

可以考虑所有的pass name都统一改为小写加下划线形式

Copy link
Contributor Author

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

@zhiqiu zhiqiu merged commit 9999e84 into PaddlePaddle:develop Aug 29, 2023
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
* add pass registry

* add pass registry macro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants