portable-devtools / scripts /test_torch.py
codekingpro's picture
Add files using upload-large-folder tool
e98b0a7 verified
Raw
History Blame Contribute Delete
278 Bytes
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")