5 lines
134 B
Python
5 lines
134 B
Python
|
import torch
|
||
|
|
||
|
devices = [f"cuda:{i} => {torch.cuda.get_device_name(i)}" for i in range(torch.cuda.device_count())]
|
||
|
|
||
|
print(devices)
|