4 lines
No EOL
191 B
Python
4 lines
No EOL
191 B
Python
import torch
|
|
print(torch.cuda.is_available()) # True if CUDA is available
|
|
print(torch.cuda.get_device_name(0)) # GPU name
|
|
print(torch.version.cuda) # CUDA version PyTorch was compiled with |