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

Pred type causes issues #567

Closed
ailzhang opened this issue Apr 6, 2019 · 3 comments
Closed

Pred type causes issues #567

ailzhang opened this issue Apr 6, 2019 · 3 comments
Assignees

Comments

@ailzhang
Copy link
Contributor

ailzhang commented Apr 6, 2019

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'
a = (torch.rand(4).to(xla_device) >= 0.5)
b = (torch.rand(4).to(xla_device) >= 0.5)
c = torch.cat([a, b], dim=0)
d = c.sum()
pdb.set_trace()
print(d)
@dlibenzi dlibenzi self-assigned this Apr 6, 2019
@dlibenzi
Copy link
Collaborator

dlibenzi commented Apr 6, 2019

@ailzhang Is this TPU or CPU?

@dlibenzi
Copy link
Collaborator

dlibenzi commented Apr 6, 2019

Must be TPU as this works on CPU:

  def test_pred_type(self):
    xla_device = xm.xla_device()
    a = (torch.rand(4).to(xla_device) >= 0.5)
    b = (torch.rand(4).to(xla_device) >= 0.5)
    c = torch.cat([a, b], dim=0)
    d = c.sum()
    print(c)
    print(d)
tensor([0, 0, 0, 0, 0, 1, 0, 0], dtype=torch.uint8)
tensor(1, dtype=torch.uint8)

@dlibenzi
Copy link
Collaborator

dlibenzi commented Apr 6, 2019

Yep, it is:

RuntimeError: tensorflow/compiler/xla/xla_client/xrt_computation_client.cc:242 : Check failed: mwait.Wait() == ::tensorflow::Status::OK() (Internal: tensorflow/compiler/xla/xla_client/xrt_computation_client.cc:222 : Check failed: session->session()->Run( session_work.feed_inputs, session_work.outputs_handles, &outputs) == ::tensorflow::Status::OK() (Invalid argument: Invalid HLO for TPU: U8 and S8 types are not supported: %x.13 = u8[] parameter(0)
	 [[{{node XRTCompile}}]]
	 [[XRTCompile_G3]] vs. OK)

dlibenzi added a commit that referenced this issue Apr 6, 2019
asuhan pushed a commit that referenced this issue Apr 7, 2019
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

No branches or pull requests

2 participants