Skip to content

Conversation

williamwen42
Copy link
Member

@williamwen42 williamwen42 commented May 31, 2023

Stack from ghstack (oldest at bottom):

Fixes pytest ./generated/test_yizhou_wang_RODNet.py -k test_000 failure in #92670.

FakeTensor would raise an error upon trying to run aten.copy with inputs with different devices, although this is allowed behavior.

Also fix aten.slice_scatter, since it also takes args with different devices.

@pytorch-bot
Copy link

pytorch-bot bot commented May 31, 2023

🔗 Helpful Links

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

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

✅ No Failures

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

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

Fixes `pytest ./generated/test_yizhou_wang_RODNet.py -k test_000` failure in #92670.

FakeTensor would raise an error upon trying to run `aten.copy` with inputs with different devices, although this is allowed behavior.


[ghstack-poisoned]
Fixes `pytest ./generated/test_yizhou_wang_RODNet.py -k test_000` failure in #92670.

FakeTensor would raise an error upon trying to run `aten.copy` with inputs with different devices, although this is allowed behavior.


[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Jun 1, 2023
ghstack-source-id: a07c5d7
Pull Request resolved: #102664
@yanboliang
Copy link
Contributor

Can you coordinate with @davidberard98 to add other ops that support different devices? Thanks!

Fixes `pytest ./generated/test_yizhou_wang_RODNet.py -k test_000` failure in #92670.

FakeTensor would raise an error upon trying to run `aten.copy` with inputs with different devices, although this is allowed behavior.


[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Jun 1, 2023
ghstack-source-id: a896bd1
Pull Request resolved: #102664
@williamwen42
Copy link
Member Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: 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.

Details for Dev Infra team Raised by workflow job

@williamwen42
Copy link
Member Author

@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/williamwen42/57/head branch June 8, 2023 19:22
j1 = torch.tensor([2], device="cuda")
j2 = torch.tensor([2], device="cpu")
r3 = torch.ops.aten.index_put.default(x1, j1, y1)
r4 = torch.ops.aten.index_put.default(x2, j2, y2)
Copy link
Contributor

Choose a reason for hiding this comment

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

This code doesn't actually pass on eager though?

(/home/ezyang/local/b/pytorch-env) [ezyang@devgpu005.nha1 ~/local/b/pytorch (fc2aa23c)]$ python test.py
Traceback (most recent call last):
  File "/data/users/ezyang/b/pytorch/test.py", line 7, in <module>
    r1 = torch.ops.aten.index(x1, i1)
  File "/data/users/ezyang/b/pytorch/torch/_ops.py", line 1018, in __call__
    return self_._op(*args, **(kwargs or {}))
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
(/home/ezyang/local/b/pytorch-env) [ezyang@devgpu005.nha1 ~/local/b/pytorch (fc2aa23c)]$ cat test.py
import torch

x1 = torch.rand(4, 4, device="cpu")
x2 = torch.rand(4, 4, device="cuda")
i1 = torch.tensor([0, 1], device="cuda")
i2 = torch.tensor([0, 1], device="cpu")
r1 = torch.ops.aten.index(x1, i1)
r2 = torch.ops.aten.index(x2, i2)

y1 = torch.rand(4, device="cpu")
y2 = torch.rand(4, device="cuda")
j1 = torch.tensor([2], device="cuda")
j2 = torch.tensor([2], device="cpu")
r3 = torch.ops.aten.index_put.default(x1, j1, y1)
r4 = torch.ops.aten.index_put.default(x2, j2, y2)

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.

5 participants