Hi,
I got very similar error and I found the reason is I am using a GPU with wrong id. One easy way to check whether it is the problem, you can try to simply create a tensor on that GPU, e.g., a = torch.tensor([1., 2.], device=torch.device('cuda: id'). I solve this by using a correct GPU id.