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

[IR&Pass] Add DCE Pass for new ir. #54935

Merged
merged 3 commits into from
Jun 28, 2023
Merged

Conversation

jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Jun 28, 2023

PR types

Others

PR changes

Others

Description

Pcard-71500

Add a naive implementation DCE Pass just for ResNet50 model test.

@paddle-bot
Copy link

paddle-bot bot commented Jun 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.

@@ -40,6 +40,7 @@ endif()
add_subdirectory(core)
add_subdirectory(pass)
add_subdirectory(pattern_rewrite)
add_subdirectory(transforms)
Copy link
Contributor

Choose a reason for hiding this comment

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

transforms目录下再细分为各方向pass目录?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

可以考虑这么组织

file(GLOB PATTERN_SRCS "*.cc")

ir_library(ir_builtin_transforms SRCS ${PATTERN_SRCS} DEPS ir_core
ir_pattern_rewrite)
Copy link
Contributor

Choose a reason for hiding this comment

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

DEPS 少了个 ir_pass ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

namespace ir {
class Pass;

IR_API std::unique_ptr<Pass> CreateDCEPass();
Copy link
Contributor

@winter-wang winter-wang Jun 28, 2023

Choose a reason for hiding this comment

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

这种是不是命名为CreateDcePass更合适啊?
google style命名约定

Copy link
Contributor Author

Choose a reason for hiding this comment

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

收到,下个pr修改

@yuanlehome
Copy link
Contributor

DCE pass的单测单独开个文件夹文件?之后加的每个pass不能都放这一个里...

@jiweibo
Copy link
Contributor Author

jiweibo commented Jun 28, 2023

DCE pass的单测单独开个文件夹文件?之后加的每个pass不能都放这一个里...

嗯,公用Pass单独放,单测(构造起来挺麻烦的)单独放

Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM overall

@jiweibo jiweibo merged commit 7ace52b into PaddlePaddle:develop Jun 28, 2023
@jiweibo jiweibo deleted the pass_sim branch June 28, 2023 13:06
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.

3 participants