rccl/gin: fix inverted system-scope fence guard on HIP backends - #3
Closed
dlamd1dai wants to merge 2 commits into
Closed
rccl/gin: fix inverted system-scope fence guard on HIP backends#3dlamd1dai wants to merge 2 commits into
dlamd1dai wants to merge 2 commits into
Conversation
dlamd1dai
force-pushed
the
users/dondai/gin-gda-a2a-unittests
branch
from
August 21, 2026 21:21
3dba9fc to
3471bf3
Compare
dlamd1dai
force-pushed
the
users/dondai/gin-scope-fence-guard-fix
branch
2 times, most recently
from
August 22, 2026 16:01
9d72e71 to
019a879
Compare
dlamd1dai
force-pushed
the
users/dondai/gin-gda-a2a-unittests
branch
from
August 22, 2026 16:01
7879919 to
39a05ff
Compare
dlamd1dai
changed the base branch from
users/dondai/gin-gda-a2a-unittests
to
users/dondai/gin-sdma-a2a-meta-repro-pr9927
August 22, 2026 16:01
dlamd1dai
force-pushed
the
users/dondai/gin-scope-fence-guard-fix
branch
from
August 23, 2026 18:07
019a879 to
3b66d26
Compare
dlamd1dai
changed the base branch from
users/dondai/gin-sdma-a2a-meta-repro-pr9927
to
users/dondai/gin-gda-a2a-unittests
August 23, 2026 18:07
dlamd1dai
force-pushed
the
users/dondai/gin-gda-a2a-unittests
branch
from
August 24, 2026 22:56
39a05ff to
11fb115
Compare
Flip the pre-put system fence guard to (required==system && given<required) on anvil_sdma and rocshmem_gda. Add NCCL_GIN_THREADFENCE_SYSTEM() seam in gin_device_common.h. Expand gdaki comment documenting opposite libcu++ ordering. Test updates for GinRocshmemGdaTemplate_test.cpp remain in the gin-gda-a2a-unittests PR. Co-authored-by: Cursor <cursoragent@cursor.com>
Count NCCL_GIN_THREADFENCE_SYSTEM invocations in GDA template tests so G7 validates the corrected given<required guard fires once when required is system and given is block, and does not fire when scopes match. Co-authored-by: Cursor <cursoragent@cursor.com>
dlamd1dai
force-pushed
the
users/dondai/gin-scope-fence-guard-fix
branch
from
August 24, 2026 23:18
3b66d26 to
a2899ae
Compare
5 tasks
Owner
Author
|
Superseded by upstream PR ROCm/rocm-systems#10675, stacked on #10672. Branch |
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.
Summary
Put/PutValuedevice templates gate the pre-put system fence on(required==system && given>required). On HIP,hip_compat.hordersthread_scope_systemas the max value, sogiven>requiredis never true whenrequired==system— the__threadfence_system()branch is dead code, and a caller that only guaranteed a weaker scope (e.g.block) silently skips the system fence it requested.(required==system && given<required)on the two HIP backends (anvil_sdma,rocshmem_gda), routed through a newNCCL_GIN_THREADFENCE_SYSTEM()seam ingin_device_common.h(expands to__threadfence_system()in production; unit tests can override it to observe the branch).gdakiintentionally left asgiven>required: it is CUDA-only (NCCL_GIN_GDAKI_ENABLE=0on HIP) and libcu++ ordersthread_scope_systemas the lowest value — the opposite of HIP — sogiven>requiredis correct there, and flipping it would make its DOCA system release dead code. Its comment is expanded to document this.Put_WeakerGivenScopeStillPutswithPut_WeakerGivenScopeFencesAndPuts(required=system, given=block→ asserts the fence ran exactly once and the put landed), plusPut_EqualScopeTakesNoFence(required=given=system→ asserts no fence and the put landed).Follow-up to review on #2 (stacked on that branch).
JIRA ID: AICOMRCCL-1527
Stacking
39a05ff3b66d26Merge order: ROCm#10420 → #1 → #2 → this PR → #4.
Test plan
39a05ff); branch now stacks correctly (was previously a sibling off meta-repro).Put_WeakerGivenScopeFencesAndPutsandPut_EqualScopeTakesNoFence.pr3-fixtures-full-20260822-001621.log.Made with Cursor