Repository navigation
Barrier after the wipe in test_all_gather_sdma_in_place - #623
Merged
Merged
Conversation
The test wipes out and refills this rank's slice before each call, with no barrier before the all-gather, so a faster peer's copies for the next call could land before a slower rank's wipe and be erased (the same hazard example 34 had). _gather_and_check already barriers there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ariscript
requested review from
BKP,
artulab,
drprajap,
efric,
mawad-amd,
neoblizz and
nirvedhmeshram
as code owners
November 3, 2026 17:34
nirvedhmeshram
approved these changes
Nov 3, 2026
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
What changed in this PR
Adds synchronization to prevent a race in test_all_gather_sdma_in_place where faster ranks can start the next all-gather and overwrite a slower rank’s out buffer before it wipes/refills, leading to incorrect assertions and CI hangs/timeouts.
Changes:
- Insert a
ctx.barrier()between refilling the local slice and invokingall_gatherto force all ranks to finish wipe/refill before any rank begins the next collective.
| File | Description |
|---|---|
| tests/ccl/test_all_gather_sdma.py | Adds a barrier to prevent cross-iteration buffer overwrite races in the in-place SDMA all-gather test. |
Review effort: Lite
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.
test_all_gather_sdma_in_placewipesoutand refills this rank's slice before each call, with nobarrier before the all-gather. A faster rank can then start the next call and copy into a slower
rank's
outbefore that rank's wipe, which erases it, and the slower rank finds an empty slice (thesame hazard example 34 had).
_gather_and_checkalready barriers at that point.It failed this way in CI on #617 and #618 (4 runs, 3 of them at 8 ranks), leaving the remaining ranks
hung until the NCCL timeout.
🤖 Generated with Claude Code