Skip to content

feat(rccl): Scaleup Allreduce using GIN/LSA - #10783

Merged
nusislam merged 19 commits into
developfrom
users/nusislam/gin-ar-pr
Sep 6, 2026
Merged

nusislam merged 19 commits into
developfrom
users/nusislam/gin-ar-pr

Conversation

@nusislam

@nusislam nusislam commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

This PR develops scaleup allreduce algorithms using LSA/GIN APIs.

Technical Details

For small/medium message sizes, LSA-based one-shot and two-shot algorithms are used. For large sizes, GIN-based Allreduce kernel is used. Since this is an Allreduce for the scaleup domain, the SDMA-backend for GIN is used for large sizes. This feature requires symmetric memory window registration.

This PR is based on #10386 that has build fixes for GIN SDMA backend.

Issue Tracking

AICOMRCCL-1897

Test Plan

rccl-tests allreduce
unit tests (TODO)

Test Result

For large messages, GIN Allreduce achieves peak bandwidth.

Submission Checklist

@nusislam
nusislam requested review from a team and a lite review from Copilot August 26, 2026 18:29
@therock-pr-bot

therock-pr-bot Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
• JIRA ID : TESTAUTO-6039
• JIRA ID - #330
• JIRA ID #330
• JIRA ID (on separate line)
ROCM-25757
• ISSUE ID : TESTUTO-3334
• ISSUE ID #3334
• ISSUE ID - TESTAUTO-3433
• ISSUE ID (on separate line)
AIRUNTIME-2352
• ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
• Closes #10
• Fixes octo-org/octo-repo#100
• Resolves: #123
• #123
• https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GIN/LSA-based “scaleup-only” (single-node) fast paths to RCCL collectives, introducing new SDMA-backed GIN implementations for AllToAll and AllReduce and wiring them into the collective dispatch.

Changes:

  • Adds GIN-SDMA AllToAll and AllReduce implementations (new kernels + host entry points) and dispatch hooks in collectives.cc.
  • Extends communicator state and teardown to manage GIN internal dev comms and associated resources.
  • Updates build/DeviceLinker integration for new HIP objects and adjusts ROCm linking/CI coverage for GIN-SDMA.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
projects/rccl/tools/ci/lib/gin-tests.json Adds a new CI test variant for internal GIN-SDMA runs.
projects/rccl/src/init.cc Ensures GIN-SDMA resources are finalized during communicator teardown.
projects/rccl/src/include/comm.h Extends ncclComm with GIN-SDMA per-comm state structs and includes new headers.
projects/rccl/src/collectives.cc Routes eligible AllToAll/AllReduce calls to the new GIN-SDMA paths.
projects/rccl/src/CMakeLists.txt Adds new headers/sources and adjusts linking (hsakmt discovery, rocSHMEM host object extraction).
projects/rccl/src/algorithms/gin/sdma/gin_alltoall_sdma.cu New GIN-SDMA AllToAll kernel + eligibility/launch/finalize.
projects/rccl/src/algorithms/gin/sdma/gin_all_reduce_sdma.cu New GIN-SDMA AllReduce algorithms (LSA one/two-shot and GIN two-shot) + state management.
projects/rccl/src/algorithms/gin/sdma/all_reduce_gin_sdma.h New device kernels/utilities backing the AllReduce implementations.
projects/rccl/src/algorithms/gin/gin_alltoall.h Declares AllToAll GIN-SDMA host APIs and per-comm state.
projects/rccl/src/algorithms/gin/gin_all_reduce.h Declares AllReduce GIN-SDMA host APIs, thresholds, and per-comm state.
projects/rccl/cmake/DeviceLinker.cmake Adds device-linker compilation rules for new GIN-SDMA HIP fat objects and adjusts rocSHMEM bitcode behavior.
Suppressed comments (1)

projects/rccl/src/algorithms/gin/sdma/gin_all_reduce_sdma.cu:116

  • msgSize is computed but never used, which can trigger an unused-variable warning (and break builds when warnings are treated as errors).
  size_t msgSize = countPerRank * sizeof(T) * comm->nRanks;  


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread projects/rccl/src/collectives.cc Resolved
@nusislam

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflict in gin-tests.json, retaining both the internal RCCL SDMA test and the develop fixture test. The fix is in merge commit 6336ba162f.

@nusislam

Copy link
Copy Markdown
Contributor Author

@dlamd1dai , @Kapil-Shyam-Pawar - please review.

@github-actions

Copy link
Copy Markdown
Contributor

RCCL Perf-Regression Gate: ⚠️ NO VERDICT (not measured)

This run did not produce a usable answer. It is neither a PASS nor a regression — treat the perf gate as not run for this change.

Why:

  • this report predates the trustworthiness flag, or a group could not be scored

Mode: detect (reference vs candidate)
Thresholds: small 17.2% · mid 12.3% · large 12.9%
Keys compared: 0 · Confirmed regressions: 0 · Inconclusive: 0
Provenance: n/a

Per-collective breakdown
group keys regressions inconclusive
all_gather_perf-d=bfloat16-default 0 0 0
all_gather_perf-d=float-default 0 0 0
all_reduce_perf-d=bfloat16-default 0 0 0
all_reduce_perf-d=float-default 0 0 0
broadcast_perf-d=bfloat16-default 0 0 0
broadcast_perf-d=float-default 0 0 0
reduce_scatter_perf-d=bfloat16-default 0 0 0
reduce_scatter_perf-d=float-default 0 0 0

Comment thread root/pkg/mod/cache/lock Resolved
@nusislam

Copy link
Copy Markdown
Contributor Author

