Coverage for src/retrospeedlab/search/gpu.py: 40%
5 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-12-02 22:44 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-12-02 22:44 +0000
1import torch
4def gpu() -> torch.device:
5 if not torch.cuda.is_available():
6 raise RuntimeError("This model trains on a GPU, and torch sees none: run the app with --gpus all")
7 return torch.device("cuda")