Looks like we don't support short tensor for now.
Now the following script send core dump instead of a safe error.
import torch
import torch_xla
device = 'xla:0'
a = torch.ones(3, 3).short()
b = a.to(device)
c = torch.max(b, 1)
print(c)
This should be resolved by simply upgrading to latest TF. Our version of https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/literal_util.cc triggers a fatal u16/s16 literals not yet implemented, but the latest one can handle them.
We can either punt this back to CPU or upgrade TF, cc: @dlibenzi which do you prefer? ;) I'll assign you to this issue for now but it's relatively low pri.
Will update TF.
There is a CL coming to TF to fix ForchIndexSelect with 0dim ... waiting for that to show up before the update.
@dlibenzi Does this work now after the TF upgrade, should we close it as well?
Fixed by latest TF import.