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

[replicate] support simpler device_id #100217

Closed
wants to merge 2 commits into from

Conversation

rohan-varma
Copy link
Member

@rohan-varma rohan-varma commented Apr 27, 2023

Stack from ghstack (oldest at bottom):

Allow passing in device_id=[device] regardless of CPU or GPU. We
modify the kwarg as needed to pass to DDP.

Allow passing in `device_id=[device]` regardless of CPU or GPU. We
modify the kwarg as needed to pass to DDP.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Apr 27, 2023

🔗 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 Failures

As of commit 2954569:
💚 Looks good so far! There are no failures yet. 💚

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

rohan-varma added a commit that referenced this pull request Apr 27, 2023
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
@github-actions
Copy link

This PR needs a label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

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.

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):
Copy link
Contributor

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
Suggested change
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
Copy link
Contributor

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]
rohan-varma added a commit that referenced this pull request May 4, 2023
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
@rohan-varma
Copy link
Member Author

@pytorchbot merge -f "CI done"

@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).

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/rohan-varma/674/head branch June 8, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants