Skip to content

[HIP] fix: gfx1250 LL ar - #6756

Merged
junhaha666 merged 2 commits into
mainfrom
gfx1250_ll_ar_fix
Oct 23, 2026
Merged

junhaha666 merged 2 commits into
mainfrom
gfx1250_ll_ar_fix

Conversation

@TennyWang1223

Copy link
Copy Markdown
Contributor

Motivation

fix gfx1250 LL allreduce error

Technical Details

change scratch buffer index

Test Plan

run ut with regression

Test Result

need test

Submission Checklist

Signed-off-by: ShaoChunLee <[email protected]>
@TennyWang1223
TennyWang1223 requested a review from a team October 21, 2026 03:35
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6756 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

@github-actions github-actions Bot changed the title fix: gfx1250 LL ar [HIP] fix: gfx1250 LL ar Oct 21, 2026
@github-actions github-actions Bot added the HIP label Oct 21, 2026
Signed-off-by: ShaoChunLee <[email protected]>
@zufayu

zufayu commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

@junhaha666 Since @TennyWang1223 is the author, could you please take the primary review for this gfx1250 custom all-reduce change? The relevant multi-GPU path needs real-hardware correctness, synchronization, topology, hang, and performance validation. I will co-review it from the communication integration side.

For reference, my preliminary pass found the epoch/bank synchronization fix directionally reasonable and did not identify a concrete code defect. The blocker is validation: the current green CI does not exercise the gfx1250 multi-GPU protocol being changed.

Please cover TP2/4/8, alternating message sizes that change the grid shape (including 512, 32768, and nearby boundaries), eager and graph replay, long back-to-back runs, and rank skew/delayed-rank cases. Approval should wait for correctness plus no-hang results on real gfx1250 hardware.

@junhaha666

Copy link
Copy Markdown
Contributor

@aiter-bot review

@aiter-bot

Copy link
Copy Markdown

ROCm/aiter PR #6756 — [HIP] fix: gfx1250 LL ar

Makes the gfx1250 low-latency allreduce's graph-safe epoch one shared value across all blocks — every launch now fans its epoch out to all 512 per-block flag entries (and the 2^32 wrap keeps bank parity), so a packet's owning block can no longer reuse a stale epoch/bank when back-to-back messages have different sizes — and adds a mixed-size multi-GPU regression test for it.

Review (advisory): ⚠️ NEEDS WORK
Validation (deterministic): NOT RUN — auto-validation disabled (REVIEW_AUTO_VALIDATE=0) and no gfx1250 GPU on this box (8× gfx942), so the target op_tests/multigpu_tests/test_custom_allreduce.py cannot exercise the changed kernel here; the PR's own Test Result section says "need test"
Perf (advisory): NOT RUN — no gfx1250 GPU on this box (8× gfx942) and auto-validation disabled, so no base-vs-head timing of the LL path exists; the fan-out adds one 4-byte epoch store per thread per launch (≤512 stores)

⚠️ [verified] The fix changes a multi-rank synchronization protocol but ships with no executed validation anywhere: the PR's Test Result says "need test", and the new regression test's body never runs in CI — the only multi-GPU job runs on MI350X/gfx950 (.github/workflows/aiter-test.yaml:1054) where the _is_gfx1250() guard (op_tests/multigpu_tests/test_custom_allreduce.py:304) returns early, and no gfx1250 multi-GPU CI job exists — so a protocol flaw this diff-level review cannot see (hang under rank skew, topology-specific behavior) would ship silently. Author must run the new regression on real gfx1250 hardware — TP2/4/8, eager and graph replay, long back-to-back runs — and post the results before merge.
📝 [verified] The epoch fan-out's cost is unmeasured: one 4-byte store per thread per launch (csrc/include/custom_all_reduce_gfx1250.cuh:355-357) lands on the low-latency path whose whole purpose is small-message latency, and no base-vs-head number exists (none can be produced on this gfx942-only box). Reviewer should ask for a base-vs-head LL latency measurement on gfx1250 that includes the fan-out before merge.
📝 [verified] The PR description says "change scratch buffer index", but the diff changes no scratch or bank indexing — bankOffPkts (csrc/include/custom_all_reduce_gfx1250.cuh:294) is untouched; what changed is the epoch-array fan-out, so a reviewer triaging by the description looks in the wrong place. Author must rewrite the description to name the per-block-epoch drift and the global-epoch fan-out (the new code comments already do).
📝 [verified] The wrap fix (f = 1u → f = 2u, csrc/include/custom_all_reduce_gfx1250.cuh:289) is a second behavior change bundled in: correct by inspection (0xFFFFFFFF and 1 are both odd, so the old code reused the same scratch bank twice at the 2^32 wrap) but unreachable by any practical test, since it needs 2^32 LL calls on one instance. Reviewer should ask the author to confirm the wrap/bank-parity reasoning on the PR thread, since no test can exercise it.

@junhaha666
junhaha666 merged commit dfc1702 into main Oct 23, 2026
@junhaha666
junhaha666 deleted the gfx1250_ll_ar_fix branch October 23, 2026 05:49
XiaobingSuper added a commit that referenced this pull request Oct 26, 2026
… rank skew

Speculative decoding alternates small fused all-reduce + RMSNorm calls
(the draft's norms) with larger ones (the target), plus plain all-reduces
and the barrier-synchronized logits all-gather, all on one custom
all-reduce instance while the ranks drift apart. This TP4 test runs that
mix with a different GPU-side delay per rank every step and checks every
result against an fp32 reference.

It fails when gfx1250 runs the old-arch fused kernels (they corrupt the
shared Signal and later collectives read stale rows) and on the LL
block-epoch race fixed in #6756.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants