Sorry to have revived this thread again.
Just tried it out and it seems that there are some fundamental problems with setting the default tensor type.


Dataloaders give normal (non-cuda) tensors by default. They have to be manually cast using the Tensor.to() method.


Many methods are simply not implemented for torch.cuda.*Tensor. Thus, setting the global tensor type to cuda fails.


Conversions to numpy using the numpy() method aren’t’ available for cuda tensors. One has to go x.cpu().numpy().
Although this chain is agnostic, it defeats the purpose.


Can someone from the team pitch in on this?
Is there any hope for a global device setting that just works?