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

[CINN] temp fix batch_norm check as inplace op bug #49738

Merged

Conversation

thisjiang
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Describe

【临时方案】
修复batch_norm算子由于输出MeanOutVarianceOut的变量与输入MeanVariance完全一样,被识别成了inplace op,导致batch_norm在子图划分的时候被判定为了CINN不支持算子的BUG(#46843 ),修复后PaddleClas Resnet50子图数目由56减少为6,且精度由不收敛变为收敛:
image

该问题的根本原因在于CINN不支持inplace操作,且当前对于batch_normMeanOutVarianceOut变量采用的是覆盖操作,而这会导致如下问题,此问题对batch_norm的精度是有影响的,亟待解决:
1c004eef0894a990a0e5b32e4eb3d872

@paddle-bot
Copy link

paddle-bot bot commented Jan 11, 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.

@Shixiaowei02 Shixiaowei02 merged commit ce57365 into PaddlePaddle:develop Jan 12, 2023
@thisjiang thisjiang deleted the fix_batch_norm_inplace_skip_bug branch January 12, 2023 03:04
yjjiang11 pushed a commit to yjjiang11/Paddle that referenced this pull request Jan 13, 2023
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