Skip to content

fix(rccl/gin): resolve VA signals on the rocSHMEM GDA backend - #14203

Merged
dlamd1dai merged 2 commits into
developfrom
users/dondai/aicomrccl-3180-gda-va-signals
Oct 28, 2026
Merged

dlamd1dai merged 2 commits into
developfrom
users/dondai/aicomrccl-3180-gda-va-signals

Conversation

@dlamd1dai

@dlamd1dai dlamd1dai commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

The rocSHMEM GDA backend (NCCL_GIN_TYPE=6) advertises supportsVASignals = true, but its device path never handled VA signals. Put and PutValue built the signal address from indexedSignal.signalId for every descriptor. For a VA descriptor, that field aliases vaSignal.signalWindow in the same union, so the atomic landed at an unrelated offset past the indexed signal buffer and never reached the VA cell. ResetSignal ignored VA descriptors. The MPI tests already skipped VASignal_* on GDA, while the plugin claimed support.

This is the VA-signal half of AICOMRCCL-3180. Strong-signal ordering on GDA comes in a follow-up PR.

Technical Details

Device (gin_rocshmem_gda.h)

  • New detail::gdaSignalTarget() returns the remote address and rkey of the cell a signal targets. A VA signal resolves through its window's per-peer remote_vas and rkeys, the same way a put destination is resolved. An indexed signal keeps today's per-context stripe lookup.
  • Put and PutValue both call it, so neither one reads indexedSignal off a VA descriptor any more.
  • ResetSignal clears a VA cell through the window's local_va, the same way Anvil does since feat(gin/sdma): honour strong signals on the Anvil SDMA backend #12748.

Host (gin_plugin_rocshmem_gda.cc)

  • regMrSym registers windows with atomic=1 (IBV_ACCESS_REMOTE_ATOMIC). A VA signal is an RDMA atomic into a window cell, and without the flag the NIC rejects it and moves the queue pair to an error state. GDAKI already registers windows this way.

Unchanged

  • supportsStrongSignals and ncclGinApi_SupportsStrongSignal stay as they are. The follow-up handles them.
  • Weak and strong signals still post a single atomic_add after the put.

Issue Tracking

JIRA ID: AICOMRCCL-3180

Test Plan

  • Device fixtures, mocked queue pair, no NIC (rccl-UnitTestsFixtures --gtest_filter=GinRocshmemGdaTemplateTest.*):
    • VaSignal_PutSignalsWindowCell: for both Put and PutValue, the payload lands, the VA cell takes the signal argument, and no indexed signal changes.
    • ResetSignal_VaClearsWindowCell: the VA cell is cleared and indexed signals are untouched.
  • Host plugin test (rccl-UnitTestsGinRocshmemGdaPlugin):
    • RegMrSym_AllowsRemoteAtomicsForVaSignals: the window MR is registered with atomic=1, and the device memory handle carries the local VA plus the per-peer VAs and rkeys.
  • MPI on hardware (NCCL_GIN_TYPE=6, np 2): GinMPIDeviceTests.VASignal_* no longer skip GDA. This run is the one that matters, because the mocked queue pair ignores rkeys and only a real NIC shows whether the atomic is accepted.

Test Result

  • rccl-UnitTestsGinRocshmemGdaPlugin --gtest_filter=GinRocshmemGdaPluginTest.*: 6 passed.
  • rccl-UnitTestsFixtures --gtest_filter=GinRocshmemGdaTemplateTest.*: 18 passed, including both VA-signal cases.
  • MPI, np 2 on one node, NCCL_GIN_TYPE=6, rebased build: VASignal_Put, VASignal_NoPayload_IncAndAdd, VASignal_ReadAndReset and VASignal_StrictOrderingFlag passed, and VASignal_Put_MultiContext passed with NCCL_GIN_NCONTEXTS=2, on both NICs:
    • MI300X with ConnectX-7 (mlx5).
    • MI300X with Broadcom BCM57608 (bnxt_re, firmware 233.2.104.0). GIN picked rocshmem-gda and registered the windows with real rkeys.
  • Both runs keep the two ranks on one node, so the RDMA traffic goes through NIC loopback, not across nodes.

