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

BF16 optimizer: Clear lp grads after updating hp grads in hook #5328

Merged
merged 2 commits into from Apr 2, 2024

Conversation

YangQun1
Copy link
Contributor

@YangQun1 YangQun1 commented Mar 28, 2024

This fix is to solve:

  • Previous iteration's lp grads will still alive during the next iteration's forward. This increases the memory footprint.
  • The hook behavior is not aligned to its name accumulate_hp_grads_and_remove_lp

@YangQun1
Copy link
Contributor Author

YangQun1 commented Apr 1, 2024

Hi @mrwyattii @tjruwase , could you help to review this change?

@tjruwase tjruwase added this pull request to the merge queue Apr 1, 2024
Merged via the queue into microsoft:master with commit 40009eb Apr 2, 2024
12 checks passed
rraminen pushed a commit to ROCm/DeepSpeed that referenced this pull request May 9, 2024
…soft#5328)

This fix is to solve:

- Previous iteration's lp grads will still alive during the next
iteration's forward. This increases the memory footprint.
- The hook behavior is not aligned to its name
accumulate_hp_grads_and_remove_lp

Co-authored-by: qunyang <quyang@habana.ai>
Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
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

3 participants