Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
optigesr
/
lilholt
like
0
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
lilholt
/
list_devices.py
optigesr
Upload 3 files
bd39b6b
almost 3 years ago
raw
Copy download link
history
blame
contribute
delete
Safe
130 Bytes
import
torch
devices = [
f"cuda:
{i}
=>
{torch.cuda.get_device_name(i)}
"
for
i
in
range
(torch.cuda.device_count())]
print
(devices)