Submission Checklist

@dlamd1dai
dlamd1dai marked this pull request as ready for review October 24, 2026 06:11
@dlamd1dai
dlamd1dai requested review from a team as code owners October 24, 2026 06:11
@dlamd1dai dlamd1dai self-assigned this Oct 24, 2026

@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.

ARGUS

Findings

2 more finding(s), not posted inline
  • projects/rccl/test/device/GinRocshmemGdaTemplate_test.cpp:756 (Low) VaSignal_PutSignalsWindowCell cannot detect a wrong VA rkey, because GdaEnv zeroes every rkey (lines 115-116) and the rocSHMEM mock records only counts. Seed distinct per-peer rkeys once the mock records them.
  • projects/rccl/test/device/GinRocshmemGdaTemplate_test.cpp:587 (Nit) Trailing comment at line 587 says 'non-indexed reset', but a VA reset now clears its cell. Say 'NONE reset'. The trailing comment at line 587 still says "untouched by non-indexed reset". A VA reset now clears its cell, so could it say "untouched by NONE reset"?

Bottom line: Worth settling before approval: the four newly un-skipped VASignal_* MPI cases, including VASignal_ReadAndReset, are not scheduled on NCCL_GIN_TYPE=6, so the VA ResetSignal path gets no end-to-end GDA run.

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

@dlamd1dai
dlamd1dai force-pushed the users/dondai/aicomrccl-3180-gda-va-signals branch from f0e2cd4 to e47453b Compare October 24, 2026 21:32

@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.

ARGUS

Bottom line: LGTM.

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

Base automatically changed from users/dondai/gin-anvil-sdma-strong-signal to develop October 25, 2026 21:13
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

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

🙋 Wish to Override Policy?

dlamd1dai and others added 2 commits October 26, 2026 22:58
The GDA plugin advertises supportsVASignals, but Put and PutValue built the
signal address from indexedSignal.signalId for every descriptor. For a VA
descriptor that field aliases vaSignal.signalWindow, so the atomic landed at
an unrelated offset past the indexed signal buffer. ResetSignal ignored VA
descriptors.

- Put/PutValue resolve a VA signal through its window's per-peer remote VA
  and rkey, the same way a put destination is resolved.
- ResetSignal clears a VA cell through the window's local VA.
- regMrSym registers windows with remote atomics, which the NIC requires
  for an RDMA atomic into a window cell.
- GinMPIDeviceTests.VASignal_* no longer skip GDA.

JIRA ID: AICOMRCCL-3180

Co-authored-by: Cursor <cursoragent@cursor.com>
The GDA VA-signal fix un-skipped VASignal_NoPayload_IncAndAdd,
VASignal_ReadAndReset, VASignal_StrictOrderingFlag and
VASignal_Put_MultiContext, but no job ran them with NCCL_GIN_TYPE=6.
Add them to gin_devmpi_gda and to gin-tests.json, with
NCCL_GIN_NCONTEXTS=2 for the multi-context case.

JIRA ID: AICOMRCCL-3180

Co-authored-by: Cursor <cursoragent@cursor.com>
@dlamd1dai
dlamd1dai force-pushed the users/dondai/aicomrccl-3180-gda-va-signals branch from 15a7e10 to 0b76b5e Compare October 27, 2026 02:58

@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.

ARGUS

Bottom line: LGTM.

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

@github-actions

Copy link
Copy Markdown
Contributor

pr-rocm-systems-14203-oci-rccl-pr-smoke

Builds

