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

Preserve parameter names in the torch autograd path #79

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

IvanYashchuk
Copy link
Collaborator

Currently, FSDP bucketing relies on parameter names to determine parameters coming from the same nn.Module and group them together. If we don't preserve parameter names, then bucketing is broken. This PR fixes that and adds a test.

Copy link
Collaborator

@crcrpar crcrpar left a comment

Choose a reason for hiding this comment

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

maybe it'd be nice to have a new test in test_ddp.py to make sure bucketing does pack multiple tensors into one so that future regressions can be detected a bit easier.

Copy link
Collaborator

@t-vi t-vi left a comment

Choose a reason for hiding this comment

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

Seems good do me. Thank you @IvanYashchuk @crcrpar

@t-vi t-vi merged commit 2ea1933 into Lightning-AI:main Mar 26, 2024
37 checks passed
@IvanYashchuk IvanYashchuk deleted the preserve-weight-names branch April 18, 2024 09:52
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.

3 participants