True if at least ``count`` devices of a single GPU backend exist.
(count: int = 2)
| 224 | |
| 225 | @functools.cache |
| 226 | def has_multi_gpu(count: int = 2) -> bool: |
| 227 | """True if at least ``count`` devices of a single GPU backend exist.""" |
| 228 | for kind in ("cuda", "rocm", "opencl", "metal", "vulkan"): |
| 229 | if all(_device_exists(kind, index) for index in range(count)): |
| 230 | return True |
| 231 | return False |
| 232 | |
| 233 | |
| 234 | # --- build-support probes -------------------------------------------------- |
nothing calls this directly
no test coverage detected
searching dependent graphs…