Detect best available compute device using centralized device_utils.
(self)
| 185 | # --- Device & Engine Management --- |
| 186 | |
| 187 | def detect_device(self) -> str: |
| 188 | """Detect best available compute device using centralized device_utils.""" |
| 189 | try: |
| 190 | from device_utils import resolve_device |
| 191 | |
| 192 | self._device = resolve_device() |
| 193 | except ImportError: |
| 194 | self._device = "cpu" |
| 195 | logger.warning("device_utils not available — using CPU") |
| 196 | logger.info(f"Compute device: {self._device}") |
| 197 | return self._device |
| 198 | |
| 199 | def get_vram_info(self) -> dict[str, float]: |
| 200 | """Get GPU VRAM info in GB. Returns empty dict if not CUDA.""" |
nothing calls this directly
no test coverage detected