Hi,
I see the same using your code:
>>> import torch
>>> a= torch.rand(3,3)
>>> b=a.to('cuda:0')
>>> b
tensor([[0.9206, 0.9123, 0.1227],
        [0.5668, 0.4557, 0.0798],
        [0.1586, 0.2552, 0.2610]], device='cuda:0')
>>> c = b.to('cuda:1')
>>> torch.cuda.synchronize(1)
>>> print(c)
tensor([[0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.]], device='cuda:1')


Could you give more informations about your setup please as well. What is your cuda version. nvidia driver version. pytorch version and how you installed it? Thanks

I’m using pytorch 1.3, cuda.10 and the nvidia driver is: 430.26. The gpu’s that I’m using are GeForce GTX TITAN X