Llama-2-13B / system /torch_check.py
jordigonzm's picture
check installation files
8d4d3e5
raw
history blame
No virus
326 Bytes
import torch
if torch.cuda.is_available():
print("CUDA is available.")
print(f"GPU Name: {torch.cuda.get_device_name(0)}")
print(f"CUDA Version: {torch.version.cuda}")
print(f"cuDNN Version: {torch.backends.cudnn.version()}")
else:
print("CUDA is not available. Check your driver and CUDA installation.")