-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[FSDP] Consolidate FSDP state_dict offload_to_cpu settings #86211
Conversation
Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/) [ghstack-poisoned]
|
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86211
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0798b95: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/) ghstack-source-id: 169306202 Pull Request resolved: #86211
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Do we need to update the appropriate documentation anywhere?
_UNFLATTENED_STATE_DICT_IMPLS = ["state_dict", "sharded_state_dict"] | ||
_FLATTENED_STATE_DICT_IMPLS = ["local_state_dict"] | ||
_UNFLATTENED_STATE_DICT_IMPLS = ["state_dict"] | ||
_FLATTENED_STATE_DICT_IMPLS = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is local_state_dict out of this flattened state_dict impls list? Isn't still a flattened version of state_dict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, accidentally commit this change. Will revert it.
else: | ||
config = None | ||
raise ValueError("Unspported state_dict_type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
raise ValueError("Unspported state_dict_type") | |
raise ValueError("Unsupported state_dict_type") |
Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/) [ghstack-poisoned]
Pull Request resolved: #86211 Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. ghstack-source-id: 169442813 Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/)
Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/) [ghstack-poisoned]
Pull Request resolved: #86211 Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. ghstack-source-id: 170025910 Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/)
Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/) [ghstack-poisoned]
Pull Request resolved: #86211 Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now have offload_to_cpu options. ghstack-source-id: 170308168 Differential Revision: [D40065969](https://our.internmc.facebook.com/intern/diff/D40065969/)
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Hey @fegin. |
Stack from ghstack (oldest at bottom):
Consolidate FSDP state_dict offload_to_cpu settings. All state_dict_types now
have offload_to_cpu options.
Differential Revision: D40065969