You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i try to move a tensor from device 0 to device 1 than print it,i found it bug,
tensor.to("cuda") is normal,tensor.to("cuda:1") or "cuda:x" will bug,
and the bug only in print(tensor),when print(tensor.numpy()) than everything is ok!
'Slice method' will fail after tensor is sent to "cuda:1" by 'to method', tensor_str needs 'slice method', so looks like failure comes from tensor_str.
We can reproduce it by below code.
import oneflow as flow
x = flow.tensor([1, 2], dtype=flow.int32)
y = x.to("cuda:1")
y[0]
Summary
When i try to move a tensor from device 0 to device 1 than print it,i found it bug,
tensor.to("cuda") is normal,tensor.to("cuda:1") or "cuda:x" will bug,
and the bug only in print(tensor),when print(tensor.numpy()) than everything is ok!
Code to reproduce bug
After trying this commit:#5783 , it most likely tensor print function has some bug
Same code can reproduce it
output
System Information
python3 -m oneflow --doctor
):The text was updated successfully, but these errors were encountered: