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 conv + bn fuse pattern, and other works #54933

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

yuanlehome
Copy link
Contributor

@yuanlehome yuanlehome commented Jun 28, 2023

PR types

Others

PR changes

Others

Description

Pcard-71500

  • 在新 IR/PASS 体系下添加 conv2d + batch_norm fuse pattern demo
  • pass前后支持验证ir的正确性
  • 新增对ir处理的通用函数源文件,为保证依赖的正确性,将其放在fluid/ir/transforms目录下,transfroms目录由原pass目录更名而来,以便之后防止各方向pass实现。

fix pr: #55073

@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.

@yuanlehome yuanlehome closed this Jun 28, 2023
@yuanlehome yuanlehome reopened this Jun 28, 2023
@yuanlehome yuanlehome changed the title [IR&PASS] add conv + bn fuse pattern [IR&PASS] add conv + bn fuse pattern, and other works Jun 29, 2023
@jiweibo
Copy link
Contributor

jiweibo commented Jun 29, 2023

贴下IR变化前后的表示吧

rewriter.Build<paddle::dialect::DivideOp>(bn_scale_result,
sqrt_op.out());

// reshape scale
Copy link
Contributor

Choose a reason for hiding this comment

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

对于存在broadcast需求的权重计算,可以看下能不能把语义也隐藏到特定op之下

@yuanlehome
Copy link
Contributor Author

贴下IR变化前后的表示吧

前:
image

后:
image

@yuanlehome yuanlehome force-pushed the pass_infra_part_7 branch 3 times, most recently from 81da93a to 3f94dc4 Compare June 29, 2023 12:28
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

Copy link
Contributor

@jiweibo jiweibo left a comment

Choose a reason for hiding this comment

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

LGTM

TODO:权重折叠

Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@jiweibo jiweibo merged commit 19345fa into PaddlePaddle:develop Jun 30, 2023
26 of 27 checks passed
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.

None yet

5 participants