@dlamd1dai - Please review this PR.

@nusislam

nusislam commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@Kapil-Shyam-Pawar - I have addressed your reviews. Please take a look.

Comment thread projects/rccl/src/collectives.cc Resolved
@nusislam

nusislam commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@wenkaidu - Can you please review this PR?

@nusislam
nusislam force-pushed the users/nusislam/gin-ar-pr branch from cdaf1fe to 506b3e4 Compare September 2, 2026 19:54

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Review Guard for Upfront Scrutiny

Bottom line: No correctness defect found in the kernels. Two things worth settling before merge: the new eligibility suite passes even if ncclAllReduceGinSdmaEligible returns false, and the yield-to-DDA override reroutes symmetric AllReduces GIN never claims.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/src/rccl_wrap.cc Resolved
Comment thread projects/rccl/test/CMakeLists.txt Resolved
Comment thread projects/rccl/src/gin/README.md Resolved
Comment thread projects/rccl/cmake/DeviceLinker.cmake Resolved
Comment thread projects/rccl/src/CMakeLists.txt Resolved
Comment thread projects/rccl/src/CMakeLists.txt Resolved

@dlamd1dai dlamd1dai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of the GIN two-shot default path after the selector and intra-GPU barrier updates. Two follow-ups on ginAllReduceTwoShotKernel.

nusislam and others added 5 commits September 3, 2026 09:08
Co-authored-by: amd-argus[bot] <321830313+amd-argus[bot]@users.noreply.github.com>
Co-authored-by: amd-argus[bot] <321830313+amd-argus[bot]@users.noreply.github.com>
@nusislam

nusislam commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

The test failures are not related to this PR.

@nusislam
nusislam merged commit 72ee0a5 into develop Sep 6, 2026
46 of 49 checks passed
@nusislam
nusislam deleted the users/nusislam/gin-ar-pr branch September 6, 2026 14:56
potatogim pushed a commit to potatogim/rocm-systems that referenced this pull request Sep 6, 2026
## Motivation
This PR develops scaleup allreduce algorithms using LSA/GIN APIs.

## Technical Details
For small/medium message sizes, LSA-based one-shot and two-shot
algorithms are used. For large sizes, GIN-based Allreduce kernel is
used. Since this is an Allreduce for the scaleup domain, the
SDMA-backend for GIN is used for large sizes. This feature requires
symmetric memory window registration.

This PR is based on ROCm#10386 that
has build fixes for GIN SDMA backend.

## Issue Tracking

AICOMRCCL-1897

## Test Plan

rccl-tests allreduce
unit tests (TODO)

## Test Result
For large messages, GIN Allreduce achieves peak bandwidth.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nusislam <25847498+nusislam@users.noreply.github.com>
Co-authored-by: amd-argus[bot] <321830313+amd-argus[bot]@users.noreply.github.com>
Signed-off-by: Jihyeon Gim <potatogim@potatogim.net>
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

corey-derochie-amd pushed a commit that referenced this pull request Oct 14, 2026
## Motivation
This PR develops scaleup allreduce algorithms using LSA/GIN APIs.

## Technical Details
For small/medium message sizes, LSA-based one-shot and two-shot
algorithms are used. For large sizes, GIN-based Allreduce kernel is
used. Since this is an Allreduce for the scaleup domain, the
SDMA-backend for GIN is used for large sizes. This feature requires
symmetric memory window registration.

This PR is based on #10386 that
has build fixes for GIN SDMA backend.

## Issue Tracking

AICOMRCCL-1897

## Test Plan

rccl-tests allreduce
unit tests (TODO)

## Test Result
For large messages, GIN Allreduce achieves peak bandwidth.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nusislam <25847498+nusislam@users.noreply.github.com>
Co-authored-by: amd-argus[bot] <321830313+amd-argus[bot]@users.noreply.github.com>
corey-derochie-amd pushed a commit that referenced this pull request Oct 15, 2026
## Motivation
This PR develops scaleup allreduce algorithms using LSA/GIN APIs.

## Technical Details
For small/medium message sizes, LSA-based one-shot and two-shot
algorithms are used. For large sizes, GIN-based Allreduce kernel is
used. Since this is an Allreduce for the scaleup domain, the
SDMA-backend for GIN is used for large sizes. This feature requires
symmetric memory window registration.

This PR is based on #10386 that
has build fixes for GIN SDMA backend.

## Issue Tracking

AICOMRCCL-1897

## Test Plan

rccl-tests allreduce
unit tests (TODO)

## Test Result
For large messages, GIN Allreduce achieves peak bandwidth.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nusislam <25847498+nusislam@users.noreply.github.com>
Co-authored-by: amd-argus[bot] <321830313+amd-argus[bot]@users.noreply.github.com>
corey-derochie-amd pushed a commit that referenced this pull request Oct 15, 2026
## Motivation
This PR develops scaleup allreduce algorithms using LSA/GIN APIs.

## Technical Details
For small/medium message sizes, LSA-based one-shot and two-shot
algorithms are used. For large sizes, GIN-based Allreduce kernel is
used. Since this is an Allreduce for the scaleup domain, the
SDMA-backend for GIN is used for large sizes. This feature requires
symmetric memory window registration.

This PR is based on #10386 that
has build fixes for GIN SDMA backend.

## Issue Tracking

AICOMRCCL-1897

## Test Plan

rccl-tests allreduce
unit tests (TODO)

## Test Result
For large messages, GIN Allreduce achieves peak bandwidth.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nusislam <25847498+nusislam@users.noreply.github.com>
Co-authored-by: amd-argus[bot] <321830313+amd-argus[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants