Skip to content

[release/2.14] [test] Reuse device meshes across ComposabilityTest cases (#198299) - #3699

Merged
pragupta merged 1 commit into
release/2.14from
users/chinmaydk99/cp-198299-release-2.14
Sep 24, 2026
Merged

pragupta merged 1 commit into
release/2.14from
users/chinmaydk99/cp-198299-release-2.14

Conversation

@chinmaydk99

Copy link
Copy Markdown

Cherry-pick of pytorch#198299 into release/2.14.

ComposabilityTest is a MultiProcContinuousTest, so its 8 worker processes
are reused for every test in the class. Each test built a new DeviceMesh,
and each mesh creates new NCCL communicators. On RCCL every communicator
keeps a ~40 MB proxy-ops segment per rank in /dev/shm until the workers
exit, so the class accumulated ~10 GB and hit ENOSPC on 10 GiB /dev/shm
containers. The failure surfaced as a rank-0 process join timeout.

Build each distinct mesh once per worker and share it across tests.
On 8x MI300X with a 10 GiB /dev/shm, peak usage drops from ENOSPC to
~2.5 GB and all 26 tests pass.

Cherry-picked with -x from 2e3d452f5bf3a00c7178c348b040840fcd6358cd; applied cleanly with no conflicts. Touches one file: test/distributed/_composable/test_composability/test_pp_composability.py (+18/-16).

Note: the upstream PR is still open at the time of this cherry-pick. If it is squashed or rebased on merge, the SHA in the (cherry picked from ...) trailer will not exist in main — the PR link above is the stable reference for provenance.

ComposabilityTest is a MultiProcContinuousTest, so its 8 worker processes
are reused for every test in the class. Each test built a new DeviceMesh,
and each mesh creates new NCCL communicators. On RCCL every communicator
keeps a ~40 MB proxy-ops segment per rank in /dev/shm until the workers
exit, so the class accumulated ~10 GB and hit ENOSPC on 10 GiB /dev/shm
containers. The failure surfaced as a rank-0 process join timeout.

Build each distinct mesh once per worker and share it across tests.
On 8x MI300X with a 10 GiB /dev/shm, peak usage drops from ENOSPC to
~2.5 GB and all 26 tests pass.

(cherry picked from commit 2e3d452)
@pragupta
pragupta merged commit d5565f4 into release/2.14 Sep 24, 2026
3 checks passed
@pragupta
pragupta deleted the users/chinmaydk99/cp-198299-release-2.14 branch September 24, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants