I have a tensor which is on gpu 0.
how can I move (or make a copy of it one gpu 1)?
A = torch.rand(1)
cuda0 = torch.device('cuda:0')
cuda1 = torch.device('cuda:1')
A.to(cuda0)
# now I want to move A to gpu 1
A.to(cuda1)

gives me error:
RuntimeError: CUDA error: invalid device ordinal