view all pytorch tensors in gpu code example Example: pytorch get gpu number torch.cuda.device_count()