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

[FSDP][optim_state_dict] Add device to _shard_utils.py to explicitly use the device from fsdp_state #109631

Closed
wants to merge 3 commits into from

Conversation

fegin
Copy link
Contributor

@fegin fegin commented Sep 19, 2023

Stack from ghstack (oldest at bottom):

_get_pg_default_device does not always get the device we want. This PR let the user explicitly tell use the correct device.

Differential Revision: D49425743

…use the device from fsdp_state

_get_pg_default_device does not always get the device we want. This PR let the user explicitly tell use the correct device.

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

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 19, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/109631

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 73d4909 with merge base 71b4b32 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: distributed (fsdp) release notes category label Sep 19, 2023
fegin added a commit that referenced this pull request Sep 19, 2023
…use the device from fsdp_state

_get_pg_default_device does not always get the device we want. This PR let the user explicitly tell use the correct device.

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

ghstack-source-id: 201220846
Pull Request resolved: #109631
@fegin fegin added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 19, 2023
Copy link
Contributor

@awgu awgu left a comment

Choose a reason for hiding this comment

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

Approved internally!

Copy link
Contributor

@fduwjj fduwjj left a comment

Choose a reason for hiding this comment

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

LGTM and please make sure the linter is happy

@wz337
Copy link
Contributor

wz337 commented Sep 19, 2023

LGTM!

…explicitly use the device from fsdp_state"

_get_pg_default_device does not always get the device we want. This PR let the user explicitly tell use the correct device.

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

[ghstack-poisoned]
fegin added a commit that referenced this pull request Sep 19, 2023
…use the device from fsdp_state

Pull Request resolved: #109631

_get_pg_default_device does not always get the device we want. This PR let the user explicitly tell use the correct device.
ghstack-source-id: 201245744
@exported-using-ghexport

Differential Revision: [D49425743](https://our.internmc.facebook.com/intern/diff/D49425743/)
…explicitly use the device from fsdp_state"

_get_pg_default_device does not always get the device we want. This PR let the user explicitly tell use the correct device.

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

[ghstack-poisoned]
fegin added a commit that referenced this pull request Sep 19, 2023
…use the device from fsdp_state

Pull Request resolved: #109631

_get_pg_default_device does not always get the device we want. This PR let the user explicitly tell use the correct device.
ghstack-source-id: 201254722
@exported-using-ghexport

Differential Revision: [D49425743](https://our.internmc.facebook.com/intern/diff/D49425743/)
@fegin
Copy link
Contributor Author

fegin commented Sep 19, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@facebook-github-bot facebook-github-bot deleted the gh/fegin/151/head branch September 23, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: distributed (fsdp) release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants