Skip to content

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.

@zhiqiu zhiqiu force-pushed the dev/add_pass_registry branch from 7233626 to 4d29549 Compare August 28, 2023 13:40
@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

},
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

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