- torch.cuda.is_available()
Is cuda available;
- torch.cuda.device_count()
Return the number of GPUs;
- torch.cuda.get_device_name(0)
Return the gpu name, the device index starts from 0 by default;
- torch.cuda.current_device()
Return the current device index