Skip to content

Conversation

@awgu
Copy link

@awgu awgu commented Feb 29, 2024

What does this PR do?

Fixes # (issue).

Before submitting

  • Did you have fun?
    • Make sure you had fun coding 🙃
  • Did you read the contributor guideline?
  • Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
    • N/A
  • Did you make sure to update the docs?
    • N/A
  • Did you write any new necessary tests?
    • N/A
  • Did you update the changelog? (if needed)
    • N/A

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 29, 2024
# On the first call, compute the actual nb_calls and buffer
# nb_calls = sum(torch._C._will_engine_execute_node(g) for g in grad_fns) # type: ignore[attr-defined]

# NOTE: To avoid resharding too early when microbatches share
Copy link
Author

Choose a reason for hiding this comment

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

Here is the main change.

@awgu awgu marked this pull request as ready for review April 1, 2024 18:08
@awgu awgu merged commit 5faca97 into facebookresearch:ngoyal_changes_for_pp_fp8_jiecaoyu_free_fp16_shard Apr 1, 2024
chrisxcai pushed a commit that referenced this pull request May 15, 2024
* Changed to only run reshard hook if all gradients computed

* Fix decreasing it/s with multi-grad hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants