-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Guard on at::Tensor device index #91779
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/91779
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 3 PendingAs of commit 664e89d: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: 2 additional jobs have failed, first few of them are: trunk ,trunk / linux-focal-rocm5.3-py3.8 / test (default, 1, 2, linux.rocm.gpu) Details for Dev Infra teamRaised by workflow job |
|
We should merge this as is but I feel like it would be better if compiled subgraphs that don't involve DtoD transfers can be device agnostic. Certainly this is no problem for CUDA, nor Triton I assume |
|
It is kind of a problem for triton, because currently it's set up to load compiled code to the current device on the first run, and this logic will need to be refactored if we need to possibly load the code to other devices on subsequent runs, the logic for codegening device guards will also need to be redone, and I'm not quite sure how it should look like. It's also tricky for heterogeneous systems. So, given we don't expect this situation to happen too often I think recompiling is ok. |
|
@voznesenskym is there a test forthcoming or should we land this? |
|
IMO, the most likely situation this would happen is if someone tries to optimize (non-Distributed) DataParallel with torch.compile. I know we tell people not to use DataParallel but honestly with torch.compile its not clear to me the reasoning behind this recommendation still stands. Using PT2 to get single process multi gpu working performantly would be pretty slick. |
I was torn on it - I had a test but it was ugly and felt like it was testing a bunch of other stuff. I got rejected for some failures, so might as well test. |
|
@pytorchbot rebase |
|
@pytorchbot successfully started a rebase job. Check the current status here |
|
Successfully rebased |
4cf40e2 to
43475f9
Compare
|
Why does it have to be ugly? It could be as simple as |
I wanted to assert which guard failed, but I remember I added guard_failure_fn. NVM, it need not be ugly. |
|
Uhh annoying - we don't have cuda:0/cuda:1 - getting invalid device errors. Might need to move this to a different suite |
|
Cuda 1/0 needs |
|
@pytorchbot merge -f "weird unrelated failure with pip install deps on windows jobs" |
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 |
Fixes #91777
cc @mlazos @soumith @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @chunyuan-w @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire