ebook2audiobook / tools /gpu_notebook_test.py
priteshmistry's picture
Upload 17 files
4d81aed verified
raw
history blame
338 Bytes
import torch
print("Torch version:", torch.__version__)
print("CUDA Available:", torch.cuda.is_available())
if torch.cuda.is_available():
print("Number of GPUs:", torch.cuda.device_count())
for i in range(torch.cuda.device_count()):
print(f"GPU {i}: {torch.cuda.get_device_name(i)}")
else:
print("No GPU detected.")