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

[Dist] Enable FSDP on CPU #112145

Closed
wants to merge 3 commits into from

Conversation

rohan-varma
Copy link
Member

@rohan-varma rohan-varma commented Oct 26, 2023

Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 26, 2023

🔗 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 (image):

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.

@github-actions github-actions bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Oct 26, 2023
rohan-varma added a commit that referenced this pull request Oct 26, 2023
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/)

ghstack-source-id: 205424565
Pull Request resolved: #112145
Copy link
Contributor

@fegin fegin left a 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:
Copy link
Contributor

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

@XilunWu XilunWu self-requested a review October 31, 2023 21:20
Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/)

cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Nov 6, 2023
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]
rohan-varma added a commit that referenced this pull request Nov 6, 2023
Pull Request resolved: #112145


ghstack-source-id: 206641812
@exported-using-ghexport

Differential Revision: [D50688958](https://our.internmc.facebook.com/intern/diff/D50688958/)
@rohan-varma
Copy link
Member Author

@pytorchbot merge -f "Ci failures are flaky"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
@facebook-github-bot facebook-github-bot deleted the gh/rohan-varma/745/head branch November 10, 2023 15:24
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
@awgu
Copy link
Contributor

awgu commented Nov 14, 2023

@rohan-varma Is this CPU FSDP only for testing, or is it numerically correct?

@rohan-varma
Copy link
Member Author

@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?

awgu added a commit that referenced this pull request Nov 22, 2023
…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]
awgu added a commit that referenced this pull request Nov 22, 2023
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]
awgu added a commit that referenced this pull request Nov 22, 2023
…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]
awgu added a commit that referenced this pull request Nov 22, 2023
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]
pytorchmergebot pushed a commit that referenced this pull request Nov 22, 2023
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
xunsongh pushed a commit to xunsongh/pytorch that referenced this pull request Nov 24, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged module: cpu CPU specific problem (e.g., perf, algorithm) release notes: distributed (fsdp) release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants