-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[Dist] Enable FSDP on CPU #112145
[Dist] Enable FSDP on CPU #112145
Conversation
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/112145
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 71911f2 with merge base dd24e92 (): FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/) ghstack-source-id: 205424565 Pull Request resolved: #112145
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
pass | ||
|
||
|
||
class Event: |
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.
Let's add a comment to this class since it's technically a public API:
"""
N.B. This class only exists to facilitate device-agnostic code
"""
Maybe also need to add a doc entry for this
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
Pull Request resolved: #112145 ghstack-source-id: 206626309 @exported-using-ghexport Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/)
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
Pull Request resolved: #112145 ghstack-source-id: 206641812 @exported-using-ghexport Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/)
@pytorchbot merge -f "Ci failures are flaky" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/) Pull Request resolved: pytorch#112145 Approved by: https://github.com/fegin ghstack dependencies: pytorch#112144
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/) Pull Request resolved: pytorch#112145 Approved by: https://github.com/fegin ghstack dependencies: pytorch#112144
@rohan-varma Is this CPU FSDP only for testing, or is it numerically correct? |
@awgu I mostly landed it for testing and because some users were asking to use it in their testing use cases, but what do you mean by numerically correct? While we haven't done any correctness testing, none of the logic in FSDP is changed? |
…ing" This is a follow-up to #112145 to include a numerical parity test with DDP for CPU training. ``` python -m pytest test/distributed/fsdp/test_fsdp_misc.py -k test_fsdp_cpu_training -s ``` We should follow-up on https://github.com/pytorch/pytorch/pull/112145/files#r1375102283 at some point too. [ghstack-poisoned]
This is a follow-up to #112145 to include a numerical parity test with DDP for CPU training. ``` python -m pytest test/distributed/fsdp/test_fsdp_misc.py -k test_fsdp_cpu_training -s ``` We should follow-up on https://github.com/pytorch/pytorch/pull/112145/files#r1375102283 at some point too. [ghstack-poisoned]
…ing" This is a follow-up to #112145 to include a numerical parity test with DDP for CPU training. ``` python -m pytest test/distributed/fsdp/test_fsdp_misc.py -k test_fsdp_cpu_training -s ``` We should follow-up on https://github.com/pytorch/pytorch/pull/112145/files#r1375102283 at some point too. cc H-Huang kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l [ghstack-poisoned]
This is a follow-up to #112145 to include a numerical parity test with DDP for CPU training. ``` python -m pytest test/distributed/fsdp/test_fsdp_misc.py -k test_fsdp_cpu_training -s ``` We should follow-up on https://github.com/pytorch/pytorch/pull/112145/files#r1375102283 at some point too. cc H-Huang kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l [ghstack-poisoned]
This is a follow-up to #112145 to include a numerical parity test with DDP for CPU training. ``` python -m pytest test/distributed/fsdp/test_fsdp_misc.py -k test_fsdp_cpu_training -s ``` We should follow-up on https://github.com/pytorch/pytorch/pull/112145/files#r1375102283 at some point too. Pull Request resolved: #114372 Approved by: https://github.com/XilunWu
This is a follow-up to pytorch#112145 to include a numerical parity test with DDP for CPU training. ``` python -m pytest test/distributed/fsdp/test_fsdp_misc.py -k test_fsdp_cpu_training -s ``` We should follow-up on https://github.com/pytorch/pytorch/pull/112145/files#r1375102283 at some point too. Pull Request resolved: pytorch#114372 Approved by: https://github.com/XilunWu
Stack from ghstack (oldest at bottom):
Differential Revision: D50688958
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10