Check if the current process was launched by torchrun.
()
| 58 | |
| 59 | |
| 60 | def _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 | |
| 65 | def _torchrun_worker(fn: Callable, args: tuple) -> None: |
no outgoing calls
no test coverage detected