Repository navigation
[release/2.12] [test] Reuse device meshes across ComposabilityTest cases (#198299) - #3697
Merged
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of pytorch#198299 into
release/2.12.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
-xfrom2e3d452f5bf3a00c7178c348b040840fcd6358cd; 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 inmain— the PR link above is the stable reference for provenance.