Search notes:

torch.cuda

import torch

print(f'CUDA is available       : {torch.cuda.is_available()}'    )
print(f'Available GPUs          : {torch.cuda.device_count()}'    )
print(f'Current device          : {torch.cuda.current_device()}'  )
print(f'Current device location : {torch.cuda.device(0)}'         ) # prints something like <torch.cuda.device object at 0x7f7080c39310>
print(f'Name of the device      : {torch.cuda.get_device_name(0)}')

Index