Repository navigation
feat(rocm): replace forced custom allreduce with two-shot rdna_ar - #22
Conversation
Push two-shot for messages above 32KB, plus bf16 and flat tensor spans, so gfx10x can leave VLLM_FORCE_CUSTOM_ALL_REDUCE off. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
… on 4x V620 Integrate PR #22 (two-shot push reduce-scatter + allgather above VLLM_RDNA_AR_ONESHOT_KB, bf16, flat spans, abort phases 3/4) and fix the gate default that otherwise silently disables the backend. Validated on 4x V620 (TP=4, Flash-Next W4A16, Triton attn, FPP mode 3, TunableOp rows; MTP=0/2, 1k/512 + 16k/1k, c=1/8): every cell 100% success, coherent probes, no wedge markers. Results vs pre-PR one-shot path and vs PYNCCL (full tables in gfx1030_optimized docs/rdna2/pr22-twoshot-validation): - MAX_KB=20480: boot self-test passes (20 MB two-shot ~5.7 ms/call), decode at parity (1k/512 c=1 TPOT 23.26 ms vs 25.75 RCCL), cold 16k prefill +4% (1755 vs 1686 tok/s), 16k/1k c=8 MTP=0 aggregate 77.3 tok/s (75.9 pre-PR). - MAX_KB=64/128: boot self-test trial 2 (two-shot) fails nondeterministically (wrong result at 64 KiB; at 128 KiB "peer rank 1's flag never arrived" at collective #10 / partial wrong result) -> backend self-disables -> PYNCCL only -> ~5-10% decode regression. Small-gate two-shot sync bug is a follow-up; wide gate is the validated config. - vllm/distributed/device_communicators/rdna_all_reduce.py: gate default 64 -> 20480 KiB (a full 4096-token batch at hidden 2560 fp16); docstring documents the small-gate pitfall. - vllm/envs.py: comment updated to the new default and pitfall. - scripts/serve_gfx1030_flashnext_mtp.sh: gate default 20480. - scripts/serve_gfx1030_flashnext.sh: export VLLM_RDNA_AR_MAX_KB (20480).
Validated on 4× Radeon PRO V620 (gfx1030, TP=4) — works, with one gate fixIntegrated locally as a clean merge onto Tests
Results (details in the gfx1030_optimized repo,
So: decode at parity with the one-shot path, prefill strictly better than One real defect found — small gates self-disable the backend. The boot
With Integrated in |
…g knobs Under co-tenant PCIe load the two-shot path (PR #22) intermittently loses the peer-flag handshake and wedges: RuntimeError: rdna_ar wedged: rank 0 timed out ... collective #72: peer rank 1's flag never arrived ... raised by rdna_ar_check() during the startup warmup -> engine init dies (seen twice: 22:42:54 and 23:28:21). The boot self-test passes first; the small-gate self-test failures (64/128 KiB) and one 20 MiB failure are the same defect. The one-shot path and pre-PR code have never failed on this board (56/56-pair P2P verified) - this is a protocol race, not "weak P2P". The wedge marker mechanism worked (next boot: "disabled -- a previous run wedged" -> RCCL). Mitigation: default back to the proven semantics - one-shot <= 64 KiB, RCCL above; no two-shot calls unless explicitly opted in: - serve_gfx1030_flashnext_mtp.sh / serve_gfx1030_flashnext.sh: VLLM_RDNA_AR_MAX_KB=64 + VLLM_RDNA_AR_ONESHOT_KB=64 (overridable); also add MAXBAT and LPTH knobs for scheduler experiments (--max-num-batched-tokens, --long-prefill-token-threshold). - rdna_all_reduce.py: library max_kb default back to 64. - rdna_allreduce.cuh: RDNA_AR_ONESHOT_MAX 32 KiB -> 64 KiB so env-less library users never reach two-shot either (rebuilt .so verified). Verified after the change: clean boot, "max 64 KB, oneshot 64 KB", warmup passes, no wedge; performance parity with the pre-mitigation config (probe solo 28.0 tok/s; 16k/1k c=8 MTP=2 TPOT 68.3 ms). Re-enable the wide gate only after the two-shot flag handshake (phases 2/4) is fixed; repro is a boot with VLLM_RDNA_AR_MAX_KB=20480 under PCIe load.
RDNA platform detection, gfx10x helpers, env knobs and config plumbing (adaptive prefill, breakable-cudagraph archs, ...). Ported from opengfx1030/vllm-rdna rdna_extras@c6d99ca305 onto upstream v0.31.0. Original commits touching these 13 file(s): fabf514 2026-06-11 BlivionIaG: Add Dense W4A16 RDNA2 kernel port 3c85702 2026-07-15 BlivionIaG: feat(rocm): Wire FA-RDNA2 dispatch into RocmAttentionImpl 7c3fec8 2026-07-31 BlivionIaG: feat(rocm): enable gfx1030 (RDNA2) as a recognized RDNA arch 70e65f9 2026-08-27 BlivionIaG: fix(distributed): execute TP collectives under torch.compile on ROCm 0193296 2026-08-28 BlivionIaG: wip(rocm): exl3 mul1 codebook markers + folded-weight cache f8722ea 2026-08-28 BlivionIaG: wip(rocm): exl3 quant method registration (Exl3Config) for RDNA dda2a1d 2026-09-02 BlivionIaG: rdna: backport RDNA detection gates from rdna2_extras to vllm/platforms/rocm.py ea78104 2026-09-03 BlivionIaG: fix(rocm): platform gates + MoE W8A16 parity (completes fb1687b) fb1687b 2026-09-03 BlivionIaG: feat(rocm): VLLM_FORCE_CUSTOM_ALL_REDUCE for PCIe-only RDNA e85909f 2026-09-03 BlivionIaG: feat(attention): add standalone RDNA_ATTN backend with proven FA-RDNA2 kernels 63c2ed5 2026-09-05 BlivionIaG: feat(env): register DBG_VLLM_STEP_TIMING for worker propagation cafe95e 2026-09-08 BlivionIaG: fix(rocm): FPP13 checkpoint — FULL_AND_PIECEWISE greedy is coherent 5eb84b4 2026-09-08 BlivionIaG: feat(rocm): AWQ prefill kernel + causal_conv1d HIP + platform gates 631aa35 2026-09-08 BlivionIaG: feat(rocm,gdn): eager_break_during_capture for Qwen3.5/3.8 GDN + architecture whitelist 22bb2e8 2026-09-11 Aron Hsiao: feat(rdna2): port recipe Triton LDS/softmax, skinny MoE GEMV, MTP-under-PP 5765f57 2026-09-12 Aron Hsiao: feat(rdna2): port Qwen4Exp / Qwen3.8 Flash-Next for gfx1030 965c3b9 2026-09-13 BlivionIaG: feat(rdna): add PIX topology helpers without changing AR policy 1c1dbee 2026-09-13 BlivionIaG: fix(rocm): disable VLLM_ROCM_MOE_SKINNY by default (recipe 0008 kernel is wrong) cf055ad 2026-09-13 BlivionIaG: feat(rocm): HIP M-RoPE forward (mrope_forward_rdna2) 1eb11e1 2026-09-14 BlivionIaG: feat(rocm): opt-in HIP paths for Qwen4Exp / Qwen3.8-Flash-Next on gfx1030 59237b3 2026-09-14 BlivionIaG: fix(rdna2): repair 0008 skinny default, gfx10 bf16 abort, warmup timeout 9c9509b 2026-09-16 BlivionIaG: Revert "feat(rocm): default the Qwen4Exp HIP kernels on (tracker S6)" cb0d441 2026-09-16 BlivionIaG: feat(rocm): default the Qwen4Exp HIP kernels on (tracker S6) c350fa2 2026-09-16 BlivionIaG: merge(rdna2): port PR opengfx1030#11 wvSplitK ownership/decode + rdna_ar device fix c59a23f 2026-09-17 BlivionIaG: chore: recover remote-only work products into the repo 5c4ab98 2026-09-17 BlivionIaG: revert(rocm): drop the PR opengfx1030#5 wvSplitK gfx1030 decode port b33f9b6 2026-09-18 BlivionIaG: fix(rocm): fall back to torch for get_device_name when amdsmi sees no GPUs 4425834 2026-09-18 BlivionIaG: fix(rocm): make platform detection and worker init robust on RDNA consumer GPUs 16695b2 2026-09-18 BlivionIaG: test(rocm): isolate V620 amdsmi and PLE fp8 CPU tests from HIP b8354ff 2026-09-18 BlivionIaG: feat(rocm): V620 MoE JSON, ROCR amdsmi index, PLE fp8 fused gather 3b59ee1 2026-09-18 BlivionIaG: feat(rocm): opt-in leap T44b rdna_ar (VRAM flags + wedge check) (opengfx1030#13) 0821be8 2026-09-22 George Muravei-Alkhavoi: Port opt-in served resident skinny MoE decode 9a634c7 2026-09-22 George Muravei-Alkhavoi: Port resident W4A16 MoE and FP16 shared experts to current base cceabbd 2026-09-23 Waldecir Santos: fix(core): keep FULL decode graphs when piecewise capture is unavailable 295a842 2026-09-24 BlivionIaG: feat(rocm): make rdna_ar cover the custom-allreduce cases 48c56ef 2026-09-24 BlivionIaG: fix(rdna2): make VLLM_USE_RDNA2_FA=1 actually select RDNA_ATTN 6c26c78 2026-09-24 BlivionIaG: fix(rocm): keep FULL decode graphs alongside piecewise capture 700753d 2026-09-25 BlivionIaG: fix(rocm,mtp): unbreak MTP draft inference — amdsmi shutdown masking + local-argmax draft sampling 97fbae5 2026-09-27 BlivionIaG: [ROCm][RDNA] Load and call hippihx V1 from RDNA_ATTN decode (opt-in) 22d6e34 2026-09-27 BlivionIaG: feat(rdna2): two-shot rdna_ar (PR opengfx1030#22) + wide gate default, validated on 4x V620 f22fee0 2026-09-27 George Muravei-Alkhavoi: perf(rocm): opt in to HIP MoE for concurrent MTP decode 6ed3909 2026-09-28 BlivionIaG: feat(engine): prefill step cadence for non-DP engines 8646106 2026-09-30 BlivionIaG: feat(rdna2): canonical VLLM_RDNA2_MOE_FP32_ACCUM env + per-call fp32_accum 9cad879 2026-10-01 BlivionIaG: [rdna2][MoE-epilogue] default back to packed-fp16 CAS; fp32 scratch opt-in Co-authored-by: George Muravei-Alkhavoi <georgezagraid@gmail.com> Co-authored-by: Aron Hsiao <leapdragon@gmail.com> Co-authored-by: Waldecir Santos <waldecir@gmail.com> Co-authored-by: Chris Eastwood <chris.eastwood@pwn4g3.dev>
rdna_ar one-shot all-reduce (VLLM_RDNA_AR=1) placed first in the CudaCommunicator all-reduce chain, plus custom-AR topology helpers. Ported from opengfx1030/vllm-rdna rdna_extras@c6d99ca305 onto upstream v0.31.0. Original commits touching these 9 file(s): fb1687b 2026-09-03 BlivionIaG: feat(rocm): VLLM_FORCE_CUSTOM_ALL_REDUCE for PCIe-only RDNA cafe95e 2026-09-08 BlivionIaG: fix(rocm): FPP13 checkpoint — FULL_AND_PIECEWISE greedy is coherent a406064 2026-09-08 BlivionIaG: [review-only] cherry-pick leapdragon rdna_ar fabric knobs onto rdna_extras (#1) c091c42 2026-09-10 BlivionIaG: wip: checkpoint-validated state + chase csrc + debug instruments + row-zero fix e0a7b16 2026-09-12 BlivionIaG: fix(rdna_ar): make one-shot AR boot-robust, keep it opt-in 965c3b9 2026-09-13 BlivionIaG: feat(rdna): add PIX topology helpers without changing AR policy 849292e 2026-09-16 BlivionIaG: fix(rocm): make custom all-reduce correct under breakable cudagraphs c350fa2 2026-09-16 BlivionIaG: merge(rdna2): port PR opengfx1030#11 wvSplitK ownership/decode + rdna_ar device fix 3b59ee1 2026-09-18 BlivionIaG: feat(rocm): opt-in leap T44b rdna_ar (VRAM flags + wedge check) (opengfx1030#13) 295a842 2026-09-24 BlivionIaG: feat(rocm): make rdna_ar cover the custom-allreduce cases 22d6e34 2026-09-27 BlivionIaG: feat(rdna2): two-shot rdna_ar (PR opengfx1030#22) + wide gate default, validated on 4x V620 101a16c 2026-09-28 BlivionIaG: fix(rdna2): disable the racy two-shot rdna_ar by default; add batching knobs Co-authored-by: Aron Hsiao <leapdragon@gmail.com>
Launchers (scripts/serve_rdna.sh, recipes), probes, bench drivers and kernel tests/tools. Launchers stay in scripts/ (upstream moved its own auxiliary files to tools/, vllm-project#58572). Ported from opengfx1030/vllm-rdna rdna_extras@c6d99ca305 onto upstream v0.31.0. Original commits touching these 75 file(s): 4c3d877 2026-09-06 BlivionIaG: feat(ops): add sync_remote_to_local.sh for validated-state capture c091c42 2026-09-10 BlivionIaG: wip: checkpoint-validated state + chase csrc + debug instruments + row-zero fix 13a3daf 2026-09-11 BlivionIaG: cleanup(gqa): drop true-GQA variant, keep subgroup + off dadfeab 2026-09-11 BlivionIaG: chore: surface VLLM_FA_RDNA2_GQA_MODE in production launcher d74eb45 2026-09-11 BlivionIaG: chore: make AR flags overridable in serve_gfx1030_full.sh e0a7b16 2026-09-12 BlivionIaG: fix(rdna_ar): make one-shot AR boot-robust, keep it opt-in ca83d92 2026-09-13 BlivionIaG: feat(rdna2): import PR opengfx1030#5 V620 TunableOp tables + tuning tooling 965c3b9 2026-09-13 BlivionIaG: feat(rdna): add PIX topology helpers without changing AR policy f86faad 2026-09-13 BlivionIaG: fix(rocm): enable RDNA2 W4A16 at TP=4 via breakable cudagraphs + PYNCCL 469c456 2026-09-14 BlivionIaG: fix(rocm,ple): resolve HIP through torch on gfx1030 (709) + overridable block size e7ce541 2026-09-14 BlivionIaG: fix(rocm,ple): make Flash-Next PLE offload share CUDA tensors on gfx1030 59237b3 2026-09-14 BlivionIaG: fix(rdna2): repair 0008 skinny default, gfx10 bf16 abort, warmup timeout f663686 2026-09-15 BlivionIaG: chore(rdna2): drop vestigial combo_kernels=false from serve config 7e70e24 2026-09-16 BlivionIaG: fix(scripts): bench_report selects the newest result by mtime f5cbbdf 2026-09-16 BlivionIaG: feat(scripts): bench_report.py for PP/TG/TTFT reporting 4d25a04 2026-09-16 BlivionIaG: update(rocm): default custom all-reduce on in the gfx1030 launcher 1ff7359 2026-09-16 BlivionIaG: fix(rocm): make V1 FULL_AND_PIECEWISE + prefix caching correct on gfx1030 657bdba 2026-09-17 BlivionIaG: perf(scripts): raise KV pool to 7 GiB and GPU memory utilization to 0.90 0dd3811 2026-09-17 BlivionIaG: feat(scripts): Flash-Next launcher serves native 262k context with vision on aaa4775 2026-09-17 BlivionIaG: fix(scripts): use the official qwen3_coder tool parser for Flash-Next 37345ee 2026-09-17 BlivionIaG: feat(scripts): enable tool calling + reasoning parse on the Flash-Next launcher ae5c7ed 2026-09-17 BlivionIaG: feat(scripts): serve Flash-Next under a stable served-model-name c59a23f 2026-09-17 BlivionIaG: chore: recover remote-only work products into the repo 31003ff 2026-09-17 BlivionIaG: docs(scripts): document the validated vision-on stopgap in the Flash-Next launcher 3bddd3c 2026-09-17 BlivionIaG: feat(scripts): add the validated Flash-Next production launcher (PIECEWISE, cap 6) b78006a 2026-09-17 BlivionIaG: fix(scripts): cap gfx1030 production serve at max-num-seqs 6, batched-tokens 2048 609c9c0 2026-09-18 BlivionIaG: feat(scripts): Flash-Next production on FULL_AND_PIECEWISE 16695b2 2026-09-18 BlivionIaG: test(rocm): isolate V620 amdsmi and PLE fp8 CPU tests from HIP b8354ff 2026-09-18 BlivionIaG: feat(rocm): V620 MoE JSON, ROCR amdsmi index, PLE fp8 fused gather 9c60294 2026-09-18 BlivionIaG: feat(scripts): enable --enable-prompt-tokens-details on Flash-Next 3b59ee1 2026-09-18 BlivionIaG: feat(rocm): opt-in leap T44b rdna_ar (VRAM flags + wedge check) (opengfx1030#13) 26d6c4b 2026-09-23 George Muravei-Alkhavoi: Reduce V620 vision pixel cap 295a842 2026-09-24 BlivionIaG: feat(rocm): make rdna_ar cover the custom-allreduce cases 22d6e34 2026-09-27 BlivionIaG: feat(rdna2): two-shot rdna_ar (PR opengfx1030#22) + wide gate default, validated on 4x V620 7010756 2026-09-27 BlivionIaG: feat(rdna2): MTP=0/2 Flash-Next launcher + lookup-only TunableOp env helper b95036b 2026-09-28 BlivionIaG: feat(rocm): 27B dense launcher + keep the W4A8 attempt out of dynamo's graph 6ed3909 2026-09-28 BlivionIaG: feat(engine): prefill step cadence for non-DP engines ae5bedf 2026-09-28 BlivionIaG: fix(rdna2): production launcher - pin its own tree + FA defaults 83e6af8 2026-09-28 BlivionIaG: perf(rdna2): fastest HIP attention path - FA verify-decode + verify capture; fa default 56744dd 2026-09-28 BlivionIaG: fix(rdna2): launcher safety+batching consistency (scoped cleanup, one-shot default, knobs) 330b42a 2026-09-28 BlivionIaG: perf(rdna2): default MAXBAT=2048 (best measured prefill/decode fairness point) 4ca5aaa 2026-09-28 BlivionIaG: perf(rdna2): default long-prefill chunking to 1024 for decode fairness 101a16c 2026-09-28 BlivionIaG: fix(rdna2): disable the racy two-shot rdna_ar by default; add batching knobs 2204957 2026-09-29 BlivionIaG: perf(rdna2): ship curated FP16 TunableOp rows (719/rank) for Flash-Next 27437bf 2026-09-29 BlivionIaG: chore(rdna2): standardize TunableOp storage on shared build-keyed rows c9122de 2026-09-29 BlivionIaG: feat(rocm): fused MoE W4A8 sdot4 for gfx1030 (Flash-Next reachable) 3050090 2026-09-29 BlivionIaG: fix(rdna2): preserve pre-W4A8 W4A16 split-K choice; W4A8 defaults to 0 a641d65 2026-09-29 BlivionIaG: fix(rdna2): K_STEP-align prefill split-K (W4A8 fallback NaN) + W4A8 selector guard 8de5025 2026-09-29 BlivionIaG: feat(rdna2): RDNA_AR knob + fresh-cache 27B W4A16 AR-off driver 45e218e 2026-09-29 BlivionIaG: feat(rdna2): env-gated W4A8 shape diagnostic + 27B dense A/B tooling 3418e49 2026-09-29 BlivionIaG: tools(rdna2_028): add m27b matrix runner (16k/1k, 1k/512 at c=1, c=8) adcd0f2 2026-09-30 BlivionIaG: bench(explore): PR30 harness fixes + V620 results (H1 holds, H3 fails) d9c927c 2026-09-30 BlivionIaG: perf(rdna2): freeze 760-row TunableOp set from full-matrix shape census (719 -> 760) ee4f379 2026-09-30 BlivionIaG: perf(rdna2): lookup-hit proof + curate evidence for the 754-row set 1707cc0 2026-09-30 BlivionIaG: perf(rdna2): expand TunableOp rows by 35 (719 -> 754) for w4a16-fa-m0 capture arm bc5fbee 2026-10-01 BlivionIaG: feat(rdna2): one serve entry point + per-config recipes 6f1a712 2026-10-01 BlivionIaG: feat(rdna2): named TunableOp profiles + dedup/user-agnostic launchers ac9dfd8 2026-10-01 BlivionIaG: feat(rdna2): unify TunableOp rows + wire all launchers through the helper b41f39e 2026-10-01 BlivionIaG: bench(rdna2): Flash-Next fp32-accum matrix + CAS A/B + W4A8 arm ab5ccf3 2026-10-02 BlivionIaG: docs(rdna): sweep not-FA/not-HIP gaps — verdicts + PR#33 recovery e3bf3d3 2026-10-05 BlivionIaG: feat(sched): restore upstream mixed decode+prefill batching Co-authored-by: George Muravei-Alkhavoi <georgezagraid@gmail.com> Co-authored-by: Waldecir Santos <waldecir@gmail.com> Co-authored-by: Aron Hsiao <leapdragon@gmail.com>
Proposal
Stop using
VLLM_FORCE_CUSTOM_ALL_REDUCEon gfx10x. That backend pulls peer memory and treats PCIe as if it were fully connected. On gfx1030, capture detection is also unreliable, so a breakable CUDA graph can all-reduce the wrong buffer.rdna_aralready pushes into uncached staging and polls local flags, which matches this fabric. It was too narrow to replace custom all-reduce: one-shot only, fp16/fp32 only, contiguous only, and a 64KB cap. This PR widens that path so the serve scripts can leave the force flag off.What changes
VLLM_RDNA_AR_ONESHOT_KB(default 32KB), up toVLLM_RDNA_AR_MAX_KB. Each rank pushes only its chunk, reduces in fixed fp32 order, then pushes the reduced chunk. Traffic is about2*(W-1)/W * Ninstead of one-shot's(W-1)*N.VLLM_RDNA_AR_ALGO=auto|oneshot|twoshot.scripts/serve_gfx1030_full.shandscripts/serve_gfx1030_flashnext.shdefault toVLLM_RDNA_AR=1andVLLM_FORCE_CUSTOM_ALL_REDUCE=0.VLLM_RDNA_ARstays default-off in the library. A failed boot self-test still disables the backend and falls back to RCCL.Why this is not a duplicate
gh pr list --repo opengfx1030/vllm-rdna --state open --search "rdna_ar OR allreduce"returned no other open PR.Tests
Those tests cover abort-record decode (including the new two-shot phases), the wedge marker, and the default-off gate. They do not launch the HIP kernel. No model eval: with
VLLM_RDNA_ARunset, dispatch is unchanged.AI assistance was used (Cursor Grok 4.7).