MCPcopy Index your code
hub / github.com/FlashSampling/FlashSampling / _is_torchrun

Function _is_torchrun

src/fused_mm_sampling/tp_info.py:60–62  ·  view source on GitHub ↗

Check if the current process was launched by torchrun.

()

Source from the content-addressed store, hash-verified

58
59
60def _is_torchrun() -> bool:
61 """Check if the current process was launched by torchrun."""
62 return "RANK" in os.environ and "WORLD_SIZE" in os.environ
63
64
65def _torchrun_worker(fn: Callable, args: tuple) -> None:

Callers 1

run_maybe_distributedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected