verification that we have at least 2 gpus to run dist examples
(min_gpus: int = 2)
| 16 | |
| 17 | |
| 18 | def verify_min_gpu_count(min_gpus: int = 2) -> bool: |
| 19 | """ verification that we have at least 2 gpus to run dist examples """ |
| 20 | has_gpu = torch.accelerator.is_available() |
| 21 | gpu_count = torch.accelerator.device_count() |
| 22 | return has_gpu and gpu_count >= min_gpus |
no outgoing calls
no test coverage detected