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

matmul use fp32 compute_type #8733

Merged
merged 1 commit into from
Dec 29, 2022
Merged

Conversation

zhangting2020
Copy link
Contributor

修复rec v3模型amp训练精度偏低问题:由于该模型中matmul调用BatchedGEMM,框架默认使用FP16累加因此会损失精度。

本PR通过环境变量FLAGS_gemm_use_half_precision_compute_type=False,使BatchedGEMM使用FP32累加,AMP-O1和O2可达到精度对齐。

@paddle-bot
Copy link

paddle-bot bot commented Dec 29, 2022

Thanks for your contribution!

@WenmuZhou WenmuZhou merged commit 4f735db into PaddlePaddle:dygraph Dec 29, 2022
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

2 participants