Repository navigation
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
|
@argus re-review Follow-up on the review of
rocSHMEM scoped-atomics: split to #11591 so this PR stays scoped to AICOMRCCL-2339 signal de-aliasing. GIN CI on this PR may need that companion change (or an equivalent develop-side fix) to go green. MPI on SUT: planning to run |
970a014 to
7a72254
Compare
|
@argus re-review Rebased onto current
Also kept develop's LSA signal conn-check on the first bind, and indexed Get/FlushAsync through Follow-ups (separate PRs):
rocSHMEM: no longer in this diff (scoped-atomics landed via #11350). Removed the |
|
Follow-up PRs opened from current
|
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: hostAddrs at gin_plugin_anvil_sdma.cc:783 is sized in GIN-team ranks but anchored on devr->lsaSelf, so it reads past the allocation under RAIL.
Comment @argus review to re-run, or @argus re-review after pushing.
|
@argus re-review Follow-up on
Follow-ups, not in this PR (based on
Retest plan stays the single-node Anvil barrier ( |
There was a problem hiding this comment.
ARGUS
Bottom line: Worth settling before approval: the bind body's comm-wide allgather at gin_plugin_anvil_sdma.cc:798 now runs once per logical context instead of once per connection.
Comment @argus review to re-run, or @argus re-review after pushing.
CI status on
|
| Check | Why | What unblocks it |
|---|---|---|
| RCCL PR gate | IS_FORK=true, so coco smoke is never auto-dispatched (GATE_RESULT=skipped). The job's own error text says a maintainer must dispatch it. |
Please dispatch the RCCL coco PR workflow with this PR's pr_number and pr_sha, confirm it passes, then override the check. |
| therock-pr-bot | policy_check.py hit its 900 s limit while the emulation and Windows compiler-runtime stages were still null. The policy table itself is all-pass. |
Re-run once the slower build stages finish, or override. |
Separately, mci/rocm-libraries/precheckin(rccl) build 6 has been PENDING since 06:45 UTC with no completion — roughly 13 hours. That's the job that carries the GIN single-node result, so there is currently no GIN signal on the rebased code. Could someone with MathCI access check whether that build is stuck in queue and re-trigger it?
A new commit is coming shortly for the last open ARGUS thread, which will retrigger all of the above anyway — the coco dispatch is the one that will still need a manual hand.
|
@argus re-review Follow-up on
Two regression tests pin the frequency, both verified to fail on
Single-node Anvil retest on MI355X (
The remaining Low ( |
2d8eda4 to
f32754f
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
…ontexts Register the full Anvil signal span once in the IPC table, slice counters per logical context like proxy, replace rocSHmem __hip_atomic_* with scoped atomics, and tighten regression coverage for de-aliased signal stripes. Co-authored-by: Cursor <cursoragent@cursor.com>
Add PutValue_SelectLogicalContext so non-zero contextId coverage matches the other Anvil device APIs. Revert the scoped-atomic rocSHMEM hunk here; it lands separately so this PR stays scoped to signal de-aliasing. Co-authored-by: Cursor <cursoragent@cursor.com>
Move slot initialization before NCCLCHECKGOTO so the host plugin builds, and set the Anvil backend enum explicitly in the regression kernel instead of assigning a uint8_t ginNetDeviceTypes entry. Co-authored-by: Cursor <cursoragent@cursor.com>
Make empty anvil pending lists succeed so non-anvil GIN backends keep building communicators, align signal peer geometry on lsaSelf, rename the bind slot count, and tighten logical-context tests so they fail if context indexing regresses. Co-authored-by: Cursor <cursoragent@cursor.com>
signal_remote_addrs is read with a GIN-team peer, so anchoring the table on lsaSelf walks off the allocation under RAIL. Also reset the plugin test LSA latch between binds, and cover a second pending context so slot and contextId are not the same index. Co-authored-by: Cursor <cursoragent@cursor.com>
The per-contextId loop pulled two comm-wide collectives into the bind body, so ncclDevCommCreate paid one bootstrap round trip per logical context instead of one per connection. The local-base probe moves into ginAnvilRegisterSignalSpan, which is already per span, and the conn-check moves to the caller: its bypass and skip paths return before the comm is marked, so the dedup flag never suppressed the repeat. Also drops the spanRefs fallback, which could only fire when the span was never registered, and the dead gpuCtxHost stores after the context is untracked. Co-authored-by: Cursor <cursoragent@cursor.com>
bootstrapAllGather writes one slot per world rank, so the span base probe is sized and indexed with comm->nRanks / comm->rank. The GIN team is smaller under NCCL_GIN_CONNECTION_RAIL, which overran the buffer and published the local VA in the wrong slot. The bind walk also read g_pendingByComm without pluginMutex, which add, remove, and clear all hold. Snapshot the list under the lock once and walk the copy, so registration and clear can still take the same non-recursive mutex. Co-authored-by: Cursor <cursoragent@cursor.com>
f32754f to
cf8cf97
Compare
|
Rebased onto What changed since the last review pass
Retest (clean worktree at
Asks
@argus re-review |
|
Superseded by #12751 and closing in favour of it. Same commits, same content; identical head SHA. Why. This PR was opened from a fork, and the required Review history stays here: 27 threads, all resolved. No approval was lost -- this PR had no approval or changes-requested decision -- so the conclusions still apply to #12751. Closing so this does not keep consuming CI or show up as a duplicate for reviewers; it stays readable and can be reopened. |
> **Replaces #12440.** Identical production commits; only the head branch moved (plus follow-up unit-test coverage on this PR). > > #12440 was opened from a fork, where the required `RCCL PR gate` check can never pass. Fork pull requests receive no secrets, so the `RCCL coco PR` workflow skips its `Setup` job, the coco smoke never runs, and the gate fails closed in a few seconds. Clearing it there needs a maintainer to dispatch the workflow by hand and then override the check. This branch lives in `ROCm/rocm-systems`, so the gate dispatches coco on its own. > > Review threads from #12440 have been replied to and resolved (sentinel assertion and device stripe coverage fixed here; host-plugin unit target, cross-rank `nContexts` validation, and the rail allgather buffer sizing left as follow-ups). ## Motivation Follow-up to #11569 / AICOMRCCL-2339. Anvil SDMA now indexes `ctx.handle` by `ctx.contextId`, but `NCCL_GIN_TYPE=5` (rocSHMEM-GDA) still casts `ctx.handle` with no context index and never reads `config->nContexts`, so AllContexts barriers on a shared connection can still complete on a stale signal count. ## Technical Details - Device APIs resolve `gdaGpuCtx(ctx)` as `handle[contextId]` - `createContext` allocates one GPU-context slot per logical context, with a shared QP array and contiguous signal/counter spans sliced per context - Adds `SignalApis_SelectLogicalContext` (sentinel-seeded reset) and `Put_SelectLogicalContextSignalStripe` device coverage via a multi-context `GdaEnv` JIRA ID: AICOMRCCL-2339 AICOMRCCL-3072 ## Test Plan - `GinRocshmemGdaTemplateTest.SignalApis_SelectLogicalContext` - `GinRocshmemGdaTemplateTest.Put_SelectLogicalContextSignalStripe` - Existing GDA template suite still passes with `contextId=0` default ## Test Result - Device template coverage updated in this PR; CI / coco smoke will re-run on the new commit ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md. Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com>
> **Replaces #11569.** Identical commits and content; head is `cf8cf9720f16391c76a19534b2af34eaea0c67cd` on both. > > #11569 was opened from a fork, where the required `RCCL PR gate` check can never pass. Fork pull requests receive no secrets, so the `RCCL coco PR` workflow skips its `Setup` job, the coco smoke never runs, and the gate fails closed within seconds. Clearing it there needs a maintainer to dispatch the workflow by hand and override the check, on every push. This branch lives in `ROCm/rocm-systems`, so the gate dispatches coco to the Ruby and OCI clusters on its own. > > Review history stays on #11569: 27 threads, all resolved. No approval was lost; it had no approval or changes-requested decision. ## Motivation Anvil SDMA currently allocates one GPU context per connection and ignores `nContexts`. When `ncclGinAllContexts` barriers run on a shared connection, every logical context writes and waits on the same signal cells, so a later barrier can complete on a stale count from an earlier one. ## Technical Details Give each logical context its own `ncclGinAnvilSdmaGPUContext` and LSA signal stripe while keeping SDMA queues, dirty bits, and counters shared at the connection. Device APIs now index `ctx.handle` by `ctx.contextId`. Resource-window bind walks `nContexts` slots instead of one slot per plugin context. Signal peer addresses are indexed in GIN-team space (`ctx->rank`), matching `resolveRemotePeerVa`; `regMrSym` keeps `devr->lsaSelf` because that table is LSA-indexed. The signal span is registered in the IPC table once per bind rather than once per context, and the comm-wide collectives (the local-base allgather and the LSA conn-check) run at span scope so a comm with N logical contexts still costs one bootstrap round trip, not N. Two fixes to the surrounding code are folded in, previously proposed standalone as #12450 and #12451 and closed in favour of this PR once the restructuring above made them inapplicable as separate patches: - The span base probe is sized with `comm->nRanks` and publishes the local VA at `comm->rank`. `bootstrapAllGather` writes one slot per world rank, so a GIN-team-sized buffer was overrun and the VA landed in the wrong slot under `NCCL_GIN_CONNECTION_RAIL`. - The bind path snapshots `g_pendingByComm` into a vector under `pluginMutex` and walks the copy. Its three reads (span geometry, slot binding, and `fail:` rollback) were unlocked while `ginAnvilPendingAdd`/`Remove`/`Clear` all hold that non-recursive mutex; `find()` also avoids default-inserting an empty list for a comm with nothing pending. JIRA ID: AICOMRCCL-2339 AICOMRCCL-3072 ## Test Plan - Host plugin unit tests, including `BindSignals_LogicalContextsUseDistinctSignalStripes` and the `ConnCheck_*` suite - Device template tests, including `SignalApis_SelectLogicalContext` and `PutValue_SelectLogicalContext` - MPI regression `Barrier_AllContextsConsecutiveSignalsDoNotAlias_SingleNode` (Anvil, 1 node / 2 ranks, `NCCL_GIN_TYPE=7`, delayed second barrier) ## Test Result Anvil SDMA is `NCCL_GIN_TYPE=7` (`NCCL_NET_DEVICE_GIN_ANVIL_SDMA`). Earlier runs in this section were recorded when the enum was 6. Pre-rebase (commit `970a014315`): - `rccl-UnitTestsGinAnvilPlugin`: 20/20 passed on MI355 - `GinAnvilSdmaTemplateTest.*`: 13/13 passed on MI355 (before `PutValue_SelectLogicalContext` was added) - `GinMPIDeviceTests.Barrier_AllContextsConsecutiveSignalsDoNotAlias_SingleNode` on MI355: **PASSED** (7779 ms) on `smci355-ccs-aus-m03-17`, 1 node / 2 ranks, `NCCL_GIN_ENABLE=1`, `NCCL_CUMEM_ENABLE=1`. Ran `rccl-UnitTestsMPI` inside `rccl-gin-pr11556-rs:latest` with `--ipc=host`. Host `mpirun` on the same node segfaulted in HIP IPC during communicator bring-up (`ncclP2pImportShareableBuffer` / `ncclDevrCommCreateInternal`) while other GPU docker jobs held `/dev/kfd` and `/dev/dri`; that path never reached the kernel. - Same MPI filter on MI350: **PASSED** (8834 ms) on `cv350-rck-g03-e23-08`, 1 node / 2 ranks, same GIN env. Host `mpirun -np 2`; GPUs were idle. Used the gfx950 `rccl-UnitTestsMPI`/`librccl.so.1` from the MI355 PR build (native CentOS 9 link of `librccl.so` failed on `librocshmem_gin_host.a` bitcode encoding; Docker was unavailable on that node). Current head `cf8cf9720f`, rebased onto `develop` at `482e541856`, retested from a clean worktree on MI355X (`smci355-ccs-aus-m03-17`), 1 node / 2 ranks, `NCCL_GIN_TYPE=7`, `NCCL_GIN_ENABLE=1`, `NCCL_CUMEM_ENABLE=1`, `NCCL_GIN_NCONTEXTS=4`: - `rccl-UnitTestsGinAnvilPlugin`: **37/37 passed** (304 ms), including the full `ConnCheck_*` suite and the two span-scope cases added for the ARGUS finding. Both were confirmed to fail against `8eafd3d752` (3 allgathers at `nContexts=3`) and pass here (1). - Whole `GinMPIDeviceTests.*` suite on the Anvil backend: **44 passed, 20 skipped, 0 failed** (40.1 s). Covers `Barrier_AllContextsConsecutiveSignalsDoNotAlias_SingleNode` (680 ms), all seven `BarrierFence_*_SingleNode` cases including `AllContextsPut`/`AllContextsGet`, `MultiContext_AllFourRoute`/`NonPowerOf2`/`Exclusive`, and `Put_BasicAndOffsets_MultiContext`/`PutValue_Inline_MultiContext`/`WaitCounterAndSignal_MultiContext`. - The 20 skips are topology or opt-in gated, not regressions: cross-node and 4-rank cases, `RailConnection_Create`, the `VASignal_*` cases (VA signals are unsupported on SDMA by design), and the pool tests that require `NCCL_GIN_SIGNAL_POOL_SIZE>=0x40000000`. An earlier attempt at this run skipped all 64 cases because `NCCL_CUMEM_ENABLE` was unset, which trips the `Symmetric memory required` gate; the numbers above are from the corrected invocation. Earlier post-rebase run on `f32754f6c1`, same node and env, before #12450/#12451 were folded in: plugin **37/37**, `GinMPIDeviceTests.*` **39 passed, 23 skipped, 0 failed** (34.5 s). Environment note: the host ROCm on that node is 7.0.2.1 while its KFD driver is newer, and `hipIpcOpenMemHandle` segfaults during plain P2P transport setup (`ncclP2pImportShareableBuffer`) before any GIN code runs. The runs above use the node's ROCm 7.13 runtime in a container with `--ipc=host`, where the same binaries pass. Not related to this change; the same workaround was needed for the pre-rebase runs. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md. Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Motivation
Anvil SDMA currently allocates one GPU context per connection and ignores
nContexts. WhenncclGinAllContextsbarriers run on a shared connection, every logical context writes and waits on the same signal cells, so a later barrier can complete on a stale count from an earlier one.Technical Details
Give each logical context its own
ncclGinAnvilSdmaGPUContextand LSA signal stripe while keeping SDMA queues, dirty bits, and counters shared at the connection. Device APIs now indexctx.handlebyctx.contextId. Resource-window bind walksnContextsslots instead of one slot per plugin context.Signal peer addresses are indexed in GIN-team space (
ctx->rank), matchingresolveRemotePeerVa;regMrSymkeepsdevr->lsaSelfbecause that table is LSA-indexed. The signal span is registered in the IPC table once per bind rather than once per context, and the comm-wide collectives (the local-base allgather and the LSA conn-check) run at span scope so a comm with N logical contexts still costs one bootstrap round trip, not N.Two fixes to the surrounding code are folded in, previously proposed standalone as #12450 and #12451 and closed in favour of this PR once the restructuring above made them inapplicable as separate patches:
comm->nRanksand publishes the local VA atcomm->rank.bootstrapAllGatherwrites one slot per world rank, so a GIN-team-sized buffer was overrun and the VA landed in the wrong slot underNCCL_GIN_CONNECTION_RAIL.g_pendingByComminto a vector underpluginMutexand walks the copy. Its three reads (span geometry, slot binding, andfail:rollback) were unlocked whileginAnvilPendingAdd/Remove/Clearall hold that non-recursive mutex;find()also avoids default-inserting an empty list for a comm with nothing pending.JIRA ID: AICOMRCCL-2339
Test Plan
BindSignals_LogicalContextsUseDistinctSignalStripesand theConnCheck_*suiteSignalApis_SelectLogicalContextandPutValue_SelectLogicalContextBarrier_AllContextsConsecutiveSignalsDoNotAlias_SingleNode(Anvil, 1 node / 2 ranks,NCCL_GIN_TYPE=7, delayed second barrier)Test Result
Anvil SDMA is
NCCL_GIN_TYPE=7(NCCL_NET_DEVICE_GIN_ANVIL_SDMA). Earlier runs in this section were recorded when the enum was 6.Pre-rebase (commit
970a014315):rccl-UnitTestsGinAnvilPlugin: 20/20 passed on MI355GinAnvilSdmaTemplateTest.*: 13/13 passed on MI355 (beforePutValue_SelectLogicalContextwas added)GinMPIDeviceTests.Barrier_AllContextsConsecutiveSignalsDoNotAlias_SingleNodeon MI355: PASSED (7779 ms) onsmci355-ccs-aus-m03-17, 1 node / 2 ranks,NCCL_GIN_ENABLE=1,NCCL_CUMEM_ENABLE=1. Ranrccl-UnitTestsMPIinsiderccl-gin-pr11556-rs:latestwith--ipc=host. Hostmpirunon the same node segfaulted in HIP IPC during communicator bring-up (ncclP2pImportShareableBuffer/ncclDevrCommCreateInternal) while other GPU docker jobs held/dev/kfdand/dev/dri; that path never reached the kernel.cv350-rck-g03-e23-08, 1 node / 2 ranks, same GIN env. Hostmpirun -np 2; GPUs were idle. Used the gfx950rccl-UnitTestsMPI/librccl.so.1from the MI355 PR build (native CentOS 9 link oflibrccl.sofailed onlibrocshmem_gin_host.abitcode encoding; Docker was unavailable on that node).Current head
cf8cf9720f, rebased ontodevelopat482e541856, retested from a clean worktree on MI355X (smci355-ccs-aus-m03-17), 1 node / 2 ranks,NCCL_GIN_TYPE=7,NCCL_GIN_ENABLE=1,NCCL_CUMEM_ENABLE=1,NCCL_GIN_NCONTEXTS=4:rccl-UnitTestsGinAnvilPlugin: 37/37 passed (304 ms), including the fullConnCheck_*suite and the two span-scope cases added for the ARGUS finding. Both were confirmed to fail against8eafd3d752(3 allgathers atnContexts=3) and pass here (1).GinMPIDeviceTests.*suite on the Anvil backend: 44 passed, 20 skipped, 0 failed (40.1 s). CoversBarrier_AllContextsConsecutiveSignalsDoNotAlias_SingleNode(680 ms), all sevenBarrierFence_*_SingleNodecases includingAllContextsPut/AllContextsGet,MultiContext_AllFourRoute/NonPowerOf2/Exclusive, andPut_BasicAndOffsets_MultiContext/PutValue_Inline_MultiContext/WaitCounterAndSignal_MultiContext.RailConnection_Create, theVASignal_*cases (VA signals are unsupported on SDMA by design), and the pool tests that requireNCCL_GIN_SIGNAL_POOL_SIZE>=0x40000000.An earlier attempt at this run skipped all 64 cases because
NCCL_CUMEM_ENABLEwas unset, which trips theSymmetric memory requiredgate; the numbers above are from the corrected invocation.Earlier post-rebase run on
f32754f6c1, same node and env, before #12450/#12451 were folded in: plugin 37/37,GinMPIDeviceTests.*39 passed, 23 skipped, 0 failed (34.5 s).Environment note: the host ROCm on that node is 7.0.2.1 while its KFD driver is newer, and
hipIpcOpenMemHandlesegfaults during plain P2P transport setup (ncclP2pImportShareableBuffer) before any GIN code runs. The runs above use the node's ROCm 7.13 runtime in a container with--ipc=host, where the same binaries pass. Not related to this change; the same workaround was needed for the pre-rebase runs.Submission Checklist
Made with Cursor