lilholt / list_devices.py
optigesr's picture
Upload 3 files
bd39b6b
raw
history blame contribute delete
130 Bytes
import torch
devices = [f"cuda:{i} => {torch.cuda.get_device_name(i)}" for i in range(torch.cuda.device_count())]
print(devices)