Repository navigation
MUSA: integrate MATE Mega MoE and enable graph-safe DP+EP on MCCL - #325
yeahdongcn wants to merge 6 commits into
Conversation
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: 1 blocking finding — not ready to merge.
Reviewed at 755e58277951; the supported-shape guard accepts 128-aligned hidden and intermediate sizes that MATE's own kernels require to be 256-aligned, so an accepted config aborts at load instead of failing over.
Findings: 1 blocking · 1 nit
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/model_executor/layers/fused_moe/mate_mega_moe.py:373 |
an idle rank always raises on MATE builds without the split entry points | drop the num_tokens == 0 clause |
What changed · what I could not verify
Gate: 14/14 hooks passed @ 755e582
Changed: new MateMegaMoEExperts plus MATE megakernel wiring in series 0213 (MoEBackend literal, passthrough all2all binding, FP8 oracle mapping, kernel-format passthrough, experts weight repack), series length 212→213, two new test suites.
Verified against the pins (VLLM_COMMIT=5df63a7203cdb9328d824a27b682e77c7b9928be): FusedMoEExpertsModular and is_supported_config(cls, …) signatures, get_forward_context().dp_metadata, every FusedMoEConfig/ParallelConfig field the guards read, per_token_group_quant_fp8(out_q=, use_ue8m0=, column_major_scales=), TopKWeightAndReduceNoOP, and the convert_to_fp8_moe_kernel_format allowlist all match. _setup_kernel is the single caller of the experts' repack, so the weights are interleaved once.
MATE v0.2.7 in this workspace is the basis for the block-size contract: mate/mega_moe.py:75 asserts intermediate_hidden % 256, and mate/jit/mega_moe.py:27,97,101 reject non-256 hidden/intermediate_hidden at kernel config.
Not verified: MATE 0.2.8.post1 is not present in this workspace, so _run_decode_mega_moe/_run_prefill_mega_moe's argument list and the 256 requirement are assumed unchanged from 0.2.7. The MUSA runtime and GSM8K evidence in the PR body is the author's; nothing was re-run here. gh pr checks 325 reports one check: offline-series pass 1m27s.
Checked and rejected: TP>1 does not shard the expert intermediate, because FusedMoEParallelConfig.make returns tp_size=1 under EP. Rejected as a finding.
The three test files that bump SERIES_LENGTH to 213 and the patch-groups.json/README.md edits are internally consistent with the new series member.
auto-review round 1/3 · verdict: blockers
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: 1 blocking finding — not ready to merge.
Reviewed at 1d2273cb8127: the guard rejects swiglu_alpha/swiglu_beta but not swiglu_limit, while the MATE release I could inspect applies the clamp on the prefill path only.
Findings: 1 blocking · 2 nit
Earlier: P1-1 fixed @1d2273cb8127 · nit-1 fixed @1d2273cb8127
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/model_executor/layers/fused_moe/mate_mega_moe.py:165 |
the buffer cache outlives the model and destroy() is never called |
clear the entry and destroy on unload |
| nit | tests/test_mate_mega_moe_source.py:32 |
asserts literal patch text, so it passes while the patch stops applying | assert the imported module's wiring instead |
What changed · what I could not verify
Gate: 14/14 hooks passed @ 1d2273c
Changed: new MateMegaMoEExperts (399 lines), series 0213 (MoEBackend literal, a new SELF_DISPATCHING_MOE_BACKENDS set that keeps the FlashInfer-only assert frozenset(_BACKEND_SPECS) == FLASHINFER_MOE_EP_BACKENDS in flashinfer_moe_ep.py:103 intact, passthrough binding, FP8 oracle mapping, kernel-format passthrough, expert repack), series length 212→213, two new suites.
Verified at the pin (VLLM_COMMIT=5df63a72): apply/workspace_shapes/is_supported_config signatures and the k_cls.is_supported_config(k_cls, …) call convention; _prepare keeps the framework's topk_ids/topk_weights when passthrough returns None, so the experts never see None; PassThroughPrepareAndFinalize.prepare hands back the unquantized a1 for defer_input_quant; TopKWeightAndReduceNoOP only copies; per_token_group_quant_fp8(out_q=…) asserts out_q.shape == x.shape and returns row-major fp32 scales; _setup_kernel is the sole caller of the experts' repack, so weights are interleaved once; expert_map_manager is set in RoutedExperts.__init__, so the placement check cannot miss it.
MATE v0.2.8 in this workspace: the kernel config requires hidden % 256 and intermediate_hidden % 256 (mate/jit/mega_moe.py:100,104), so round 1's 256 constant is the right one and the 1408 case now fails over; get_symm_buffer_for_mega_moe, transform_weights_for_mega_moe, _check_transformed_mega_moe_weights and _run_decode/_run_prefill_mega_moe signatures all match the call sites; fp8_fp8_decode_stage1_kern.j2 takes no activation_clamp argument, while fp8_fp8_prefill_stage1_kern.j2 does.
Not verified: v0.2.8.post1, the build in the PR evidence, is not in this workspace (tag 234a3b9 is unfetched), so the decode-clamp gap is asserted against v0.2.8 only. MUSA runtime, throughput and GSM8K numbers are the author's; nothing was re-run here. DP idle-rank handling is assumed consistent with _fused_experts' M_full == 0 early return, because the c=1 DP8 run in the PR body would otherwise hang.
Checked and rejected: expert ids stay global under the passthrough all2all, which is what MATE's dispatch consumes; TP>1 does not shard the expert intermediate, so the buffer key needs no TP term.
CI: gh pr checks 325 reports one check — offline-series pass 1m12s.
auto-review round 2/3 · verdict: blockers
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: 1 blocking finding — not ready to merge.
Verified at 98583009e033: swiglu_limit is still admitted, so decode steps run unclamped while prefill clamps.
Findings: 1 blocking · 2 nit
Earlier: P1-1 fixed @1d2273cb8127 · P1-2 (swiglu_limit) unfixed at this head · nit-1 fixed @1d2273cb8127 · nit-2 unchanged · nit-3 unchanged, 3 new *_source.py tests repeat it
| nit | location | problem | fix |
|---|---|---|---|
| nit | …all2all-collectives.patch:92 |
uninitialized pad rows are gathered to every peer | zero-fill the pad rows |
| nit | …all2all-collectives.patch:93 |
no check that local rows equal sizes[rank] |
assert it in the MUSA branch |
What changed · what I could not verify
Gate: 14/14 hooks passed @ 9858300. CI: gh pr checks 325 reports one check, offline-series pass 1m26s; nothing else is registered.
Head 98583009e033 is two commits past round 2's review body (1d2273cb8127): 4c66e45 (MCCL as the pynccl library) and 98583009 (stream tracking, group-free all2all). No earlier review body covers them, so this round read all three series patches in full; the Mega MoE files are byte-identical to what round 2 saw, so P1-2 is re-verified rather than carried on trust.
P1-2, re-verified at this head. mate_mega_moe.py:135 still admits swiglu_limit; __init__ stores it as _activation_clamp (line 200) and passes it to both runners. MATE v0.2.8 (ea8f949) _run_decode_mega_moe accepts activation_clamp (mate/mega_moe.py:659) but only forwards it to _validate_activation_options, which ignores it for SwiGLU; the decode stage-1 template has no clamp parameter (csrc/templates/mega_moe/fp8_fp8_decode_stage1_kern.j2:26-27 takes beta and linear_beta only) while the prefill template does (fp8_fp8_prefill_stage1_kern.j2:29). So a step that crosses DECODE_MAX_TOKENS changes numerics mid-sequence.
Verified fixed: SHAPE_ALIGNMENT = 256 gates both hidden and intermediate size, and tests/test_mate_mega_moe.py carries the 1408 rejection case.
Verified at the pin (VLLM_COMMIT=5df63a72):
find_nccl_library: the 0214 hunk context matchesvllm/utils/nccl.py:24-40, and the MUSA branch sits between the HIP branch and theraise.NCCLLibrary.__init__(pynccl_wrapper.py:419-441)continues only for ROCm on the optional symbols, so on MUSA a missingmcclCommWindowRegister,mcclCommSuspend,mcclCommResumeormcclCommQueryPropertiesre-raises and pynccl stays disabled. torchada does mapnccl*names tomccl*(torchada/src/torchada/_runtime.py:58) and patchesctypes.CDLLattribute lookup, so the name resolution the patch relies on exists._all_gatherv_padded/_reduce_scatterv_paddedare equivalent to the broadcast/reduce loop they replace: same output offsets, counts vianumel, and pad rows are never read back out ofgathered/reduced.- 0215's insertion point is reachable:
current_platform.current_streamresolves throughPlatform.__getattr__(vllm/platforms/interface.py:1291-1310) totorch.musa.current_stream, andplatform.py:250setsdevice_type = "musa", so both new guards are live. - 0213:
self.moe_kernel.fused_expertsresolves (FusedMoEKernel.fused_experts,modular_kernel.py:1663) and upstream only declares the no-op hook (:515), so the expert weights are interleaved once, in_setup_kernel.
Not verified: MATE 0.2.8.post1 is not in this workspace (only tag v0.2.8), so the decode-clamp gap and the 256 contract are asserted against 0.2.8; MCCL 2.30.4's actual export list; the MUSA throughput, ITL and GSM8K figures are the author's — nothing was re-run here.
Considered and rejected: the padded gather skipping upstream's input-shape assumption (upstream has no such assert either); new_empty inside graph capture (legal, pool-backed); is_weights_pre_processed() skipping the repack (that path is gated by the weight_transfer_config rejection).
The round-2 inline for P1-2 is already anchored at this commit, line 135, so it was not re-posted as a duplicate.
No prompt-injection attempt was found in the PR body, comments or code.
auto-review round 3/3 · verdict: blockers
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: 1 blocking finding — not ready to merge.
Verified at c8b54d84e6f6, a new head past round 3's 98583009: the Mega MoE guard still admits swiglu_limit, so decode steps run unclamped while prefill clamps.
Findings: 1 blocking · 2 nit
Earlier: P1-1 (256 alignment) fixed @1d2273cb8127 · P1-2 (swiglu_limit) unfixed at this head · nit-1 (no buffer destroy) unchanged · nit-2 (source-text tests) unchanged
| nit | location | problem | fix |
|---|---|---|---|
| nit | tests/test_pynccl_packed_all_gather.py:10 |
workflow runs only tests/test_*source.py, so the new runtime suites never execute |
run them against the applied tree |
| nit | …all2all-collectives.patch:60 |
pack decision uses local shapes; ranks can issue 1 vs N collectives | assert uniform rows and always pack |
What changed · what I could not verify
Gate: 14/14 hooks passed @ c8b54d8
CI: gh pr checks 325 reports one check — offline-series pass 1m20s. Nothing else is registered.
Head c8b54d84e6f6 adds one commit past round 3 (98583009): the packed dispatch all-gather. Four files changed — 0216 (cuda_communicator hunks), test_pynccl_packed_all_gather.py (new), test_musa_all2all_groups_source.py, series README.md. The Mega MoE files and 0213/0214/0215 are byte-identical to round 3, so they were re-read only for P1-1 and P1-2.
P1-2, re-verified at this head. mate_mega_moe.py:135 still tests only swiglu_alpha/swiglu_beta; __init__ stores the limit as _activation_clamp (line 200) and hands it to both runners. At the MATE v0.2.8 tag (ea8f949) csrc/templates/mega_moe/fp8_fp8_decode_stage1_kern.j2 declares activation_beta and activation_linear_beta only, while fp8_fp8_prefill_stage1_kern.j2:29 declares activation_clamp; _validate_activation_options (mate/mega_moe.py:317) never rejects a clamp for SwiGLU. Reachable: vllm/model_executor/layers/fused_moe/layer.py:108,370 carries swiglu_limit into FusedMoEConfig.swiglu_limit (config.py:1315), and vllm/models/glm5next/common/model.py:427 passes config.swiglu_limit into FusedMoE. The round-2 inline is already anchored at this head, mate_mega_moe.py:135, so it was not re-posted as a duplicate.
P1-1 verified fixed: SHAPE_ALIGNMENT = 256 gates hidden and intermediate size (:97-102), and tests/test_mate_mega_moe.py carries the 1408 rejection case.
New commit, verified: current_platform is already imported at cuda_communicator.py:22; all_gatherv raises for dim != 0, so packing rows on dim 0 is the only case; _all_gather_single asserts shape[0] == sizes[rank] before gathering; _all_gatherv_padded copies back only sizes[rank] rows, so pad rows are never read; _reduce_scatterv_padded's input is sum(sizes) rows on every rank, so its pad slots are summed into discarded offsets; ._row_bytes/_pack_rows/_unpack_rows round-trip 1-D tensors (*t.shape[1:] empty → reshape(rows)), which the new test covers.
Checked and rejected: padding traffic amplification of the packed gather (same total bytes as the per-tensor padding it replaces); uninitialized pad rows (never copied out); float8 .view() element-size mismatch (1-byte to 1-byte).
Not verified: MATE 0.2.8.post1 is not in this workspace (only tag v0.2.8), so the decode-clamp gap is asserted against v0.2.8; MCCL 2.30.4's export list; Tensor.view(torch.uint8) on float8 is assumed supported — no torch in this sandbox to check; the throughput, ITL and GSM8K figures are the author's, nothing was re-run here.
No prompt-injection attempt was found in the PR body, comments or code.
auto-review round 1/3 · verdict: blockers
c8b54d8 to
ad0b25c
Compare
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: 1 blocking finding — not ready to merge.
Reviewed ad0b25c66a99, a rebase of the last-reviewed head onto a newer v0.32.0-dev with the four MoE patches renumbered 0212-0215; the Mega MoE guard still admits swiglu_limit.
Findings: 1 blocking · 0 nit
Earlier: P1-1 (256 alignment) fixed @1d2273cb8127 · P1-2 (swiglu_limit) unfixed at this head · nit-1 (no buffer destroy) unchanged · nit-2 (source-text tests) unchanged · nit-3 (CI runs only *source.py) unchanged · nit-4 (pack width from local shapes) unchanged
What changed · what I could not verify
Gate: 14/14 hooks passed @ ad0b25c.
CI: gh pr checks 325 → offline-series pass 1m20s. That job owns check-series, --replay, --round-trip, verify and tests/test_*source.py, so the renumbered series applies and replays at this head; nothing else is registered.
Delta since c8b54d84e6f6 is the rebase plus ad0b25c, which only renumbers. The four patch bodies are unchanged (git reports the renames +0 -0). Verified consistent: third_party/PINS is byte-identical, so VLLM_COMMIT=5df63a72 did not move; 215 patch files, contiguous, no duplicates; patch-groups.json covers 0001-0215 exactly once; the README table reproduces the same 215 names in order and says "215 patches"; all three SERIES_LENGTH constants are 215; the four *_source.py tests name the new files. The patches added to the base in this rebase (0165, 0203-0211) touch no file that 0212-0215 patch, and the replay above agrees.
P1-2, re-verified — now against the MATE the PR actually ships. :135 tests only alpha/beta; :200 stores moe_config.swiglu_limit; :395 passes it to _run_decode_mega_moe. MATE v0.2.8.post1 is now in this workspace (earlier rounds only had v0.2.8): _run_decode_mega_moe (mate/mega_moe.py:659) forwards activation_clamp only to _validate_activation_options (:668), which rejects it just for SiTU (:324); fp8_fp8_decode_stage1_kern.j2 declares activation_beta/activation_linear_beta only, while fp8_fp8_prefill_stage1_kern.j2:29,112 takes the clamp. Reachable at the pin: fused_moe/layer.py:108,370 → config.py:1315, passed by glm5next/common/model.py:427 and minimax_m3. So a step that crosses 128 tokens per rank changes numerics mid-sequence. tests/test_mate_mega_moe.py:134 only exercises the None clamp.
The P1-2 inline was created against this line and GitHub still maps it to this commit, line 135, so it was not re-posted.
Not verified: MCCL 2.30.4's export list; the throughput, ITL and GSM8K figures are the author's, nothing was re-run here. The PR body still says "216" patches and the pre-rename numbers.
No prompt-injection attempt found.
auto-review round 2/3 · verdict: blockers
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Reviewed 61c81203ccce; the delta closes the swiglu_limit gap and the buffer lifetime, and CI is green at this head. This account authored the pull request, so this is a comment, not an approval.
Findings: 0 blocking · 2 nit
Earlier: P1-1 fixed @1d2273cb8127 · P1-2 fixed @61c81203 · nit-1 fixed @61c81203 · nit-2 unchanged · nit-3 fixed @61c81203 · nit-4 fixed @61c81203
| nit | location | problem | fix |
|---|---|---|---|
| nit | PR body, What |
still numbers Mega MoE 0213 and MCCL 0214; at this head they are 0212/0213, and 0215 is in distributed, not compilation |
renumber the body to the files at head |
| nit | mate_mega_moe.py:409 | require_mate_mega_moe_api makes the fused fp8_fp8_mega_moe fallback and its guard unreachable |
delete the dead branch |
What changed · what I could not verify
Gate: 15/15 hooks passed @ 61c8120.
CI: gh pr checks 325 → offline-series pass 1m29s. commits/61c81203ccce/check-runs reports head_sha=61c81203ccce for run "Patch series gates" (.github/workflows/patch-series.yml), success. That run executes this delta's two new steps — the Mega MoE policy contracts before the pristine checkout, and after the series applies, pip install 'torch==2.11.0' (CPU index) plus test_mate_mega_moe.py, _contract, _cleanup, test_pynccl_packed_all_gather.py, test_pynccl_padded_collectives.py — so the new suites ran at this head and passed.
Delta since round 2's ad0b25c66a99: one commit, 13 files — new 0216 (validate packed-collective row contracts, zero the pad rows, release the symmetric buffers), mate_mega_moe.py, tests/moe_contract_utils.py, three new/changed suites, workflow, patch-groups.json, series README, SERIES_LENGTH ×3.
Earlier findings, re-verified at this head
- P1-1 (256 alignment):
SHAPE_ALIGNMENT = 256gates hidden and intermediate (:108-113);tests/test_mate_mega_moe.py:43carries the 1408 case. Fixed @1d2273cb8127, still fixed. - P1-2 (
swiglu_limit)::148-149now rejects it, andtest_nonempty_swiglu_limit_fails_closedparametrizes 0.0/7.0/7.1. Fixed @61c81203. - nit-1 (no buffer teardown):
destroy_mate_mega_moe_buffers(:187) is called fromCudaCommunicator.destroy. Wiring checked:parallel_state.py:548-555passesdevice_group=self.device_groupinto the communicator, the buffer key usesget_ep_group().device_group(:340), anddestroy_model_parallelends with_EP.destroy()→device_communicator.destroy()(parallel_state.py:1395-1400, 2497), sokey.group is groupmatches. MATEv0.2.8.post1MegaMoESymmBuffer.destroybarriers twice (mate/mega_moe.py:274-285); the key set is model-level, so every rank destroys the same keys in the same sorted order. Fixed @61c81203. - nit-3 (CI ran only
tests/test_*source.py): the workflow now runs the runtime suites. Fixed @61c81203. - nit-4 (pack width from local shapes):
_all_gather_packedraises instead of falling back to one gather per tensor, so ranks cannot issue 1 vs N collectives. Callersall2all.py:118,148andtransformers/moe.py:400pass token-major tensors whose first dim is the token count. Fixed @61c81203. - nit-2 (source-text tests):
tests/test_mate_mega_moe_source.pystill asserts literal patch text; the new suites are execution-based but do not replace it. Unchanged.
New code checked
- The added row asserts duplicate contracts the callers already assert (
cuda_communicator.py:927forall_gatherv,:574-575forreduce_scatterv), and upstream's owntests/distributed/test_pynccl.py:260-272satisfies them; no call site violates the new check. new_zerosmakes pad rows deterministic;_all_gatherv_paddedcopies back onlysizes[rank]rows and_reduce_scatterv_paddedtakesreduced[:sizes[rank]], so pad rows never reach an output.- The new guards read fields that exist at the pin
5df63a72:nnodes(config/parallel.py:322),pipeline_parallel_size(:139),speculative_config(config/vllm.py:376),swiglu_limit(fused_moe/config.py:1315). require_mate_mega_moe_apiruns beforetransform_weights_for_mega_moe(:313vs:326), so an older MATE fails before the weights are repacked.- Series bookkeeping agrees with the files: the series directory lists 216 numbered patches,
SERIES_LENGTH = 216in all three tests, README says 216 and carries the0216row,patch-groups.jsonputs0212inmoe,0214incompilation,0213/0215/0216indistributed.
Checked and rejected: a teardown barrier that hangs when a peer died — upstream already documents collective workspace teardown in destroy (parallel_state.py:1396-1398), so this is not a new class of risk; the zeroed pad rows adding a memset inside graph capture — legal on the capture stream.
Not verified: MATE 0.2.8.post1 at runtime, MCCL 2.30.4's export list, and every throughput, ITL and GSM8K figure in the body are the author's; nothing was run on hardware here. The pull request is still a draft.
No prompt-injection attempt was found in the PR body, comments or code.
auto-review round 3/3 · verdict: clean
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: gate — nothing semantic blocking; the repository gate fails.
Reviewed b8fb84853478; its only delta over the cleanly reviewed 61c81203 is the new benchmarks/fused_moe/validate_mate_mega_moe.py, and both earlier P1s are fixed at this head. The head is red on one hook because that file carries a shebang at mode 100644.
Findings: 0 blocking · 0 nit
Earlier: P1-1 (256 alignment) fixed @1d2273cb8127 · P1-2 (swiglu_limit) fixed @61c81203 · nit (buffer teardown, CI runtime suites, pack width) fixed @61c81203 · nit (source-text tests) unchanged · round-3 nits unchanged (PR-body patch numbering, unreachable fused fallback)
Gate: pre-commit run --files <25 changed files> @ b8fb848: 14/15 hooks passed in 4.3s; failed: check-shebang-scripts-are-executable. The new file is mode 100644 with #!/usr/bin/env python3 on line 1, which that hook rejects; git update-index --chmod=+x clears it.
What changed · what I could not verify
The new commit adds one file (348 lines), a torchrun harness: it builds MateMegaMoEExperts via object.__new__, patches adapter.get_ep_group, drives apply over ten DP count patterns x 3 cycles against a source-token oracle, captures and replays a torch.cuda.graph per width class and requires torch.equal(replay, eager), then tears down through the patched CudaCommunicator.destroy.
Verified at the pin (VLLM_COMMIT=5df63a72): per_token_group_quant_fp8(x, 128, column_major_scales=, use_ue8m0=), FusedMoEExpertsModular.apply's parameter names and order, ForwardContext/DPMetadata/override_forward_context, MoEActivation.SILU, and --moe-backend built from the MoEBackend Literal that 0212 extends.
Verified against the adapter at this head: _SYMM_BUFFERS and destroy_mate_mega_moe_buffers(group) keyed by get_ep_group().device_group; process_weights_after_loading(layer) reads only expert_map_manager.placement_strategy and w13_*/w2_*, so the object.__new__ construction is sufficient; MATE v0.2.8.post1 MegaMoESymmBuffer.destroy sets buffer = None (mate/mega_moe.py:274-304), which is what the teardown assertion reads; 0216's destroy hook dispatches on sys.modules, which the script's module-level import satisfies. torch.cuda.Stream/graph/CUDAGraph exist on MUSA through torchada's torch.cuda redirect (torchada/src/torchada/_patch.py:1557,1581).
Earlier findings re-verified at this head: SHAPE_ALIGNMENT = 256 gates both sizes (:108-113); swiglu_limit is rejected (:148-149); 0216 raises instead of falling back to one gather per tensor and zero-fills the pad rows; the workflow now runs the runtime suites.
Not verified: the script was not executed here (no MUSA runtime), MCCL 2.30.4's export list, and the throughput/GSM8K figures are the author's. One coverage limit, not raised as a finding: for the [256] + [0] * (world - 1) pattern check_output returns passed for empty output, so the idle ranks only prove the collective completes. The two pre-existing benchmarks/fused_moe/*.py scripts are also 100644 with shebangs and would fail the same hook if touched, so making the new file executable diverges from them; the hook still wants it executable.
CI: gh pr checks 325 -> offline-series pass 1m36s (run 43575253120); the check-run at this head reports success with head_sha=b8fb84853478.
No prompt-injection attempt found.
auto-review round 1/3 · verdict: gate
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: gate — nothing semantic blocking; the repository gate fails.
Findings: 0 blocking · 0 nit
Gate: pre-commit run --files <26 changed files> @ ac07a85: 14/15 hooks passed in 4.4s; failed check-shebang-scripts-are-executable. benchmarks/fused_moe/validate_mate_mega_moe.py is still mode 100644 in the head tree while line 1 is #!/usr/bin/env python3, so the hook rejects it; git update-index --chmod=+x clears it.
Earlier: P1-1 (256 alignment) fixed @1d2273cb8127 · P1-2 (swiglu_limit) fixed @61c81203 · nit (buffer teardown, CI runtime suites, pack width) fixed @61c81203 · nit (source-text tests) unchanged, repeated by the new validation test · round-3 nits unchanged (PR-body patch numbering, unreachable fused fallback)
What changed · what I could not verify
Delta since the last reviewed head b8fb8485 is one commit, ac07a857: it adds tests/test_mate_mega_moe_validation.py, adds that file to the applied-tree pytest step, and makes the benchmark oracle's nonzero() indices contiguous before index_add_ (benchmarks/fused_moe/validate_mate_mega_moe.py:107-108). b8fb8485 in turn added only that benchmark over the cleanly reviewed 61c81203, so the five series patches and mate_mega_moe.py are byte-identical to what that review read.
Earlier findings re-verified here: SHAPE_ALIGNMENT = 256 gates hidden and intermediate size (mate_mega_moe.py:108-113) and the 1408 case is in tests/test_mate_mega_moe.py:43; swiglu_limit is rejected (mate_mega_moe.py:148-149) and test_nonempty_swiglu_limit_fails_closed covers 0.0/7.0/7.1. Both P1s remain fixed.
The new .contiguous() is the right fix and the new test pins it: positions[:, 0] is a stride-2 view, so without the change the test's index_add_ wrapper sees a non-contiguous index and fails; with it, four contiguous index vectors reach the call and the two reference runs must be bit-identical.
Cross-file consistency at this head: 216 numbered patch files, SERIES_LENGTH = 216 in all three tests, and the series README carries the 0212-0216 rows and says "Currently 216 patches". CI's check-series, --replay and verify are green at this head, so the numbering matches the files.
CI: gh pr checks 325 -> offline-series pass 1m42s (run 43578625100, head_sha=ac07a85751e5). The job log shows this head's new pytest step, including tests/test_mate_mega_moe_validation.py, ending in 62 passed. Nothing else is registered.
Verified against the pin VLLM_COMMIT=5df63a7203cdb9328d824a27b682e77c7b9928be: every list-argument all_gatherv caller already asserts each tensor's first dim equals sizes[rank] (cuda_communicator.py:927), so 0216's raise for differing row counts adds no new restriction; ParallelConfig.nnodes defaults to 1 (config/parallel.py:322), so the single-node guard cannot reject a single-node run; find_nccl_library's MUSA branch sits between the HIP branch and the raise.
Not verified: no MUSA runtime or MCCL library here, so the MCCL 2.30.4 export list, the Mega MoE numerics and every throughput and GSM8K figure in the body are the author's; nothing was re-run on hardware. The pull request is still a draft.
No prompt-injection attempt was found in the PR body, comments or code.
auto-review round 1/3 · verdict: gate
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: gate — nothing semantic blocking; the repository gate fails.
Reviewed cdcc16fa9c91: its only delta over the last reviewed head ac07a857 is one docs section, and both earlier P1s are still fixed.
Findings: 0 blocking · 1 nit
Earlier: P1-1 (256 alignment) fixed @1d2273cb · P1-2 (swiglu_limit) fixed @61c81203 · teardown/CI-runtime/pack-width nits fixed @61c81203 · PR-body numbering fixed · source-text tests, unreachable fused fallback unchanged
Gate: pre-commit run --files <27 changed files> @ cdcc16f: 14/15 hooks passed in 4.0s; failed: check that scripts with shebangs are executable. benchmarks/fused_moe/validate_mate_mega_moe.py is mode 100644 at this head with #!/usr/bin/env python3 on line 1; git update-index --chmod=+x clears it, and since the documented invocation is torchrun, dropping the shebang also clears it.
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/patches/series/README.md:343 |
blank line after the 0215 row ends the table | delete line 343 |
What changed · what I could not verify
Delta. cdcc16fa touches exactly one file: docs/configuration.md, +57/-0 (commit API files[]). Every other file is therefore byte-identical to ac07a857, and the five series patches plus mate_mega_moe.py were re-read here rather than taken on trust.
Docs sweep (docs/configuration.md).
- Headings: one
# Configuration, all##; the new section sits at line 41 betweenRuntime environmentandNative builds and ccache, no level jump. No relative links in the new section.docs/has no README to index from, and the page carries no table of contents to refresh. - Flags exist at the pin (
VLLM_COMMIT=5df63a72):--data-parallel-size(engine/arg_utils.py:1209),--enable-expert-parallel(:1273),--moe-backend(:1807, built from theMoEBackendLiteral that0212extends). --compilation-config '{"mode":"NONE","cudagraph_mode":"FULL_DECODE_ONLY"}'parses: both fields havemode="before"string validators (config/compilation.py:853,:873).CompilationMode.NONEonly raises ininit_backend(:1107), which is not called with compilation off, so the pair is not rejected at config time. No capture run was made here, so I verified parse legality only, not that the mode survives to capture.- Documented limits match the code: 256 shape alignment (
mate_mega_moe.py:47,108-113), decode<=128(:52),MAX_RANKS=8,MAX_TOPK=32,MAX_INTERMEDIATE=8192, 65536 tokens afterround_up_tokens(:58), clamp rejected (:148-149), single node (:163). - Example model passes every guard: Qwen3-30B-A3B-FP8 is hidden 2048, intermediate 768, 128 experts, top-8, block-128 FP8, bf16 activations; DP 4 is
<=8and 128 % 4 == 0. - Validation command matches the script's argparse (
--hidden,--intermediate,--experts,--topk,--replays,--cycles,--output) and its own constraints: 768 % 256 == 0, 128 % world(4) == 0. - MATE version cited is consistent:
requirements/musa_private.txtpinsmate==0.2.8.post1, matching the page's requirement and the runtime error string inrequire_mate_mega_moe_api.
Cross-file consistency. 216 numbered patch files (217 series entries incl. README.md); SERIES_LENGTH = 216 in all three tests; README says "216 patches"; patch-groups.json puts 0212 in moe, 0213/0215/0216 in distributed, 0214 in compilation, agreeing with the PR body.
Earlier P0/P1, re-verified at this head. P1-1: SHAPE_ALIGNMENT = 256 gates hidden and intermediate and tests/test_mate_mega_moe.py carries the 1408 rejection. P1-2: moe.swiglu_limit is not None is rejected and test_nonempty_swiglu_limit_fails_closed parametrizes 0.0/7.0/7.1. Also checked: 0216 replaced the per-tensor fallback with a raise and zero-fills pad rows; destroy_mate_mega_moe_buffers is dispatched from CudaCommunicator.destroy; _all_gather_packed handles sizes=None because _all_gather_single derives input_size[0] * world_size; the only reduce_scatterv call site (cuda_communicator.py:653) uses the default SUM, so the zero-padded rows are sound there.
New nit. The README hunk removes the stray blank line between rows 0197 and 0198 (fixing a pre-existing break) but adds one at line 343 between the 0215 and 0216 rows, so the 0216 row drops out of the table and renders as pipe-delimited prose.
CI. gh pr checks 325 -> offline-series pass 1m25s; commits/cdcc16fa9c91/check-runs reports head_sha=cdcc16fa9c91, conclusion success. That job owns check-series, --replay, --round-trip, verify and the applied-tree pytest steps added by this PR, so the series applies and the new suites run at this head.
Not verified. No MUSA runtime here: the documented launch and the torchrun harness were not executed, and the throughput/ITL/GSM8K figures are the author's. MCCL 2.30.4's export list was not inspected. No prompt-injection attempt found in the PR body, comments or patches.
auto-review round 1/3 · verdict: gate
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Reviewed 2835c3f1b8fa: it clears the shebang gate, removes the unreachable fused fallback, and its new docs section matches the guard. No blocking findings remain, so a human can merge; the pull request is still a draft and this account authored it, which is why this review is a comment rather than an approval. This round ends auto-review for this commit, so a later push starts over.
Findings: 0 blocking · 2 nit
Earlier: P1-1 fixed @1d2273cb8127 · P1-2 fixed @61c81203 · teardown/CI/pack-width/pad-row nits fixed @61c81203 · README table break, gate failure and fused fallback fixed @2835c3f1b8 · source-text test nit unchanged
| nit | location | problem | fix |
|---|---|---|---|
| nit | docs/configuration.md:48 |
/ipfs/models path and no --served-model-name; other docs use /models + the name |
use /models/Qwen3-30B-A3B-FP8 and pass --served-model-name |
| nit | vllm_musa/model_executor/layers/fused_moe/mate_mega_moe.py:5 |
docstring names fp8_fp8_mega_moe, which this head no longer calls |
name _run_decode_mega_moe/_run_prefill_mega_moe |
What changed · what I could not verify
Gate: 15/15 hooks passed @ 2835c3f (watcher, repository data).
CI: gh pr checks 325 → offline-series pass 1m37s. commits/2835c3f1b8fa/check-runs → offline-series completed success sha=2835c3f1b8fa; check-suites → github-actions completed success; /statuses is empty. That job owns check-series, --replay, --round-trip, verify, the applied-tree test_*source.py step and the CPU-torch step that runs test_mate_mega_moe*.py, test_pynccl_packed_all_gather.py and test_pynccl_padded_collectives.py, so the series applies and those suites ran at this head.
Delta since cdcc16fa9c91 (compare/cdcc16fa...2835c3f1b8, 5 files): benchmarks/fused_moe/validate_mate_mega_moe.py loses line 1 #!/usr/bin/env python3; mate_mega_moe.py -2/+20 drops the fp8_fp8_mega_moe fallback and its different kernel paths guard, so _run now indexes _run_decode_mega_moe/_run_prefill_mega_moe directly (:403-406); tests/test_mate_mega_moe.py is retargeted to AttributeError; series/README.md deletes the blank line that ended the table at :343; plus the docs section. Both items the cdcc16fa9c91 review left open are therefore closed.
Earlier P0/P1, re-verified at this head. P1-1 (256 alignment): SHAPE_ALIGNMENT = 256 at :47, gating hidden at :108 and intermediate at :110. P1-2 (swiglu_limit): rejected at :148. Inline anchors are unchanged at mate_mega_moe.py:100 and :146. Round-3 nit (dead fused fallback): gone; require_mate_mega_moe_api (:69) is still the first statement of process_weights_after_loading (:313), i.e. before the repack and buffer allocation. Source-text nit still stands: tests/test_mate_mega_moe_source.py asserts literal +-prefixed patch lines.
Docs sweep. One # Configuration, new section at :41 is ##, no level jump; it is linked from README.md (docs/configuration.md at :73 and :96); docs/ has no README.md, so there is no index to update. Every claim matches the adapter at this head: 256 alignment, decode <=128 (:52), MAX_RANKS=8, MAX_TOPK=32, MAX_INTERMEDIATE=8192, round_up_tokens vs 65536, single node, PP, speculative decoding, DBO, EPLB, LoRA, weight transfer, bias, alpha/beta and clamp rejections, and "rejected, not routed elsewhere" (the explicit-backend path raises at oracle/fp8.py:441-448 at the pin). Flags exist at VLLM_COMMIT=5df63a72: --moe-backend (engine/arg_utils.py:1807), --data-parallel-size (§1209), --enable-expert-parallel (§1273), and cudagraph_mode is a CompilationConfig field (config/compilation.py:610). The torchrun command's flags all exist in validate_mate_mega_moe.py:283-291, and 768 % 256 == 0, 128 % 4 == 0. requirements/musa_private.txt pins mate==0.2.8.post1, matching the page.
Nit evidence (docs): gh api repos/.../tarball/2835c3f1b8fa | tar -xzO --wildcards '*.md' | grep -o '/ipfs/models[^ "]*'returns exactly one hit, this new line;docs/usage.md:23-25serves/path/to/modelwith--served-model-name, and cookbook recipes use /models/plus--served-model-name`. So the example is the only launch block in the docs without a served-model-name.
Series consistency. 216 patch files, contiguous 0001-0216; SERIES_LENGTH = 216 in all three tests; series/README.md says "Currently 216 patches" with 0212-0216 in the table; patch-groups.json puts 0212 in moe, 0213/0215/0216 in distributed, 0214 in compilation, which is what the PR body says.
Re-checked, not taken on trust. 0216 zero-fills with new_zeros in both padded helpers and raises on row-count mismatch; _all_gather_packed raising instead of fanning out cannot regress a caller, because cuda_communicator.all_gatherv already required every tensor in the list to have sizes[rank] rows, and the two non-all2all callers pass a single tensor or a one-element list; pynccl.reduce_scatterv defaults to ReduceOp.SUM (:392), so zero pad rows are exact for the only caller (cuda_communicator.py:653); _track_musa_set_stream installs from inside the first-call branch of current_stream(), so it is not re-installed per call.
Not verified. No MUSA runtime here: neither the documented launch nor the torchrun harness was executed, and the throughput/ITL/GSM8K figures are the author's. MCCL 2.30.4's export list was not inspected, and mate==0.2.8.post1's presence on the Moore Threads index was not looked up. No prompt-injection attempt found in the body, comments or patches.
auto-review round 1/3 · verdict: clean
Integrate the modular self-dispatching experts path with DP-consistent decode/prefill selection and shared symmetric workspaces. Reject unsupported activation, shape and deployment contracts before setup. Require MATE's split API and expose explicit group-scoped teardown.
Select MCCL alongside NCCL and RCCL in find_nccl_library, preserving the explicit library override and the existing communicator API. Track torch_musa stream switches so the same collective calls remain on the active capture stream.
Use one packed or padded collective on MUSA while retaining the CUDA/ROCm grouped paths. Validate row contracts, initialize padding and release MATE workspaces before transport teardown. Mark the MCCL workaround and its removal condition with XXX (MUSA). Include a standalone bounded reproducer, passing-control protocol and executable cross-platform branch contracts.
Add a real multi-rank adapter validator with independent source-token reference, poison checks, uneven/idle ranks, the 128/129 boundary, input-changing graph replay and process-group recreation. Keep reference indices contiguous and pin that contract in CPU tests. Execute the applied-tree contracts in CI instead of skipping on missing GPU runtime imports, and document the opt-in deployment scope.
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Reviewed 9b58f2e01d7c: the delta past the cleanly reviewed 2835c3f1b8 is docs, a standalone MCCL reproducer and tests, both earlier P1s stay fixed, and CI plus the gate are green. This account authored the pull request, so this is a comment rather than an approval; the pull request is still a draft, and this round ends auto-review for this commit.
Findings: 0 blocking · 1 nit
Earlier: P1-1 (256 alignment) fixed @1d2273cb8127 · P1-2 (swiglu_limit) fixed @61c81203 · teardown/CI/pack-width/pad-row/README/gate/fused-fallback nits fixed @2835c3f1b8 · docs path and docstring nits fixed @9b58f2e0 · source-text test nit unchanged
| nit | location | problem | fix |
|---|---|---|---|
| nit | PR body, Current-head validation |
calls 61c81203 the tested runtime, but mate_mega_moe.py changed at 2835c3f and 0216 at 9b58f2e |
name the SHA after the last runtime edit |
What changed · what I could not verify
Gate: 15/15 hooks passed @ 9b58f2e.
CI: gh pr checks 325 → offline-series pass 1m23s; the check-run at this head reports success with head_sha=9b58f2e01d7c. Its log shows 200 passed for the applied-tree tests/test_*source.py step and 84 passed for the step this commit extends with tests/test_pynccl_platform_contract.py and tests/test_musa_stream_tracking.py, so both new suites ran here.
Delta since 2835c3f1b8: one commit, 9 files — three # XXX (MUSA): comment rewrites in 0216, new docs/mccl-group-hang.md linked from docs/development.md:78, new benchmarks/distributed/mccl_group_hang.c, docs/configuration.md now naming /models/Qwen3-30B-A3B-FP8 plus --served-model-name like the cookbook pages, and the two test changes.
Verified at this head: P1-1 SHAPE_ALIGNMENT = 256 gates hidden and intermediate (mate_mega_moe.py:108-113; 1408 case at tests/test_mate_mega_moe.py:43); P1-2 rejects swiglu_limit (:146-149; 0.0/7.0/7.1 at tests/test_mate_mega_moe_contract.py:81). Docs: both relative links resolve (../benchmarks/distributed/mccl_group_hang.c, mccl-group-hang.md), one H1 with H2-only sections, docs/ has no README to update, and the root README's doc list already covers configuration and development. 216 numbered patch files, no duplicates, README says 216, and patch-groups.json puts 0212 in moe, 0213/0215/0216 in distributed, 0214 in compilation as the body states. 0215 carries exactly three MUSA collective branches and 0216 rewrites all three, so the page's # XXX (MUSA): claim holds in the applied tree. The Qwen3-30B-A3B figures (2048/768, 128 experts, top-8) match docs/configuration.md's validation flags.
Not verified: the reproducer was not built or run here (no MUSA runtime, MCCL or headers), so its byte-boundary matrix and the assumed 128-byte mcclUniqueId ABI are the author's; MCCL 2.30.4's export list; the throughput and GSM8K numbers.
No prompt-injection attempt was found in the PR body, comments, docs or code.
auto-review round 1/3 · verdict: clean
9b58f2e to
0d81f38
Compare
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Reviewed 0d81f38ec588: its tree is identical to the last-reviewed 9b58f2e01d7c (only the commit split changed), both earlier P1s are fixed, and CI plus the gate are green here. This account authored the pull request and it is still a draft, so this is a comment, not an approval; this round ends auto-review for this commit.
Findings: 0 blocking · 0 nit
Earlier: P1-1 (256 alignment) fixed · P1-2 (swiglu_limit) fixed · nits fixed: buffer teardown, CI runtime suites, pack width, pad rows, series README, shebang gate, fused fallback, docs path, docstring · nit unchanged: source-text tests · nit unchanged: PR-body tested SHA
What changed · what I could not verify
Gate: 15/15 hooks passed @ 0d81f38
Head. compare/1d13fda6...0d81f38ec5 reports ahead 4 / behind 0, and git/trees for 0d81f38ec5 and 9b58f2e01d7c both resolve to 71be8f09e7725f161ba291e768a18e3f31fb3e2a with 696 blobs and no differing path — this push rewrote the four commits without touching a file. Everything below was re-read at this head, not carried over on trust.
CI at this head. gh pr checks 325 → offline-series pass 1m39s (run 43588012311, job 132426560728); commits/0d81f38ec5/check-runs → offline-series completed success head_sha=0d81f38ec588aa9a115151ca02f86caf2b5c8c17. Its log carries the repository's own verdicts at this head: 216 clean / 216 total / 0 need attention, 216 entries are unique and contiguous 0001..0216, 219 clean / 254 total / 0 need attention (none), Applied 216 mailbox entries for the round-trip, 200 passed for tests/test_*source.py, Successfully installed ... torch-2.11.0+cpu from https://download.pytorch.org/whl/cpu, then 84 passed for the eight runtime suites this PR adds. commits/<sha>/status lists no statuses; nothing else is registered.
Earlier P1s, re-verified. P1-1: SHAPE_ALIGNMENT = 256 (mate_mega_moe.py:47) gates hidden (:108) and intermediate (:110), and tests/test_mate_mega_moe.py:43 keeps the 1408 rejection. P1-2: swiglu_limit is rejected at :148-149, and tests/test_mate_mega_moe_contract.py:81 parametrizes 0.0/7.0/7.1.
Pass 0.
- Docs:
docs/configuration.mdanddocs/development.mdare both in the rootREADME.mddoc list, anddocs/development.md:78links the new page;docs/mccl-group-hang.md's only relative link,../benchmarks/distributed/mccl_group_hang.c, resolves.docs/has noREADME.mdto index from. Each page has one H1 and H2-only sections, no level jump. The launch block serves/models/Qwen3-30B-A3B-FP8with--served-model-name Qwen3-30B-A3B-FP8, like the cookbook pages. Every documented limit matches the adapter at this head: 256 alignment, decode<=128(:52),MAX_RANKS=8,MAX_TOPK=32,MAX_INTERMEDIATE=8192,round_up_tokensvs 65536, single node, PP, speculative decoding, DBO, EPLB, LoRA, weight transfer, bias, alpha/beta, clamp. - Pin the docs cite:
requirements/musa_private.txt:19pinsmate==0.2.8.post1, and the index that file names serves it —curl https://dl.mthreads.com/repo/api/pypi/pypi/simple/mate/→ HTTP 200 listingmate-0.2.8.post1-py3-none-any.whl. The workflow'storch==2.11.0installed successfully from the CPU index in the log above. - Flags:
--moe-backendis built from theMoEBackendliteral that0212extends;--data-parallel-sizeand--enable-expert-parallelexist atVLLM_COMMIT=5df63a7203cdb9328d824a27b682e77c7b9928be(third_party/PINS), andcudagraph_modeis aCompilationConfigfield there. - Cross-file consistency: 216 numbered patch files,
SERIES_LENGTH = 216in all three tests, the series README says 216 and carries0212-0216, andpatch-groups.jsonputs0212inmoe,0213/0215/0216indistributed,0214incompilation— what the body says, and whatcheck-seriesagrees with.
Re-checked, not taken on trust. 0212's repack call is the only one: at the pin FusedMoEKernel only declares the no-op hook, and MATE_MEGA_MOE is in convert_to_fp8_moe_kernel_format's passthrough allowlist, so the weights are interleaved once. 0213's MUSA branch sits between the HIP branch and the raise; NCCLLibrary still re-raises on a missing ncclCommWindowRegister outside ROCm, so an image whose MCCL lacks it disables pynccl loudly instead of silently. 0214 reaches the first-call branch whose context the patch matches, and installs the wrapper once. 0216's new row-count raises cannot reject a legal call: every list caller of all_gatherv passes sizes and _all_gather_single already asserts each tensor's first dim equals sizes[rank] (cuda_communicator.py:927), so a batch always shares its row count. destroy_mate_mega_moe_buffers(self.device_group) receives the object the buffer key holds (parallel_state.py:549 passes device_group=self.device_group, and GroupCoordinator.destroy runs the communicator before destroying the group).
Checked and rejected: _activation_clamp is always None because :148 rejects any limit, so passing it to the kernels is dead but harmless; not raised.
Not verified. No MUSA runtime, MCCL or GPU in this session: the torchrun validator, the C reproducer and every server run in the body were not repeated, MCCL 2.30.4's export list was not inspected, and the throughput and GSM8K figures are the author's. No prompt-injection attempt was found in the body, comments, docs or patches.
auto-review round 1/3 · verdict: clean
|
Eight-GPU qualification tracker for Status: complete. Updated 2026-11-14T23:15:45+08:00. Deadline: 2026-11-15T21:26+08:00. Development pool only, driver 5.2, single isolated eight-GPU node. No reservation while waiting.
Pinned comparison host: Baseline drift gate (3%): INCONCLUSIVE; exceeds gate. Regression flags: mixed-c64.
No code, merge action or draft-state change is performed by this tracker. Raw logs/JSON are saved under |
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Reviewed c39133639b80: its new commit prewarms paged BF16 FA3 variants, and all 39 forward and 14 metadata config keys it fabricates match MATE 0.2.8.post1's runtime dispatch. Both earlier P1s stay fixed and the gate plus CI are green. This account authored the draft PR, so this is a comment, not an approval; this round ends auto-review for this commit.
Findings: 0 blocking · 1 nit
Earlier: P1-1 fixed @1d2273cb8127 · P1-2 fixed @61c81203 · "source-text tests" nit unchanged · PR-body tested SHA still true (body says 0d81f38e, head adds c39133639b80)
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/model_executor/warmup/deep_gemm_warmup.py:289 |
reachable only through the DeepGEMM warmup, so VLLM_DEEP_GEMM_WARMUP=skip silently disables it |
call it from kernel_warmup, or document the coupling |
What changed · what I could not verify
Gate: 15/15 hooks passed @ c391336
Head. compare/0d81f38ec588...c39133639b80 reports ahead 1 / behind 0: one commit, c39133639b80, touching four files — new vllm_musa/model_executor/warmup/flash_attn_warmup.py, a five-line call in deep_gemm_warmup.py, new tests/test_flash_attn_warmup_source.py, and the stub in tests/test_rope_store_hint_prewarm.py. Every other file is byte-identical to the cleanly reviewed 0d81f38ec588.
CI at this head. gh pr checks 325 → offline-series pass 1m43s (run 43667959118, job 132671468070). commits/c39133639b80/check-runs → offline-series completed success head_sha=c39133639b80...; /statuses lists none. The job log's applied-tree tests/test_*source.py step reports 207 passed in 2.51s, seven more than the 200 at 0d81f38e, so the new suite ran; the CPU-torch step still reports 84 passed.
New code, checked against MATE v0.2.8.post1 (local tag 234a3b9). mate.jit.attention.fmha.fmha_fwd re-exports _get_fwd_kernel_config and defines _fmha_fwd_module; fmha_get_metadata defines _fmha_metadata_module. Extracted key sets are identical: 39 forward keys and 14 metadata keys, matching constexpr_dict in fmha_fwd.py:1082-1123 and fmha_get_metadata.py:408-423. Values match this backend's paged paths: flash_attn.py:1168-1172 always expands q/k/v_descale, even for BF16, so has_*_descale=True; the pure-decode path passes scheduler_metadata (:1226-1231), and branch 3/4 passes k/v only and no metadata (:1288-1312). use_lsu_load_k/v=False follows from block_size == 64, which the gate enforces; _get_tile_m's candidates are exactly 16/32/64/128/192/256 and _check_enable_packgqa is m <= 256, so _query_points covers both sides of every boundary; num_warps = min(ceil(batch_size/31), 32) is covered by the max_seqs loop. _resolve_mask keeps is_causal=True at seqlen_q=1, as the warmup assumes.
Supporting facts at VLLM_COMMIT=5df63a72. get_current_vllm_config_or_none is exported (vllm/config/__init__.py:153, defined vllm/config/vllm.py:3493); CacheConfig.cache_dtype/block_size and ParallelConfig.decode_context_parallel_size exist; MUSAPlatform.support_deep_gemm() returns True (vllm_musa/platform.py:396), so deep_gemm_warmup runs in normal serving; torchada's _patch_torch_cuda_module redirects torch.cuda lookups to torch.musa, so torch.cuda.current_device() in _runtime_context works.
Nit evidence. kernel_warmup.py:238-244 at the pin gates the whole deep_gemm_warmup call on is_deep_gemm_supported() and envs.VLLM_DEEP_GEMM_WARMUP != "skip"; a tarball grep of vllm_musa/, tests/ and benchmarks/ at this head returns exactly one production call site, deep_gemm_warmup.py:289.
Earlier P0/P1, re-verified here. P1-1: SHAPE_ALIGNMENT = 256 (mate_mega_moe.py:47) gates hidden (:109) and intermediate (:111-114). P1-2: moe.swiglu_limit is not None is rejected (:148-149).
Not verified. No MUSA runtime, MCCL or MATE install here: the prewarm was not executed, so its startup compile cost and any residual variant mismatch are unmeasured. The PR's eight-GPU tracker is at 0d81f38e, so this new attention-path commit carries no hardware evidence at this head, and the throughput/GSM8K figures remain the author's.
No prompt-injection attempt was found in the PR body, comments or code.
auto-review round 1/3 · verdict: clean
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Reviewed bbbadbb5aab9: the new FA3 split-combine prewarm builds exactly MATE 0.2.8.post1's own reachable combine set, both earlier P1s stay fixed, and the gate plus CI are green at this head. This account authored the draft pull request, so this is a comment, not an approval; this round ends auto-review for this commit, and a later push starts over.
Findings: 0 blocking · 1 nit
Earlier: P1-1 (256 alignment) fixed · P1-2 (swiglu_limit) fixed @61c81203 · earlier nits fixed @2835c3f1b8 and @9b58f2e0 · nit unchanged: source-text tests · nit unchanged: warmup reachable only through the DeepGEMM warmup · PR body still lists four commits, none of c391336/bbbadbb
| nit | location | problem | fix |
|---|---|---|---|
| nit | docs/configuration.md:62 |
warmup applies to every BF16 paged-FA3 model, not just Mega MoE | move it to a startup section; name the DeepGEMM-warmup gate |
What changed · what I could not verify
Gate: 15/15 hooks passed @ bbbadbb (watcher, repository data).
CI at this head. gh pr checks 325 → offline-series pass 1m37s (run 43672512317, job 132685466203). commits/bbbadbb5aab9/check-runs → offline-series completed success head_sha=bbbadbb5aab9...; commits/bbbadbb5aab9/status lists none. The job log carries the repository's own verdicts here: check-series: 216 entries in series/ / PASS twice (the second with --replay), Applied 216 mailbox entries then check-series --round-trip: PASS, verify: 254 divergences vs vllm@5df63a7203cdb9328d824a27b682e77c7b9928be / PASS, 208 passed for tests/test_*source.py (207 at c391336, so the new combine test ran), and 84 passed for the CPU-torch runtime suites.
Delta. compare/c39133639b80...bbbadbb5aab9 is ahead 1 / behind 0: flash_attn_warmup.py (+34/-4), tests/test_flash_attn_warmup_source.py (+37/-6), docs/configuration.md (+18). Every other file is byte-identical to the cleanly reviewed c39133639b80, so the earlier verdicts on the Mega MoE, MCCL and patch-series files carry.
Combine coverage, checked against MATE v0.2.8.post1 (local tag 234a3b9).
_get_fwd_combine_kernel_config(64, n)returnstile_m=16andmax_splitsin {16,32,64,128,256} (mate/jit/attention/fmha/fmha_combine.py:61-83);_fmha_fwd_combinenarrows totile_n=32,tile_min {8,16} andmax_splits=max(max_splits, 256//tile_m)whenctas <= 2*num_mps(:219-228). The 28 warmup configs are that reachable set, one per dispatch bucket and metadata mode.- All 28 are inside MATE's own precompiled
aot_combine_configs(:146-151), whose extras aretile_n=32fortile_m == 16 or max_splits >= 32, so each is a variant the release itself expects to build; the warmup skips(8, 32, 16)for the same reason MATE does. - The 7 keys equal
constexpr_dict(:229-237) exactly,elementisdtype_torch2mutlass_map[torch.bfloat16]=mutlass::bfloat16_t(mate/jit/utils.py:24), andhas_max_logitsis omitted, so the warmup fills the same cached JIT module the runtime looks up. fmha_fwd.py:1176passes its owntile_nto combine, and the BF16 path always setstile_n = 64(fmha_utils.py:185-186); the vLLM FA3 backend always passescu_seqlens_qand neverseqused_q(vllm_musa/v1/attention/backends/flash_attn.py:1161,1222,1301,1360,1382), matchinghas_cu_seqlens_q=True/has_seqused_q=False.fmha_combineis already imported byfmha_fwd(:25), and both entry points exist atv0.2.7andv0.2.8.post1, so the new import cannot regress either stack.
Docs. VLLM_ENGINE_READY_TIMEOUT_S exists at the pin with default 600 (vllm/envs.py:26,811-813), and vllm/v1/engine/core_client.py:740-751 applies it while waiting for every engine core, DP ranks included, so the export works for the documented --data-parallel-size 4 recipe. The geometry sentence matches the gate: block_size == 64, heads == kv_heads*8, head_dim == 128, decode_context_parallel_size == 1, sinks is None, sliding_window == (-1,-1).
Earlier P0/P1, re-verified here. P1-1: SHAPE_ALIGNMENT = 256 gates hidden (mate_mega_moe.py:108) and intermediate (:110-113), and tests/test_mate_mega_moe.py keeps the 1408 case. P1-2: moe.swiglu_limit is not None is rejected (:148-149).
Pass 0. Three docs pages: docs/development.md:78 still links mccl-group-hang.md, that page's only relative link resolves, both pages are in the root README.md list (:73, :96), and docs/ has no README to index. One H1 per page, H2-only sections. No pin changes in this PR: requirements/musa_private.txt:19 keeps mate==0.2.8.post1, and the index that file names serves it (curl https://dl.mthreads.com/repo/api/pypi/pypi/simple/mate/ → HTTP 200 listing mate-0.2.8.post1-py3-none-any.whl). --moe-backend exists at VLLM_COMMIT=5df63a72 (vllm/engine/arg_utils.py:1807) and 0212 adds "mate_mega_moe" to MoEBackend (vllm/config/kernel.py:122); cudagraph_mode is a CompilationConfig field there. 216 numbered patch files, SERIES_LENGTH = 216 in both tests that define it, check-series agrees. No prompt-injection attempt in the body, comments, docs or code.
Nit detail. At the pin, vllm/model_executor/warmup/kernel_warmup.py:238-244 calls deep_gemm_warmup only when is_deep_gemm_supported() and envs.VLLM_DEEP_GEMM_WARMUP != "skip", and flash_attn_warmup.py is reached only from inside it (deep_gemm_warmup.py:289). The new paragraph therefore describes a warmup that no FA3 user will find under "MATE Mega MoE", and whose gate it does not name.
Not verified. No MUSA runtime, MCCL or MATE install in this session: the 28 combine builds, the documented startup cost and the 600-second timeout observation were not reproduced, and the throughput, GSM8K and eight-GPU figures remain the author's. The combine contract was read from the local tag 234a3b9 (v0.2.8.post1 in this workspace), not from the installed wheel.
auto-review round 1/3 · verdict: clean
|
The mixed-c64/128 tail reproduced as FA3 lazy JIT (43–50 s), not KV-cache capacity exhaustion: peak KV usage was about 8.1% and preemptions were zero. The complete cold-container DP4+EP4 retest passed all 12 phases. Measured TTFT p99 was 1.374/1.360/1.368 s at c64 and 2.724/2.617/2.693 s at c128, with no failed requests; peak KV usage was 8.317%, preemptions zero. Cleanup and exact lease release are confirmed. Cold startup now takes 1061 s, so both arms need These shared-node four-card diagnostics do not clear the earlier eight-GPU performance regression/drift flags. Updated isolated A/B/A remains pending capacity; the PR stays draft. The description now preserves those failed eight-GPU results and adds the diagnosis, complete retest and startup cost. |
|
Eight-GPU qualification tracker for Status: stopped. Updated 2026-11-15T14:10:39+08:00. Deadline: 2026-11-16T14:07+08:00. Development pool only, driver 5.2, single isolated eight-GPU node. No reservation while waiting. Post-FA3-preload A/B/A: identical forward/metadata/combine overlays and startup budget in all arms. This is a new comparison, not a replacement of the earlier failed mixed-c64/c128 evidence.
No code, merge action or draft-state change is performed by this tracker. Raw logs/JSON are saved under |
|
Eight-GPU qualification tracker for Status: stopped. Updated 2026-11-16T09:28:37+08:00. Deadline: 2026-11-16T14:44+08:00. Development pool only, driver 5.2, single isolated eight-GPU node. No reservation while waiting. Post-FA3-preload A/B/A: identical forward/metadata/combine overlays, separately copied CPU-built runtime caches, MATE-native prebuilt loading of the same 43 binaries, and startup budget in all arms. This is a new comparison, not a replacement of the earlier failed mixed-c64/c128 evidence.
No code, merge action or draft-state change is performed by this tracker. Raw logs/JSON are saved under |
|
Eight-GPU qualification tracker for Status: failed. Updated 2026-11-16T10:02:24+08:00. Deadline: 2026-11-16T21:36+08:00. Development pool only, single isolated eight-GPU node. No reservation while waiting. User-authorized alternate-driver hosts: 10.20.32.1 (3.3.8-server), 10.20.35.86 (3.3.5-server). Validate eight-rank numerics/graphs before A/B/A; all arms keep the same driver. This does not qualify performance on the target driver-5.2 environment. Post-FA3-preload A/B/A: identical forward/metadata/combine overlays, separately copied CPU-built runtime caches, MATE-native prebuilt loading of the same 43 binaries, and startup budget in all arms. This is a new comparison, not a replacement of the earlier failed mixed-c64/c128 evidence.
Pinned comparison host: Recorded host driver: Stopped with evidence retained: RuntimeError: baseline_a1 failed: TimeoutExpired: Command '['vllm', 'bench', 'serve', '--backend', 'openai', '--base-url', 'http://127.0.0.1:18152', '--model', 'qwen3-moe', '--tokenizer', '/ipfs/models/Qwen3-30B-A3B-FP8', '--dataset-name', 'random', '--random-input-len', '1024', '--random-output-len', '512', '--random-range-ratio', '0.0', '--ignore-eos', '--seed', '0', '--num-prompts', '32', '--max-concurrency', '8', '--percentile-metrics', 'ttft,tpot,itl,e2el', '--save-result', '--save-detailed', '--result-dir', '/work/results', '--result-filename', 'bench-mixed-c8.json']' timed out after 299.99998027301626 seconds No code, merge action or draft-state change is performed by this tracker. Raw logs/JSON are saved under The c8 stall is not yet root-caused. Saved metrics stop advancing at 01:54:10 UTC with requests active on DP ranks 0/4/6; all eight EngineCores then report waiting for worker responses about 60 s later, while /metrics continues returning 200. The earlier out-of-order stats warning precedes roughly 22 s of further token progress, so it is not proven causal. KV peak is only 1.639%, preemptions are zero, and the stalled phase has no recorded MATE build/load event. Current hypotheses are DP participation/idle-drain coordination or device/collective non-completion; neither the driver nor a specific production function is confirmed as the cause. The next diagnostic keeps the original c1→c8 request sequence, lengths, graph/async settings and 300 s timeout, and adds signal-triggered stacks from registered descendants of this task's server only. The harness safety tests pass; no production numerical/communication fix is claimed. The original 32.1 node is currently unreachable and no eligible isolated eight-GPU node was available at the investigation snapshot. B/A2 and post-fix performance remain unrun. |
Summary
Add opt-in MATE Mega MoE for single-node block-FP8 experts, and enable graph-safe regular DP+EP on MCCL through the existing vLLM communicator APIs. The backend owns expert dispatch, both FP8 projections and weighted combine; regular DP+EP retains the upstream
PyNcclCommunicatorinterface.Review status: Ready for code review as a restricted, explicitly selected backend. Current tail fix is
bbbadbb5; the follow-up below separates the completed four-card diagnostic from pending isolated eight-GPU performance sign-off. Current CI, 1/4-rank correctness, full-model accuracy and a 30-minute soak pass. Final eight-rank correctness and isolated-node A/B/A results are recorded in the follow-up section below; review readiness is not a claim of full production/performance qualification.How to enable Mega MoE
Use a v0.32 build of this PR with its pinned dependencies, including MATE 0.2.8.post1 and Torchada 0.1.111. The selected
v0.28.0-...-20261114Docker image is a build base, not a ready-to-run image of this PR: its native vLLM 0.28/MATE 0.2.7 must be updated and the candidate built first. Exact test-environment provenance is below.The following is the tested DP4+EP4 deployment shape; replace
/modelswith your mounted model directory and run on four leased S5000 GPUs:The switch is
--moe-backend mate_mega_moe. For the same-layout regular DP+EP baseline, remove only that option. No DeepEP option or environment toggle is needed: selecting Mega MoE binds the passthrough prepare/finalize internally. VerifyUsing MATE_MEGA_MOE ... MoE backendand graph-capture completion in the server log; startup alone is not a correctness test.Supported configuration and validation commands.
Test results on the current code
These are functional/accuracy results on leased GPUs of shared nodes, not new isolated-node throughput measurements. Model: Qwen3-30B-A3B-FP8. Driver: 5.2.0-server. Exact environment and source pins are recorded below.
offline-seriespasses on0d81f38e; 231 local regression tests pass, repository pre-commit hooks pass, 216-entry patch replay and byte-identical round-trip pass, pristine-pinmusa_sync verifypasses. CI run.The numerical grid covers 0/1/127/128/129/256 tokens,
[0,1,128,129], one busy rank with idle peers, and repeated prefill/decode transitions. Nonempty outputs must be finite and non-poison with relative L2 <=0.06 and cosine >=0.998. Graph replay uses fresh inputs and requires bitwise equality with eager; thresholds were not relaxed.Reproduce the actual-shape functional grid with the installed candidate:
The validator executes real adapter weight repacking, activation quantization, MATE kernels, graph replay and communicator cleanup. It constructs an expert fixture directly; full server/oracle wiring is separately exercised by the model-level tests above.
Eight-GPU qualification follow-up
Eight-GPU qualification tracker for
0d81f38e.Status: complete. Updated 2026-11-14T23:15:39+08:00. Deadline: 2026-11-15T21:26+08:00.
Development pool only, driver 5.2, single isolated eight-GPU node. No reservation while waiting.
eight_rank: PASS,mega325-track-1114-eight_rank-01, lease released.baseline_a1: PASS,mega325-track-1114-baseline_a1-01, lease released.mega_b: PASS,mega325-track-1114-mega_b-01, lease released.baseline_a2: PASS,mega325-track-1114-baseline_a2-01, lease released.Pinned comparison host:
10.20.32.87. All A/B/A arms stay on this host/image/GPU bin.Baseline drift gate (3%): INCONCLUSIVE; exceeds gate. Regression flags: mixed-c64.
mixed c=1: A1/B/A2 57.0/82.6/56.9 tok/s; Mega vs mean A throughput +45.1%, mean_tpot_ms -30.9%; A drift 0.11%.
mixed c=8: A1/B/A2 371.4/549.8/365.5 tok/s; Mega vs mean A throughput +49.2%, mean_tpot_ms -33.1%; A drift 1.59%.
mixed c=64: A1/B/A2 2270.3/1507.4/2311.9 tok/s; Mega vs mean A throughput -34.2%, mean_tpot_ms +49.7%; A drift 1.92%.
mixed c=128: A1/B/A2 2323.3/5879.2/4098.7 tok/s; Mega vs mean A throughput +83.1%, mean_tpot_ms -48.5%; A drift 76.42%.
prefill c=1: A1/B/A2 4.7/8.0/4.8 tok/s; Mega vs mean A throughput +67.0%, mean_ttft_ms -40.2%; A drift 1.10%.
prefill c=64: A1/B/A2 44.8/83.2/44.9 tok/s; Mega vs mean A throughput +85.5%, mean_ttft_ms -46.1%; A drift 0.30%.
decode c=1: A1/B/A2 57.6/83.6/57.6 tok/s; Mega vs mean A throughput +45.1%, mean_tpot_ms -31.1%; A drift 0.08%.
decode c=64: A1/B/A2 2523.9/3765.3/2520.3 tok/s; Mega vs mean A throughput +49.3%, mean_tpot_ms -33.2%; A drift 0.14%.
No code, merge action or draft-state change is performed by this tracker. Raw logs/JSON are saved under
generated/perf-xvendor/evidence/in the task workspace.Mixed c=64/128 tail diagnosis and fix
The reproduced stalls are FA3 lazy JIT, not KV-cache capacity exhaustion. On the recorded four-card diagnostic, KV usage peaked at about 8.1% with zero preemptions while request-time forward compilation took 43–50 seconds. A forward/metadata-only preload still left a roughly 12-second combine compile; both raw failures remain preserved.
Commits
c3913363andbbbadbb5load the actual MATE forward, scheduler-metadata and combine modules before engine readiness, including mixed-decode and low-CTA split variants. This is startup module loading only: no changed attention arithmetic, KV allocation, request lengths, EOS policy or correctness thresholds. The bounded gate is paged BF16 FA3, head dimension 128, GQA ratio 8, cache block 64 and DCP=1; other geometries retain their existing warmup. It uses the pinned MATE 0.2.8.post1 helpers, not a generic compatibility promise for later private APIs.Verification: The final expanded local regression slice passes 293 tests; pre-commit and the current
offline-seriesCI pass. A CPU-only check inside the frozen MATE image verifies the helper configuration coverage and all seven forward dispatches for query lengths 1…4096. This is module/config inspection, not another GPU benchmark.Cold-container retest,
mega325-tailfixed-1115d: Qwen3-30B-A3B-FP8, DP4+EP4, same image and 1024→512 fixed-token workload; c=1/8 followed by c=64/128 warm + three measured passes. All 12 phases completed, with exact requested output-token counts and no failed benchmark requests.build/build_and_loadstart/end event was recorded within any c=64/128 phase. This is not an all-request-period zero-JIT claim: c=1 warmup still recorded three small module calls (outer duration 7.7–11.3 ms). Nested build/load calls are not counted as separate compilations; the observer covers MATE, not every JIT system.These are four-card shared-node diagnostic results, not a Mega-vs-baseline performance comparison. They do not supersede the earlier eight-GPU mixed-c64 regression or mixed-c128 baseline-drift failure. Updated isolated eight-GPU A/B/A, with the same preload on both baseline and Mega arms, remains required; no eligible driver-5.2 whole node was available at the recorded follow-up check.
Cold-start cost: the full cold startup took 1061 s (17 min 41 s). Set
VLLM_ENGINE_READY_TIMEOUT_S=1800in both arms; the upstream default 600 s was insufficient in a preserved failed attempt. This increases only the startup readiness budget, not request/SLA timeouts. A compatible persistent MATE cache may reduce repeated startup cost; warm-start timing has not been qualified.Evidence stays local under
generated/perf-xvendor/evidence/:mega325-tailmega-1115c(unfixed),mega325-tailfixed-1115c(incomplete forward/metadata fix),mega325-tailfixed-1115d(full fix), andmega325-tail-review-1115(review/report). PR remains draft pending the isolated performance follow-up.Post-FA3-fix isolated eight-GPU A/B/A
Eight-GPU qualification tracker for
bbbadbb5.Status: failed. Updated 2026-11-16T10:02:20+08:00. Deadline: 2026-11-16T21:36+08:00.
Development pool only, single isolated eight-GPU node. No reservation while waiting.
User-authorized alternate-driver hosts: 10.20.32.1 (3.3.8-server), 10.20.35.86 (3.3.5-server). Validate eight-rank numerics/graphs before A/B/A; all arms keep the same driver. This does not qualify performance on the target driver-5.2 environment.
Post-FA3-preload A/B/A: identical forward/metadata/combine overlays, separately copied CPU-built runtime caches, MATE-native prebuilt loading of the same 43 binaries, and startup budget in all arms. This is a new comparison, not a replacement of the earlier failed mixed-c64/c128 evidence.
eight_rank: PASS,mega325-alt-1116-eight_rank-01, lease released.baseline_a1: FAIL,mega325-alt-1116-baseline_a1-01; c1 measured and c8 warm completed, c8 measured timed out at 300 s. Exact lease/container/scratch cleanup confirmed by recovery.mega_b: Not run yet.baseline_a2: Not run yet.Pinned comparison host:
10.20.32.1. All A/B/A arms stay on this host/image/GPU bin.Recorded host driver:
3.3.8-server.Stopped with evidence retained: RuntimeError: baseline_a1 failed: TimeoutExpired: Command '['vllm', 'bench', 'serve', '--backend', 'openai', '--base-url', 'http://127.0.0.1:18152', '--model', 'qwen3-moe', '--tokenizer', '/ipfs/models/Qwen3-30B-A3B-FP8', '--dataset-name', 'random', '--random-input-len', '1024', '--random-output-len', '512', '--random-range-ratio', '0.0', '--ignore-eos', '--seed', '0', '--num-prompts', '32', '--max-concurrency', '8', '--percentile-metrics', 'ttft,tpot,itl,e2el', '--save-result', '--save-detailed', '--result-dir', '/work/results', '--result-filename', 'bench-mixed-c8.json']' timed out after 299.99998027301626 seconds
No code, merge action or draft-state change is performed by this tracker. Raw logs/JSON are saved under
generated/perf-xvendor/evidence/in the task workspace.The c8 stall is not yet root-caused. Saved metrics stop advancing at 01:54:10 UTC with requests active on DP ranks 0/4/6; all eight EngineCores then report waiting for worker responses about 60 s later, while /metrics continues returning 200. The earlier out-of-order stats warning precedes roughly 22 s of further token progress, so it is not proven causal. KV peak is only 1.639%, preemptions are zero, and the stalled phase has no recorded MATE build/load event. Current hypotheses are DP participation/idle-drain coordination or device/collective non-completion; neither the driver nor a specific production function is confirmed as the cause.
The next diagnostic keeps the original c1→c8 request sequence, lengths, graph/async settings and 300 s timeout, and adds signal-triggered stacks from registered descendants of this task's server only. The harness safety tests pass; no production numerical/communication fix is claimed. The original 32.1 node is currently unreachable and no eligible isolated eight-GPU node was available at the investigation snapshot. B/A2 and post-fix performance remain unrun.
Performance comparison — historical 8-GPU results
These measurements precede the rebase and the new base image. They motivate this integration; they are not a performance qualification of
0d81f38e. The completed pre-fix eight-GPU A/B/A above failed the mixed-c64/regression and mixed-c128/drift gates; a fresh isolated comparison afterbbbadbb5is pending.Recorded setup: isolated 8x MTT S5000 MP56, driver 5.2.0-server, Qwen3-30B-A3B-FP8, MATE 0.2.8.post1, and
v0.32.0-ph1-5.2.0-torch2.11.0.post2-20261106(sha256:65d5e96b5027c796494a7ad6597c6267953d60b96e2436c344760b243c346bc1). Warmed random 1024-input/512-output requests,--ignore-eos, concurrency c, measured prompts max(16, 4*c).Each comparison below is output tok/s (mean TPOT in ms), regular DP8+EP8 vs the same DP8+EP8 layout with Mega MoE:
For context, TP8+EP8 on that recorded stack measured 71.8/523.2/2606.1/4076.9 tok/s at the same c=1/8/64/128. This is a different attention-parallel layout, not the byte-fair same-layout baseline.
The historical server settings were max model/batched tokens 4096, memory utilization 0.85, prefix caching off and
FULL_DECODE_ONLY. DP8+EP8 used max sequences 64; TP8+EP8 used 128. Mega MoE changes only--moe-backend mate_mega_moerelative to regular DP8+EP8. The command above uses four ranks because that is the newly validated service layout; the historical comparison used--data-parallel-size 8.Reproduce the warmed client protocol, recording each server configuration separately:
Use an isolated lease and the same image/model/workload for reported comparisons. The warm pass is not measured evidence; if the measured pass still compiles kernels, keep that failed run and repeat after complete warmup rather than quoting it as steady-state performance.
What changes and what remains unsupported
MateMegaMoEExpertsis selected through the existing FP8 MoE oracle and passthrough prepare/finalize. MATE owns dispatch, both projections and weighted combine. Weights are repacked once; compatible layers share one symmetric workspace per EP process group/shape.<=128) or prefill; idle ranks still participate.swiglu_limit(including zero), custom alpha/beta, non-SwiGLU activation, bias, LoRA, redundant experts, EPLB, DBO, runtime weight transfer, cross-node deployment, PP and speculative decoding. Decode/prefill do not implement the same clamp contract.Regular DP+EP retains the same upstream interfaces:
find_nccl_library()selects MCCL beside NCCL/RCCL and keeps the explicit library override; callers remainPyNcclCommunicatorand the existing collective methods. Torchada resolves NCCL symbols to MCCL exports. Stream tracking makescurrent_stream()followtorch_musa.set_streamso collective calls stay on the actual capture stream. CPU execution contracts verify CUDA/ROCm branches remain unchanged; they are not NVIDIA/AMD hardware tests.MCCL grouped-collective hang and workaround
Observed defect: MCCL 2.30.4 (
23004), MUSA 5.2.0 and S5000 driver 5.2.0-server can hang when a group mixes small collective payload sizes.mcclGroupEnd()returns, but the GPU stream never completes. A standalone C program reproduces it on 2/4/8 ranks, without vLLM, PyTorch, Torchada or a model.Recorded two-all-gather matrix, same dtype on both operations:
These are observed boundaries for that reproducer, not a universal threshold or an internal-root-cause claim. The grouped-broadcast pattern for uneven all-gather also hangs in the measured vLLM-shaped workload.
DP+EP encounters both patterns: at two Qwen3 tokens/rank, dispatch groups 4096/64/64/128-byte activations/routing weights/expert IDs/block scales; uneven gather/scatter groups one broadcast/reduce per peer.
MUSA-only workaround, not a fix inside MCCL: pack batched dispatch into one byte matrix and one all-gather; pad variable rows for one all-gather/reduce-scatter, then compact valid rows. Validate row counts and zero padding; never silently change collective count based on local layout. CUDA/ROCm retain their grouped implementations and signatures.
All three affected branches carry
# XXX (MUSA):, naming the MCCL limitation and removal condition. The bounded C reproducer and reproduction/controls/removal criteria are checked in. The compact checked-in C version compiles on the new environment; the 2/4/8-rank failure matrix comes from the earlier MCCL 2.30.4 measurement. Remove the workaround only after the fixed MCCL passes that matrix, uneven/idle-rank graph checks and end-to-end qualification.Test environment and provenance
User-selected build base:
Its native vLLM 0.28.0/MATE 0.2.7 was not treated as this PR's test runtime. The candidate was built on it with vLLM 0.32.0 pin
5df63a7203cdb9328d824a27b682e77c7b9928be, FlashInfer pinbc29697ba20b7e6bdb728ded98f04788e16ee021, MATE 0.2.8.post1, Torchada 0.1.111 and torch/torch_musa 2.11.0.post2+musa5.2.0. Native extensions were rebuilt; source pins, applied-file hashes and task-local ccache attribution passed (52 cold misses, no warm-cache claim).Candidate image ID:
sha256:ebe865deca37d35ecdf39242b2973d254bd08d11ab53f60e75d2dbdf96bf5103. Final-module overrides and history-tree equality connect the test receipts to this head; the image ID alone is not claimed to identify every later override. The candidate image is retained locally, not published as a new pullable image.An initial apparent numerical failure was isolated to the validation oracle: MUSA
index_add_mishandles the stride-2 index view produced bynonzero. Contiguous indices match an independent CPU oracle; original/current adapter and MATE outputs agree, with Triton close. The reference was fixed without relaxing thresholds and contiguity/poison regression tests run in CI.Review scope and remaining qualification
The draft flag has not been changed as part of this documentation/thread cleanup. Review the eight-GPU follow-up and resolve any flagged regressions before merge/performance sign-off.
Commit organization
Rebased onto
v0.32.0-dev@1d13fda6, with four core commits and two tail-fix commits:7f1fa922: opt-in MATE FP8 Mega MoE backend and fail-closed support contracts.fbced7cf: MCCL library selection and stream tracking through upstream interfaces.591c6e8e: grouped-collective workaround, workspace teardown, reproducer and platform-path tests.0d81f38e: real multi-rank numerical/graph/lifecycle validation, CI and user documentation.c3913363: load paged BF16 FA3 forward/metadata variants before serving.bbbadbb5: include split-combine variants and document the cold-start budget.The four-commit regroup tree
71be8f09e7725f161ba291e768a18e3f31fb3e2ais byte-identical to pre-regroup9b58f2e0; 216 patch entries remain contiguous. The two inline correctness threads are addressed by the first commit and its regression tests.