opened
rohan-varma
username_0
## 🚀 Enhancement
Investigating the possibility to reuse spawned subprocesses for `test_rpc_spawn.py` would be super helpful. The current test suite takes > 5 mins to complete, while the `test_rpc_fork` that we removed in https://github.com/pytorch/pytorch/pull/29827 completed much faster. I'm thus assuming that the reason for this time difference is due to spawning subprocesses in each test run.

It seems like it'd help developer productivity quite a bit if we were able to reuse these processes somehow across runs. Though we'd need to be careful to ensure that this does not introduce extra flakiness.

## Alternatives

Continue with per-test spawning.
Reuse spawned subprocesses in RPC tests
issue
created
zou3519
username_1
Yeah, we'd definitely need to use care to ensure that extra subprocesses don't introduce more flakiness. I've noticed in the past that multi-threaded or multi-process tests can be flaky but don't know the root cause
comment