-
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
[replicate] support simpler device_id #100217
Conversation
Allow passing in `device_id=[device]` regardless of CPU or GPU. We modify the kwarg as needed to pass to DDP. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/100217
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 2954569: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Allow passing in `device_id=[device]` regardless of CPU or GPU. We modify the kwarg as needed to pass to DDP. ghstack-source-id: e2716d05b97be882ad05c6635f233ebf1e395bdb Pull Request resolved: #100217
This PR needs a labelIf your changes are user facing and intended to be a part of release notes, please use a label starting with If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see |
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.
Stamp to unblock, but this needs two minor changes (lint and test decorator)
@@ -213,6 +214,49 @@ def test_replicate_with_kwargs(self): | |||
) | |||
self._compare_module(model, replicate_model) | |||
|
|||
def test_replicate_device_id(self): |
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.
AssertionError: Torch not compiled with CUDA enabled
def test_replicate_device_id(self): | |
@skip_if_lt_x_gpu(2) | |
def test_replicate_device_id(self): |
@@ -1,4 +1,5 @@ | |||
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple |
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: Run lint for this file.
Allow passing in `device_id=[device]` regardless of CPU or GPU. We modify the kwarg as needed to pass to DDP. [ghstack-poisoned]
Allow passing in `device_id=[device]` regardless of CPU or GPU. We modify the kwarg as needed to pass to DDP. ghstack-source-id: 626353f80a6271f526f562fcc51d3ee308570e2f Pull Request resolved: #100217
@pytorchbot merge -f "CI done" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
Allow passing in
device_id=[device]
regardless of CPU or GPU. Wemodify the kwarg as needed to pass to DDP.