Files
2026-07-13 12:28:11 +08:00

13 lines
278 B
Python

def is_cuda_available() -> bool:
try:
import torch
return torch.cuda.is_available()
except ImportError:
return False
def is_torch_installed() -> bool:
try:
import torch
return True
except ImportError:
return False