Stack Component Version Commit Status Build time
pr-14203_rccl-debug_rocm-10.1-ga gcc-13.2 13.2.0 13.2.0 cached
pr-14203_rccl-debug_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-14203_rccl-debug_rocm-10.1-ga openmpi-5.0.8 5.0.8 5.0.8 cached
pr-14203_rccl-debug_rocm-10.1-ga rccl-pr-14203 0b76b5e 0b76b5e cached
pr-14203_rccl-debug_rocm-10.1-ga rccl_gtest-pr-14203-debug 0b76b5e 0b76b5e cached
pr-14203_rccl-perf_rocm-10.1-ga gcc-13.2 13.2.0 13.2.0 cached
pr-14203_rccl-perf_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-14203_rccl-perf_rocm-10.1-ga openmpi-5.0.8 5.0.8 5.0.8 cached
pr-14203_rccl-perf_rocm-10.1-ga rccl-pr-14203 0b76b5e 0b76b5e cached
pr-14203_rccl-perf_rocm-10.1-ga rccl-tests-develop-perf develop 05f8852 cached
pr-14203_rccl-perf_rocm-10.2-latest gcc-13.2 13.2.0 13.2.0 cached
pr-14203_rccl-perf_rocm-10.2-latest rocm-10.2-latest 10.2.0rc0 10.2.0rc0 cached
pr-14203_rccl-perf_rocm-10.2-latest openmpi-5.0.8 5.0.8 5.0.8 cached
pr-14203_rccl-perf_rocm-10.2-latest rccl-pr-14203 0b76b5e 0b76b5e cached
pr-14203_rccl-perf_rocm-10.2-latest rccl-tests-develop-perf develop 05f8852 cached
rocm-10.1-ga_rccl-develop-perf gcc-13.2 13.2.0 13.2.0 cached
rocm-10.1-ga_rccl-develop-perf rocm-10.1-ga 10.1.0 10.1.0 cached
rocm-10.1-ga_rccl-develop-perf openmpi-5.0.8 5.0.8 5.0.8 cached
rocm-10.1-ga_rccl-develop-perf rccl-develop develop 05f8852 cached
rocm-10.1-ga_rccl-develop-perf rccl-tests-develop-perf develop 05f8852 cached

Failures

No failing tests in this run.

15 tests skipped.

@github-actions

Copy link
Copy Markdown
Contributor

pr-rocm-systems-14203-ruby64-rccl-pr-smoke

Builds

Stack Component Version Commit Status Build time
pr-14203_rccl-debug_rocm-10.1-ga gcc-11.5 11.5.0 11.5.0 cached
pr-14203_rccl-debug_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-14203_rccl-debug_rocm-10.1-ga openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-14203_rccl-debug_rocm-10.1-ga rccl-pr-14203 0b76b5e 0b76b5e cached
pr-14203_rccl-debug_rocm-10.1-ga rccl_gtest-pr-14203-debug 0b76b5e 0b76b5e cached
pr-14203_rccl-perf_rocm-10.1-ga gcc-11.5 11.5.0 11.5.0 cached
pr-14203_rccl-perf_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-14203_rccl-perf_rocm-10.1-ga openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-14203_rccl-perf_rocm-10.1-ga rccl-pr-14203 0b76b5e 0b76b5e cached
pr-14203_rccl-perf_rocm-10.1-ga rcclt-develop-perf develop 53f1a08 cached
pr-14203_rccl-perf_rocm-10.2-latest gcc-11.5 11.5.0 11.5.0 cached
pr-14203_rccl-perf_rocm-10.2-latest rocm-10.2-latest 10.2.0rc0 10.2.0rc0 cached
pr-14203_rccl-perf_rocm-10.2-latest openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-14203_rccl-perf_rocm-10.2-latest rccl-pr-14203 0b76b5e 0b76b5e cached
pr-14203_rccl-perf_rocm-10.2-latest rcclt-develop-perf develop 53f1a08 cached
rocm-10.1-ga_rccl-develop-perf gcc-11.5 11.5.0 11.5.0 cached
rocm-10.1-ga_rccl-develop-perf rocm-10.1-ga 10.1.0 10.1.0 cached
rocm-10.1-ga_rccl-develop-perf openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
rocm-10.1-ga_rccl-develop-perf rccl-develop develop 53f1a08 cached
rocm-10.1-ga_rccl-develop-perf rcclt-develop-perf develop 53f1a08 cached

Failures

No failing tests in this run.

15 tests skipped.

@abouteiller abouteiller 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.

Great!

@aduforest aduforest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good

@dlamd1dai
dlamd1dai merged commit be26edf into develop Oct 28, 2026
63 of 67 checks passed
@dlamd1dai
dlamd1dai deleted the users/dondai/aicomrccl-3180-gda-va-signals branch October 28, 2026 04:07
ywang103-amd pushed a commit that referenced this pull request Oct 28, 2026
## Motivation

The rocSHMEM GDA backend (`NCCL_GIN_TYPE=6`) advertises
`supportsVASignals = true`, but its device path never handled VA
signals. `Put` and `PutValue` built the signal address from
`indexedSignal.signalId` for every descriptor. For a VA descriptor, that
field aliases `vaSignal.signalWindow` in the same union, so the atomic
landed at an unrelated offset past the indexed signal buffer and never
reached the VA cell. `ResetSignal` ignored VA descriptors. The MPI tests
already skipped `VASignal_*` on GDA, while the plugin claimed support.

This is the VA-signal half of AICOMRCCL-3180. Strong-signal ordering on
GDA comes in a follow-up PR.

## Technical Details

**Device (`gin_rocshmem_gda.h`)**
- New `detail::gdaSignalTarget()` returns the remote address and rkey of
the cell a signal targets. A VA signal resolves through its window's
per-peer `remote_vas` and `rkeys`, the same way a put destination is
resolved. An indexed signal keeps today's per-context stripe lookup.
- `Put` and `PutValue` both call it, so neither one reads
`indexedSignal` off a VA descriptor any more.
- `ResetSignal` clears a VA cell through the window's `local_va`, the
same way Anvil does since #12748.

**Host (`gin_plugin_rocshmem_gda.cc`)**
- `regMrSym` registers windows with `atomic=1`
(`IBV_ACCESS_REMOTE_ATOMIC`). A VA signal is an RDMA atomic into a
window cell, and without the flag the NIC rejects it and moves the queue
pair to an error state. GDAKI already registers windows this way.

**Unchanged**
- `supportsStrongSignals` and `ncclGinApi_SupportsStrongSignal` stay as
they are. The follow-up handles them.
- Weak and strong signals still post a single `atomic_add` after the
put.

## Issue Tracking

JIRA ID: AICOMRCCL-3180

## Test Plan

- Device fixtures, mocked queue pair, no NIC (`rccl-UnitTestsFixtures
--gtest_filter=GinRocshmemGdaTemplateTest.*`):
- `VaSignal_PutSignalsWindowCell`: for both `Put` and `PutValue`, the
payload lands, the VA cell takes the signal argument, and no indexed
signal changes.
- `ResetSignal_VaClearsWindowCell`: the VA cell is cleared and indexed
signals are untouched.
- Host plugin test (`rccl-UnitTestsGinRocshmemGdaPlugin`):
- `RegMrSym_AllowsRemoteAtomicsForVaSignals`: the window MR is
registered with `atomic=1`, and the device memory handle carries the
local VA plus the per-peer VAs and rkeys.
- MPI on hardware (`NCCL_GIN_TYPE=6`, np 2):
`GinMPIDeviceTests.VASignal_*` no longer skip GDA. This run is the one
that matters, because the mocked queue pair ignores rkeys and only a
real NIC shows whether the atomic is accepted.

## Test Result

- `rccl-UnitTestsGinRocshmemGdaPlugin
--gtest_filter=GinRocshmemGdaPluginTest.*`: 6 passed.
- `rccl-UnitTestsFixtures --gtest_filter=GinRocshmemGdaTemplateTest.*`:
18 passed, including both VA-signal cases.
- MPI, np 2 on one node, `NCCL_GIN_TYPE=6`, rebased build:
`VASignal_Put`, `VASignal_NoPayload_IncAndAdd`, `VASignal_ReadAndReset`
and `VASignal_StrictOrderingFlag` passed, and
`VASignal_Put_MultiContext` passed with `NCCL_GIN_NCONTEXTS=2`, on both
NICs:
  - MI300X with ConnectX-7 (mlx5).
- MI300X with Broadcom BCM57608 (bnxt_re, firmware 233.2.104.0). GIN
picked `rocshmem-gda` and registered the windows with real rkeys.
- Both runs keep the two ranks on one node, so the RDMA traffic goes
through NIC loopback, not across nodes.

## Submission Checklist

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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.

3 participants