We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code mutates the value of the expanded tensor.
import torch import torch_xla.core.xla_model as xm device = "cpu" x = torch.arange(6, device=device) y = x.expand(2, *x.shape) y[0, 0] = 5 print(y)
# CPU tensor([[5, 1, 2, 3, 4, 5], [5, 1, 2, 3, 4, 5]]) # XLA Eager tensor([[ 5, 2, 4, 6, 8, 10], [ 5, 2, 4, 6, 8, 10]], device='xla:0')
63fc48257a02f8e28b79d13def7a7139589d4176
d5d023063bfa8ecb4629f621f9b5890bc8396f58
The text was updated successfully, but these errors were encountered:
tensor.expand
yea... this is indeed incorrect. Hopefully if you dump the HLO it become obvious what happened
Sorry, something went wrong.
I think this might be the same issue as the non-XLA version: pytorch/pytorch#114302
oh nice!
No branches or pull requests
🐛 Bug
The following code mutates the value of the expanded tensor.
Environment
63fc48257a02f8e28b79d13def7a7139589d4176
(Nov 2)d5d023063bfa8ecb4629f621f9b5890bc8396f58
(Nov 9)The text was updated successfully, but these errors were encountered: