CUDA semantics — PyTorch 1.11.0 documentation
pytorch.org › docs › stableCUDA semantics — PyTorch 1.11.0 documentation CUDA semantics torch.cuda is used to set up and run CUDA operations. It keeps track of the currently selected GPU, and all CUDA tensors you allocate will by default be created on that device. The selected device can be changed with a torch.cuda.device context manager.