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

type promotion #592

Closed
ailzhang opened this issue Apr 12, 2019 · 0 comments · Fixed by #593
Closed

type promotion #592

ailzhang opened this issue Apr 12, 2019 · 0 comments · Fixed by #593
Assignees

Comments

@ailzhang
Copy link
Contributor

import torch
import torch_xla
import torch_xla_py.utils as xu
import torch_xla_py.xla_model as xm
import pdb
import torch.nn.functional as F
xla_device = xm.xla_device()
# xla_device = 'cpu'

pdb.set_trace()

a = torch.rand(10).to(xla_device).to(dtype=torch.uint8)
b = torch.tensor([0, 1, 2, 3]).to(xla_device)
print(a.dtype)
print(a[b].dtype) # shows float32, should be uint8
@dlibenzi dlibenzi self-assigned this Apr 12, 2019
asuhan added a commit that referenced this issue Apr 12, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
asuhan added a commit that referenced this issue Apr 12, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
asuhan added a commit that referenced this issue Apr 12, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
asuhan added a commit that referenced this issue Apr 13, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
asuhan added a commit that referenced this issue Apr 14, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
asuhan added a commit that referenced this issue Apr 14, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
asuhan added a commit that referenced this issue Apr 14, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
dlibenzi pushed a commit that referenced this issue Apr 14, 2019
We need to cast to the destination type on the same device path.
Fixes #592.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants