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

Add checking for address of gradients when release_grad is enabled. #64460

Merged
merged 1 commit into from
May 22, 2024

Conversation

Xreki
Copy link
Contributor

@Xreki Xreki commented May 20, 2024

PR Category

Distributed Strategy

PR Types

Improvements

Description

Pcard-70444

release_grad功能会在优化器执行完毕后释放梯度的显存占用,以达到减少显存峰值的目的。当Tensor Fusion等优化同时开启时,会在梯度累加的第0步重新Fuse梯度,要求后续acc_steps - 1步梯度地址保持不变。该PR加上对应的梯度地址检查逻辑,保证#63433 修复的问题可以报错。

Copy link

paddle-bot bot commented May 20, 2024

你的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.

Copy link
Member

@ForFishes ForFishes left a comment

Choose a reason for hiding this comment

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

LGTM

@Xreki Xreki merged commit 0d3fe4e into PaddlePaddle:develop May 22, 2024
31 of 32 checks passed
@Xreki Xreki deleted the dist/add_address_check branch May 22, 2024 03:31
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