Repository navigation
feat(rccl): GIN SDMA alltoall - #10386
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
2f977df to
220b21c
Compare
There was a problem hiding this comment.
Pull request overview
Implements an internal GIN-SDMA alltoall fast-path inside RCCL, invoked from ncclAlltoAll when eligibility criteria are met, and updates CI to exercise the new internal path so external apps and rccl-tests no longer need to supply/link rocSHMEM SDMA host symbols for this mode.
Changes:
- Adds a new GIN-SDMA alltoall implementation (
gin_alltoall_sdma.cu) with eligibility checks and per-communicator lazy initialization/teardown. - Routes
ncclAlltoAllthrough the new internal GIN-SDMA path when eligible, and finalizes that state during communicator teardown. - Updates build/device-link integration and CI test matrix to support and validate the self-contained SDMA host-symbol extraction and internal alltoall execution.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/rccl/tools/ci/lib/gin-tests.json | Adds a CI rccl-tests run for the new internal GIN-SDMA alltoall path (no -D 3). |
| projects/rccl/src/init.cc | Ensures GIN alltoall state is finalized during communicator teardown. |
| projects/rccl/src/include/gin_alltoall.h | Introduces the public/internal host API and per-comm state struct for GIN-SDMA alltoall. |
| projects/rccl/src/include/comm.h | Adds ginA2AState to ncclComm and includes the new header. |
| projects/rccl/src/gin_alltoall_sdma.cu | Implements eligibility + kernel launch + init/finalize for internal GIN-SDMA alltoall. |
| projects/rccl/src/collectives.cc | Hooks ncclAlltoAll to take the internal GIN-SDMA path when eligible. |
| projects/rccl/src/CMakeLists.txt | Extracts/links required rocSHMEM SDMA host objects into librccl and hides them via --exclude-libs. |
| projects/rccl/cmake/DeviceLinker.cmake | Adjusts rocSHMEM device-bitcode injection logic and adds a dedicated device-linker compile for the new kernel TU. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ea8990b to
5bfb95e
Compare
11ddf9e to
2dfddbb
Compare
RCCL Perf-Regression Gate:
|
| 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 |
|
@dlamd1dai @wenkaidu - Can you review this PR? |
dlamd1dai
left a comment
There was a problem hiding this comment.
Review summary
Solid direction overall: self-contained SDMA host symbols, device-linker integration, and the ncclAlltoAll fast path without rccl-tests -D 3 are the right architecture. CMake and lifecycle work look good.
Please address the inline comments before merge:
- Dispatch ordering — move GIN after DDA so small single-node messages stay on DDA when eligible.
- SDMA kernel — use
ncclGinBarrierSessionand strided peer puts to match reference kernels. - Eligibility — add DDA deferral guard and
sharedResnull check. - CI — add
NCCL_MSCCL_ENABLE=0to the new internal test.
Merge sequencing: #10386 can land once the above are addressed and CI is green. Merge stacked #10388 immediately after for device-kernel regression coverage. Eligibility unit tests for ncclAllToAllGinSdmaEligible are still a gap — please track as follow-up.
fe492e7 to
42e3bf8
Compare
dlamd1dai
left a comment
There was a problem hiding this comment.
Re-review summary (post Aug 28 updates)
Thanks for the follow-up commits — ginA2ASdmaThreads, separate LSA/SDMA barrier paths, and the 16B alignment gate all look good. Build/device-linker integration remains solid.
Policy (confirmed on our side): GIN-first dispatch before DDA is acceptable given the measured parity/better perf on small sizes (AICOMRCCL-1682).
Before merge, please:
- Reconcile the 8 MiB
GIN_A2A_SDMA_MIN_BYTESdefault vs the 32 MiB note in the review thread (inline ask). - Prefer switching the SDMA peer loop to the strided reference pattern — not a hard blocker from us, but recommended.
Follow-ups (non-blocking): eligibility unit tests; align #10388 device tests with the hybrid ncclBarrierSession SDMA contract.
Overall: approve direction — close to merge pending the threshold clarification.
af1011f to
46bf65b
Compare
TheRock Submodule Bump ActivityNewest first
|
## 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>
## 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>
Keep device-API Test#5 as the entry point. On gfx1250+MNNVL+single clique, small messages use host-launched ddaAllToAllFabricLL and large messages register symmetric windows via ncclFabricMemHandler. Host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged and remains a later hook. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep device-API Test#5 as the entry point. On gfx1250+MNNVL+single clique, small messages use host-launched ddaAllToAllFabricLL and large messages register symmetric windows via ncclFabricMemHandler. Host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged and remains a later hook. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep device-API Test#5 as the entry point. On gfx1250+MNNVL+single clique, small messages use host-launched ddaAllToAllFabricLL and large messages register symmetric windows via ncclFabricMemHandler. Host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged and remains a later hook. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep device-API Test#5 as the entry point. On gfx1250+MNNVL+single clique, small messages use host-launched ddaAllToAllFabricLL and large messages register symmetric windows via ncclFabricMemHandler. Host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged and remains a later hook. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep device-API Test#5 as the entry point. On gfx1250+MNNVL+single clique, small messages use host-launched ddaAllToAllFabricLL and large messages register symmetric windows via ncclFabricMemHandler. Host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged and remains a later hook. Co-authored-by: Cursor <cursoragent@cursor.com>
Enable GPU-initiated GIN device-API AllToAll on gfx1250 + MNNVL + a single clique (rccl-tests Test#5, NCCL_GIN_TYPE=6, -D 3). One kernel reads the Anvil GPU context and selects fabric DDA LL, optional LSA-flat, or gin.put / SDMA from size, scratch, and threshold gates. The fabric lane stays off struct ncclDevComm; host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged. - Fabric regMrSym via ncclFabricMemHandler; lane table and agree allgather - GPU-initiated fabric DDA LL body shared with host launcher; private LL epoch and carved peer scratch (no sharing with host DDA cells) - Defaults tuned on MI455 1p4g: 256 KiB LL gate, 4 blocks-per-peer - Require --rocshmem-gin with the device linker; skip IB RMA verbs init on gfx1250 for Anvil-SDMA or unset NCCL_GIN_TYPE - rocshmem: spread SDMA queue creation across engines; connect rollback - Host/plugin unit tests, policy tests, and GIN CI wiring JIRA: ROCM-30633 Co-authored-by: Cursor <cursoragent@cursor.com>
Enable GPU-initiated GIN device-API AllToAll on gfx1250 + MNNVL + a single clique (rccl-tests Test#5, NCCL_GIN_TYPE=6, -D 3). One kernel reads the Anvil GPU context and selects fabric DDA LL, optional LSA-flat, or gin.put / SDMA from size, scratch, and threshold gates. The fabric lane stays off struct ncclDevComm; host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged. - Fabric regMrSym via ncclFabricMemHandler; lane table and agree allgather - GPU-initiated fabric DDA LL body shared with host launcher; private LL epoch and carved peer scratch (no sharing with host DDA cells) - Defaults tuned on MI455 1p4g: 256 KiB LL gate, 4 blocks-per-peer - Require --rocshmem-gin with the device linker; skip IB RMA verbs init on gfx1250 for Anvil-SDMA or unset NCCL_GIN_TYPE - rocshmem: spread SDMA queue creation across engines; connect rollback - Host/plugin unit tests, policy tests, and GIN CI wiring JIRA: ROCM-30633 Co-authored-by: Cursor <cursoragent@cursor.com>
Enable GPU-initiated GIN device-API AllToAll on gfx1250 + MNNVL + a single clique (rccl-tests Test#5, NCCL_GIN_TYPE=6, -D 3). One kernel reads the Anvil GPU context and selects fabric DDA LL, optional LSA-flat, or gin.put / SDMA from size, scratch, and threshold gates. The fabric lane stays off struct ncclDevComm; host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged. - Fabric regMrSym via ncclFabricMemHandler; lane table and agree allgather - GPU-initiated fabric DDA LL body shared with host launcher; private LL epoch and carved peer scratch (no sharing with host DDA cells) - Defaults tuned on MI455 1p4g: 256 KiB LL gate, 4 blocks-per-peer - Require --rocshmem-gin with the device linker; skip IB RMA verbs init on gfx1250 for Anvil-SDMA or unset NCCL_GIN_TYPE - rocshmem: spread SDMA queue creation across engines; connect rollback - Host/plugin unit tests, policy tests, and GIN CI wiring JIRA: ROCM-30633 Co-authored-by: Cursor <cursoragent@cursor.com>
Enable GPU-initiated GIN device-API AllToAll on gfx1250 + MNNVL + a single clique (rccl-tests Test#5, NCCL_GIN_TYPE=6, -D 3). One kernel reads the Anvil GPU context and selects fabric DDA LL, optional LSA-flat, or gin.put / SDMA from size, scratch, and threshold gates. The fabric lane stays off struct ncclDevComm; host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged. - Fabric regMrSym via ncclFabricMemHandler; lane table and agree allgather - GPU-initiated fabric DDA LL body shared with host launcher; private LL epoch and carved peer scratch (no sharing with host DDA cells) - Defaults tuned on MI455 1p4g: 256 KiB LL gate, 4 blocks-per-peer - Require --rocshmem-gin with the device linker; skip IB RMA verbs init on gfx1250 for Anvil-SDMA or unset NCCL_GIN_TYPE - rocshmem: spread SDMA queue creation across engines; connect rollback - Host/plugin unit tests, policy tests, and GIN CI wiring JIRA: ROCM-30633 Co-authored-by: Cursor <cursoragent@cursor.com>
Enable GPU-initiated GIN device-API AllToAll on gfx1250 + MNNVL + a single clique (rccl-tests Test#5, NCCL_GIN_TYPE=6, -D 3). One kernel reads the Anvil GPU context and selects fabric DDA LL, optional LSA-flat, or gin.put / SDMA from size, scratch, and threshold gates. The fabric lane stays off struct ncclDevComm; host ncclAllToAll GIN-SDMA (ROCm#10386) is unchanged. - Fabric regMrSym via ncclFabricMemHandler; lane table and agree allgather - GPU-initiated fabric DDA LL body shared with host launcher; private LL epoch and carved peer scratch (no sharing with host DDA cells) - Defaults tuned on MI455 1p4g: 256 KiB LL gate, 4 blocks-per-peer - Require --rocshmem-gin with the device linker; skip IB RMA verbs init on gfx1250 for Anvil-SDMA or unset NCCL_GIN_TYPE - rocshmem: spread SDMA queue creation across engines; connect rollback - Host/plugin unit tests, policy tests, and GIN CI wiring JIRA: ROCM-30633 Co-authored-by: Cursor <cursoragent@cursor.com>
## Motivation
Implement GIN-SDMA alltoall inside RCCL, which is called from within
`ncclAllToAll` if the eligibility criteria are satisfied.
With this, rccl-tests no longer needs to be linked with rocSHMEM GIN
host symbols for the SDMA backend, and the `-D 3` option when calling
alltoall_perf can be dropped.
It also lets external apps use the GIN-SDMA alltoall through
`ncclAllToAll` without linking the rocSHMEM SDMA symbols themselves.
## Technical Details
Currently, when rccl is built with the `--rocshmem-gin` flag, the host
symbols are left unresolved, which are resolved while building
rccl-tests with `ENABLE_ROCSHMEM_GIN=ON`.
With this change, librccl is made self-contained with the SDMA host
symbols, so the internal alltoall implementation can reach the SDMA
backend without the application supplying them. They are extracted from
librocshmem.a at build time and seeded by the `gin_anvil_sdma_*` entry
points, so upstream file renames do not break it.
The extracted symbols are kept local to librccl with --exclude-libs, so
rccl-tests built with `ENABLE_ROCSHMEM_GIN=ON` can still run rocSHMEM
GDA or SDMA with `-D 3/4`
## Issue Tracking
JIRA ID: AICOMRCCL-1682
## Test Plan
- Add `NCCL_GIN_TYPE=6 alltoall_perf -R 2` run to the GIN CI and monitor
- Passing
- Steps to manually test:
Build & Run:
```
cd rccl
bash install.sh -l --rocshmem-gin
cd rccl-tests
make clean
GPU_TARGETS=gfx950 make -j \
MPI=1 \
ENABLE_DEVICE_API=1 \
MPI_HOME="${MPI_HOME}" \
NCCL_HOME="${ROCM_SYSTEMS}/rccl/build/release"
mpirun \
--allow-run-as-root \
-np 8 \
--map-by ppr:8:node \
--mca pml ob1 \
--mca btl ^vader,openib \
-x PATH \
-x LD_LIBRARY_PATH \
-x NCCL_DEBUG=VERSION \
-x NCCL_GIN_TYPE=6 \
-x NCCL_CUMEM_ENABLE=1 \
rccl-tests/build/alltoall_perf \
-b 1 \
-e 4G \
-f 2 \
-g 1 \
-R 2
```
- Created stacked #10388 for tests
## Test Result
- GIN Device tests in GinDeviceMPITests.cpp passes for SDMA
- New `GinMPIDeviceTests.Alltoall_SdmaInternal` passes
## Submission Checklist
- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
## 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>
## Motivation
Implement GIN-SDMA alltoall inside RCCL, which is called from within
`ncclAllToAll` if the eligibility criteria are satisfied.
With this, rccl-tests no longer needs to be linked with rocSHMEM GIN
host symbols for the SDMA backend, and the `-D 3` option when calling
alltoall_perf can be dropped.
It also lets external apps use the GIN-SDMA alltoall through
`ncclAllToAll` without linking the rocSHMEM SDMA symbols themselves.
## Technical Details
Currently, when rccl is built with the `--rocshmem-gin` flag, the host
symbols are left unresolved, which are resolved while building
rccl-tests with `ENABLE_ROCSHMEM_GIN=ON`.
With this change, librccl is made self-contained with the SDMA host
symbols, so the internal alltoall implementation can reach the SDMA
backend without the application supplying them. They are extracted from
librocshmem.a at build time and seeded by the `gin_anvil_sdma_*` entry
points, so upstream file renames do not break it.
The extracted symbols are kept local to librccl with --exclude-libs, so
rccl-tests built with `ENABLE_ROCSHMEM_GIN=ON` can still run rocSHMEM
GDA or SDMA with `-D 3/4`
## Issue Tracking
JIRA ID: AICOMRCCL-1682
## Test Plan
- Add `NCCL_GIN_TYPE=6 alltoall_perf -R 2` run to the GIN CI and monitor
- Passing
- Steps to manually test:
Build & Run:
```
cd rccl
bash install.sh -l --rocshmem-gin
cd rccl-tests
make clean
GPU_TARGETS=gfx950 make -j \
MPI=1 \
ENABLE_DEVICE_API=1 \
MPI_HOME="${MPI_HOME}" \
NCCL_HOME="${ROCM_SYSTEMS}/rccl/build/release"
mpirun \
--allow-run-as-root \
-np 8 \
--map-by ppr:8:node \
--mca pml ob1 \
--mca btl ^vader,openib \
-x PATH \
-x LD_LIBRARY_PATH \
-x NCCL_DEBUG=VERSION \
-x NCCL_GIN_TYPE=6 \
-x NCCL_CUMEM_ENABLE=1 \
rccl-tests/build/alltoall_perf \
-b 1 \
-e 4G \
-f 2 \
-g 1 \
-R 2
```
- Created stacked #10388 for tests
## Test Result
- GIN Device tests in GinDeviceMPITests.cpp passes for SDMA
- New `GinMPIDeviceTests.Alltoall_SdmaInternal` passes
## Submission Checklist
- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
## 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>
## Motivation
Implement GIN-SDMA alltoall inside RCCL, which is called from within
`ncclAllToAll` if the eligibility criteria are satisfied.
With this, rccl-tests no longer needs to be linked with rocSHMEM GIN
host symbols for the SDMA backend, and the `-D 3` option when calling
alltoall_perf can be dropped.
It also lets external apps use the GIN-SDMA alltoall through
`ncclAllToAll` without linking the rocSHMEM SDMA symbols themselves.
## Technical Details
Currently, when rccl is built with the `--rocshmem-gin` flag, the host
symbols are left unresolved, which are resolved while building
rccl-tests with `ENABLE_ROCSHMEM_GIN=ON`.
With this change, librccl is made self-contained with the SDMA host
symbols, so the internal alltoall implementation can reach the SDMA
backend without the application supplying them. They are extracted from
librocshmem.a at build time and seeded by the `gin_anvil_sdma_*` entry
points, so upstream file renames do not break it.
The extracted symbols are kept local to librccl with --exclude-libs, so
rccl-tests built with `ENABLE_ROCSHMEM_GIN=ON` can still run rocSHMEM
GDA or SDMA with `-D 3/4`
## Issue Tracking
JIRA ID: AICOMRCCL-1682
## Test Plan
- Add `NCCL_GIN_TYPE=6 alltoall_perf -R 2` run to the GIN CI and monitor
- Passing
- Steps to manually test:
Build & Run:
```
cd rccl
bash install.sh -l --rocshmem-gin
cd rccl-tests
make clean
GPU_TARGETS=gfx950 make -j \
MPI=1 \
ENABLE_DEVICE_API=1 \
MPI_HOME="${MPI_HOME}" \
NCCL_HOME="${ROCM_SYSTEMS}/rccl/build/release"
mpirun \
--allow-run-as-root \
-np 8 \
--map-by ppr:8:node \
--mca pml ob1 \
--mca btl ^vader,openib \
-x PATH \
-x LD_LIBRARY_PATH \
-x NCCL_DEBUG=VERSION \
-x NCCL_GIN_TYPE=6 \
-x NCCL_CUMEM_ENABLE=1 \
rccl-tests/build/alltoall_perf \
-b 1 \
-e 4G \
-f 2 \
-g 1 \
-R 2
```
- Created stacked #10388 for tests
## Test Result
- GIN Device tests in GinDeviceMPITests.cpp passes for SDMA
- New `GinMPIDeviceTests.Alltoall_SdmaInternal` passes
## Submission Checklist
- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
## 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>
Motivation
Implement GIN-SDMA alltoall inside RCCL, which is called from within
ncclAllToAllif the eligibility criteria are satisfied.With this, rccl-tests no longer needs to be linked with rocSHMEM GIN host symbols for the SDMA backend, and the
-D 3option when calling alltoall_perf can be dropped.It also lets external apps use the GIN-SDMA alltoall through
ncclAllToAllwithout linking the rocSHMEM SDMA symbols themselves.Technical Details
Currently, when rccl is built with the
--rocshmem-ginflag, the host symbols are left unresolved, which are resolved while building rccl-tests withENABLE_ROCSHMEM_GIN=ON.With this change, librccl is made self-contained with the SDMA host symbols, so the internal alltoall implementation can reach the SDMA backend without the application supplying them. They are extracted from librocshmem.a at build time and seeded by the
gin_anvil_sdma_*entry points, so upstream file renames do not break it.The extracted symbols are kept local to librccl with --exclude-libs, so rccl-tests built with
ENABLE_ROCSHMEM_GIN=ONcan still run rocSHMEM GDA or SDMA with-D 3/4Issue Tracking
JIRA ID: AICOMRCCL-1682
Test Plan
Add
NCCL_GIN_TYPE=6 alltoall_perf -R 2run to the GIN CI and monitor - PassingSteps to manually test:
Build & Run:
Created stacked test(rccl): gin device tests for sdma #10388 for tests
Test Result
GinMPIDeviceTests.Alltoall_SdmaInternalpassesSubmission Checklist