File size: 278 Bytes
e98b0a7 | 1 2 3 4 5 6 7 8 9 | import torch
print("PyTorch Version:", torch.__version__)
print("CUDA Available:", torch.cuda.is_available())
if torch.cuda.is_available():
print("GPU Name:", torch.cuda.get_device_name(0))
print("CUDA Version:", torch.version.cuda)
else:
print("GPU: Not detected")
|