MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / gpu_topology

Function gpu_topology

src/fused_mm_sampling/bench/sys_metadata.py:41–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40
41def 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"

Callers 1

gather_system_metadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected