mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-09 13:58:14 -05:00
12 lines
338 B
Python
12 lines
338 B
Python
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.")
|