()
| 39 | |
| 40 | |
| 41 | def gpu_topology() -> str | None: |
| 42 | import subprocess |
| 43 | |
| 44 | if torch.cuda.device_count() < 2: |
| 45 | return None |
| 46 | try: |
| 47 | return subprocess.check_output(["nvidia-smi", "topo", "-m"], text=True).strip() |
| 48 | except (FileNotFoundError, subprocess.CalledProcessError): |
| 49 | return "error" |
no outgoing calls
no test coverage detected