-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Prim] Simplify bn vjp #54012
[Prim] Simplify bn vjp #54012
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
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
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.
为什么这样修改,需要牺牲计算时间吗
cinn在算子融合的时候x_sub_mean这个变量在多个不同的group的里面由于同时引用,会生成多次缓存,通过recompute,可以优化显存使用,实测resnet50速度也有提升 |
* recompute bn grad * fix test case --------- Co-authored-by: sunli <466530738@qq.com>
PR types
Performance optimization
PR changes
Others
Description
Pcard-66975
Merge pr #53673.
To recompute part of batch_norm's vjp rule, in order to improve performance of CINN by enhancing op fusion.