Repository navigation
refactor: clarify vLLM-MUSA operator ownership and integration - #359
yeahdongcn wants to merge 20 commits into
Conversation
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Both new pages check out against third_party/PINS and the head tree at 3d68773; the three nits below are accuracy and clarity only. The PR is still a draft, so marking it ready is the author's step.
Findings: 0 blocking · 3 nit
| nit | location | problem | fix |
|---|---|---|---|
| nit | docs/vllm_musa/custom-op-architecture.md:9 |
Marlin is named as a MATE-owned family; MATE ships none | drop Marlin or name the Triton W4A16 path |
| nit | docs/vllm_musa/custom-op-refactor-plan.md:12 |
AC-1's required fields disagree with architecture.md:30-37 | make AC-1 point at the architecture record list |
| nit | docs/vllm_musa/README.md:1 |
neither new page is linked from the directory README | add a short further-reading list |
What changed · evidence · what I checked and did not find
Diff map — two new files, no code: docs/vllm_musa/custom-op-architecture.md (+82: ownership table, required record fields, call path, IR/repository policy, migration order) and docs/vllm_musa/custom-op-refactor-plan.md (+64: goal, AC-1..AC-6, path bounds, sequence, deferred).
Gate: 9/9 hooks passed @ 3d68773
Checks — gh pr checks 359 → "no checks reported on the 'refactor/vllm-oot-op-ownership' branch". The repository's three workflows have path filters that exclude docs/vllm_musa/** (patch-series.yml lines 4-17 list third_party/PINS, vllm_musa/patches/**, tests/**; cookbook-site.yml covers docs/cookbook/** and tools/cookbook-site/**; omni-compat.yml likewise). No CI verdict existed to read, so everything below is static.
Nit 1 evidence (Marlin) — git trees/HEAD?recursive=1 on MooreThreads/MATE, grep -i marlin → 0 lines, while the same listing contains wrappers/FlashInfer, wrappers/DeepGEMM, wrappers/FlashMLA; gh search code --repo MooreThreads/MATE marlin → 0 results against a control flashmla → 13 results, so the index is live for that repo. The same tree grep on vllm-musa @3d68773 → 0. On MUSA the W4A16 path is Triton: vllm_musa/patches/series/0148-MUSA-enable-AWQ-GPTQ-W4A16-via-the-Triton-kernel.patch.
Nit 2 evidence (record fields) — architecture.md:30-37 requires contract+call site, provider+adapter, extension/JIT module, source/build entry, dtype+shape+layout+modes, fallback, minimum package versions, owner+tests. AC-1 requires contract, provider, adapter, registration module, source/build entry, capability, fallback, owner, tests. They differ by registration module (AC-1 only, and AC-2 generates registration from the manifest) and by extension/JIT module plus minimum package versions (architecture only).
Nit 3 evidence (orphan pages) — docs/vllm_musa/README.md at head contains no ]( link at all (grep → no match) and never mentions custom-op; it is the only index in that directory, and docs/ has no root index and the repo no mkdocs nav, so neither page is reachable by navigation.
Verified, not findings — vllm.ir exists at VLLM_COMMIT=5df63a7203cd (vllm/ir/: __init__.py op.py ops tolerances.py util.py), so the IR policy names a real surface. vllm_musa/custom_op_modules.py exists and its docstring is "Modules that must be imported before vLLM loads its AOT compile cache", matching architecture.md:57-59. "vllm-musa v0.32" reads as the release line (v0.32.0-dev branch, VLLM_TAG=v0.32.0; pyproject version = "0.1.32"), so no version finding. vllm_musa/optimization_contract/ resolves model-family optimization features (providers.py, resolver.py), not operator registration, so the proposed manifest does not duplicate it.
Not applicable — no relative links to resolve (grep for ]( and http → no match in either page), no name==version pins and no --flag in the diff, no checkpoint/registry or --served-model-name claim, and the cookbook page skeleton (Prerequisites, Validation, server section) does not apply to architecture/plan pages. Headings: one H1 per page, H2 sections, H3 only under ## Path Boundaries, no level jumps.
auto-review round 1/3 · verdict: clean
yeahdongcn
left a comment
There was a problem hiding this comment.
Reviewed dca6611; the head moved to 563fb93 while this round was running. I read the delta: the musa_router_gemm record below is unchanged there, so the blocker survives the push.
Merge verdict: 1 blocking finding — not ready to merge.
Preload derivation is behaviour-preserving at this head (16 modules, same order, every recorded path resolves), but one record credits MATE with a kernel that lives in vLLM-MUSA.
Gate: pre-commit fails on black: reformatted tests/test_custom_op_preload.py, reformatted vllm_musa/operator_manifest.py.
Findings: 1 blocking · 5 nit
Earlier: round 1 raised 0 blocking · nit-1 unchanged · nit-2 unchanged · nit-3 unchanged
| nit | location | problem | fix |
|---|---|---|---|
| nit | docs/vllm_musa/operator-inventory.md:27 |
csrc/moe/act_and_mul.mu does not exist; real dir is vllm_musa/jit_kernel/csrc/moe/ |
prefix both .mu entries |
| nit | tests/test_custom_op_preload.py:62 |
assertion derives from the same records, so it cannot fail | compare against a literal tuple |
| nit | vllm_musa/operator_manifest.py:70 |
empty source/tests tuple validates clean; AC-1's negative case unmet |
reject empty tuples before the path loop |
What changed · evidence · what I could not verify
Diff map — vllm_musa/operator_manifest.py (new: dataclass, 16 records, preload_modules, validate_records); vllm_musa/custom_op_modules.py (the hardcoded 16-module tuple becomes preload_modules()); tests/test_custom_op_preload.py (+4 tests); .github/workflows/patch-series.yml (two paths: entries x2 and one new step, = the 6 added lines); three new docs pages.
Checks — gh pr checks 359 → offline-series pass 1m32s. The new Check operator integration manifest step runs green, and it agrees with my static checks, so no CI finding.
Behaviour preservation (verified, not assumed) — I replicated the test's AST discovery over the head tarball: exactly 16 modules match direct_register_custom_op, identical set and order to the tuple this PR deletes. So CUSTOM_OP_MODULES content and preload order are unchanged. All 30 recorded source/test paths exist in git/trees at head. operator_manifest.py imports only stdlib, and vllm_musa/__init__.py guards its torch/torchada imports with try/except ImportError, so the import chain works in the torch-free offline-series job — that is why the new step passes without an install.
P1 evidence — gh api raw fetch of musa_router_gemm.py piped to grep -in mate → no match (exit 1); the file defines @triton.jit _router_gate_fp32_kernel (line 143) and calls direct_register_custom_op (line 226). operator-inventory.md:80 defines mate_adapter as "vLLM backend/layer adapter around MATE" and :83-85 says no record may carry it unless MATE provides the implementation. By contrast mm_encoder_attention (imports flash_attn_interface) and deep_gemm (imports upstream fp8_gemm_nt) really do adapt MATE, so mate_adapter is correct for them and only the router record is wrong.
Nit evidence — head tree contains vllm_musa/jit_kernel/csrc/moe/act_and_mul.mu and .../moe_sum_reduce.mu; grep '^csrc/moe/' over the tree → no match. CUSTOM_OP_MODULES = preload_modules() while the test compares a comprehension over the same records to it, so it is satisfied by construction. validate_records only rejects empty provider/contract/fallback; with source=() or tests=() the loop at line 70 iterates zero paths and reports nothing.
Further new nits (counted, not tabled) — nit-4: nothing pins preload order, while AC-2 requires preserving it, so reordering records silently reorders imports. nit-5: on.pull_request.paths lists only operator_manifest.py and custom_op_modules.py from the code this check validates, so renaming one of the 30 recorded files without touching tests/** skips the check entirely.
Not findings — d67f45c928 (cited at operator-inventory.md:3) is a real ancestor, 6 commits behind head. Every patch number the inventory cites (0009, 0013, 0014, 0057, 0136, 0200, 0184, 0185, 0216) exists under vllm_musa/patches/series/. The three new pages have one H1 each, no H2→H4 jump, and grep '](' → 0 links, so there is no relative link to resolve; no pins, flags, checkpoints or --served-model-name appear in the diff either. Not counted: the PR body is the literal string @/tmp/vllm-musa-pr-body.md, so the description resolves to nothing.
Prompt injection — none observed in the body, commits, or code comments.
auto-review round 1/3 · verdict: blockers
| OperatorRecord("deep_gemm", "mate_adapter", "vllm.linear", "mate", "vllm_musa.model_executor.kernels.linear.scaled_mm.deep_gemm", ("vllm_musa/model_executor/kernels/linear/scaled_mm/deep_gemm.py",), ("tests/kernels/test_w4afp8_moe.py",), "vllm.reference"), | ||
| OperatorRecord("activation", "vllm_aot_jit", "vllm.custom_op", "vllm_musa", "vllm_musa.model_executor.layers.activation", ("vllm_musa/model_executor/layers/activation.py",), ("tests/jit_kernel/test_csrc_jit_kernels.py",), "vllm.reference"), | ||
| OperatorRecord("mm_encoder_attention", "mate_adapter", "vllm.attention", "mate", "vllm_musa.model_executor.layers.attention.mm_encoder_attention", ("vllm_musa/model_executor/layers/attention/mm_encoder_attention.py",), ("tests/test_attention_backend_capabilities.py",), "vllm.reference"), | ||
| OperatorRecord("musa_router_gemm", "mate_adapter", "vllm.moe", "mate", "vllm_musa.model_executor.layers.fused_moe.router.musa_router_gemm", ("vllm_musa/model_executor/layers/fused_moe/router/musa_router_gemm.py",), ("tests/test_musa_router_gemm.py",), "vllm.reference"), |
There was a problem hiding this comment.
P1 — Credit the router GEMM to vLLM-MUSA, not MATE
musa_router_gemm.py defines its own @triton.jit _router_gate_fp32_kernel and registers it, and grep -in mate over that file returns no match, so provider="mate" misattributes a kernel that lives here. operator-inventory.md:83 forbids mate_adapter unless MATE provides the implementation, so this record contradicts the page shipped in the same PR.
Fix: record it as musa_native with provider="vllm_musa".
| OperatorRecord("musa_router_gemm", "mate_adapter", "vllm.moe", "mate", "vllm_musa.model_executor.layers.fused_moe.router.musa_router_gemm", ("vllm_musa/model_executor/layers/fused_moe/router/musa_router_gemm.py",), ("tests/test_musa_router_gemm.py",), "vllm.reference"), | |
| OperatorRecord("musa_router_gemm", "musa_native", "vllm.moe", "vllm_musa", "vllm_musa.model_executor.layers.fused_moe.router.musa_router_gemm", ("vllm_musa/model_executor/layers/fused_moe/router/musa_router_gemm.py",), ("tests/test_musa_router_gemm.py",), "vllm.reference"), |
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Round 1's P1 is fixed at aebdd03, which I read after the head moved from 0df3f6b mid-round; offline-series passes there.
Gate: at 0df3f6b pre-commit failed on black: reformatted tests/test_custom_op_preload.py, reformatted vllm_musa/operator_manifest.py; aebdd03 ships both reformatted and green.
Findings: 0 blocking · 3 nit
Earlier: P1-1 fixed @aebdd037 · nit-1, nit-3 fixed · nit-2, nit-4, nit-5 unchanged · round-1 Marlin/AC-1/README nits fixed
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/operator_manifest.py:254 |
registration_module is a patch path; 0076 is no Python identifier |
point at the module the patch adds |
| nit | vllm_musa/operator_manifest.py:26 |
per-record build_sources never applies: the dict covers all 22 names |
drop the field, keep one mapping |
| nit | docs/vllm_musa/operator-inventory.md:34 |
row credits MATE with a router GEMM; only moe_fused_gate is MATE's |
name moe_fused_gate, call the GEMM vLLM-MUSA's |
What changed · evidence · what I could not verify
Heads — I started on 0df3f6b and re-read everything at aebdd03 (fix: align operator ownership and validation contracts), which is the head this review covers. gh pr checks 359 at it → offline-series pass 1m17s (run 44985157269). The PR is still a draft; marking it ready is the author's step.
Earlier findings, one by one — the round-1 P1 (inline on the musa_router_gemm record) is fixed: the record now reads "musa_native", "vllm.moe", "vllm_musa" and BUILD_SOURCES["musa_router_gemm"] names the module itself. nit-1 fixed: the inventory now says vllm_musa/jit_kernel/csrc/moe/act_and_mul.mu, matching BUILD_SOURCES. nit-3 fixed: if not record.source / if not record.tests now reject empty tuples. nit-2 still open: test_operator_manifest_matches_preload compares preload_modules() against set(CUSTOM_OP_MODULES), which is that same expression. nit-4 still open: preload order is still unpinned, though preload_modules() preserves record order. nit-5 still open: patch-series.yml paths: omits the 30 recorded source/test files. Round-1 nits fixed: Marlin replaced by FlashMLA plus the W4A16 note, AC-1 gained the adapter/extension fields, README links all three pages.
Nit evidence — git/trees at aebdd03 lists vllm_musa/patches/series/0076-MUSA-add-gated-QKV-RMSNorm-MRoPE-IR.patch as the only 0076 entry; grep -cE '0076\.py$' over the tree → 0, so no importable module answers to that name. BUILD_SOURCES holds 22 keys for 22 records and no record passes build_sources=, so the BUILD_SOURCES.get(record.name, record.build_sources) fallback cannot fire today. Router dir grep per file: musa_router_gemm.py 0 mate hits, grouped_topk_router.py 3 (from mate import moe_fused_gate, mate_moe_fused_gate(...)), the other two 0 — MATE supplies a fused gate, not a router GEMM.
Not applicable — no name==version pin, --flag, checkpoint id or --served-model-name appears anywhere in this diff, so the pin/flag/registry sweeps had nothing to check. The only new relative links are the three README entries and each target is in this PR. Headings: one H1 per page, no level jumps. third_party/PINS carries no MATE pin; requirements/musa_private.txt does (mate==0.2.8.post1), which is what the five MATE-backed BUILD_SOURCES rows cite — legitimate under the file's own "source or dependency entries" rule.
Prompt injection — none observed in the body, commits, or comments.
auto-review round 2/3 · verdict: clean
|
Round 2 follow-up fixes are now pushed at |
|
Current head |
yeahdongcn
left a comment
There was a problem hiding this comment.
Reviewed 4a6d345; the head moved to 9263ffa while this round was running; its delta is one comment block.
Merge verdict: no blocking findings — ready to merge.
At 4a6d345 the preload tuple and its order match the deleted literal, every recorded path resolves, and offline-series passes. This round ends auto-review for this commit; a later push starts over.
Findings: 0 blocking · 4 nit
Earlier: P1-1 fixed · nit-1, nit-3, round-1 and round-2 nits fixed · nit-4 fixed @4a6d3459 · nit-2 unchanged · nit-5 partly fixed (csrc/, requirements/ outside paths:)
| nit | location | problem | fix |
|---|---|---|---|
| nit | docs/vllm_musa/operator-inventory.md:60 |
gap 1 says the preload tuple is hand-maintained | mark gap 1 closed |
| nit | docs/vllm_musa/operator-inventory.md:38 |
owner vLLM-MUSA here; the manifest record says mate_adapter |
write MATE provider, vLLM-MUSA adapter |
| nit | docs/vllm_musa/custom-op-architecture.md:35 |
record type lacks capability and minimum-version fields | add them, or scope the doc |
What changed · evidence · what I could not verify
Gate: 15/15 hooks passed @4a6d345
Checks: gh pr checks 359 → offline-series pass 1m46s (run 44985515408, head 4a6d345, conclusion success). No other check run exists for that commit.
Diff map — 8 files: vllm_musa/operator_manifest.py (new: dataclass, 22 records, BUILD_SOURCES, preload_modules, validate_records, operator_report); vllm_musa/custom_op_modules.py (16-entry literal → preload_modules()); tests/test_custom_op_preload.py (five new tests, EXPECTED_PRELOAD_MODULES); .github/workflows/patch-series.yml (vllm_musa/** in both paths: blocks, one new pytest step); three new pages; three README links.
Behaviour preservation (verified, not assumed) — custom_op_modules.py:5-7 is from .operator_manifest import preload_modules then CUSTOM_OP_MODULES = preload_modules(); the 16 preload=True records occur in exactly the deleted tuple's order (custom_all_reduce, fused_allreduce_rmsnorm, fp8_block_gemv, moe, norm, quant, rope, sqrtsoftplus_topk, topk, gdn_fused_proj, layernorm_gated, qwen3_qk_rope_kv, deep_gemm, activation, mm_encoder_attention, musa_router_gemm). test_custom_op_manifest_preserves_preload_order pins that literal to the value, and the green offline-series run executes tests/test_custom_op_preload.py through the new "Check operator integration manifest" step. operator_manifest.py imports only collections.abc, dataclasses, pathlib, so the torch-free job can import it.
Paths — every source, tests and BUILD_SOURCES entry is checked by validate_records inside the green CI step. Independently, I resolved every test file, backend module and patch number the inventory names in git/trees/4a6d345?recursive=1: 0009, 0013, 0014, 0057, 0076, 0136, 0184, 0185, 0200, 0216 all exist, as do tests/test_moe_fused_shared_topk_router.py, tests/test_musa_router_gemm.py and the rest. vllm.ir.ops.gated_qkv is real after the series: patch 0076 creates vllm/ir/ops/gated_qkv.py, and upstream vllm/ir/ops/ at VLLM_COMMIT=5df63a7203cd holds only __init__.py, activation.py, layernorm.py. operator-inventory.md:3 cites d67f45c928, an ancestor 12 commits back.
Nit evidence — (1) operator-inventory.md:60-61 reads "CUSTOM_OP_MODULES is a hand-maintained preload tuple, not generated from operator records", while custom_op_modules.py:7 is CUSTOM_OP_MODULES = preload_modules(). (2) operator-inventory.md:38 lists Multimodal encoder attention as provider "MUSA custom op", owner "vLLM-MUSA"; operator_manifest.py:173-177 records the same module as "mate_adapter", provider "mate". The wrapper calls vllm_musa.v1.attention.backends.fa_utils.flash_attn_varlen_func and fa_utils.py:14 wraps flash_attn_interface, so the manifest is right and the row is the text to fix. (3) custom-op-architecture.md:35-37 requires "supported dtype, shape, layout, eager, compile, and CUDA graph modes" and "minimum package versions"; OperatorRecord (operator_manifest.py:16-26) has only name, category, contract, provider, registration_module, source, tests, fallback, preload, and validate_records checks none of the missing items, so AC-1's "no missing required fields" cannot fail today.
nit-6 (not tabled) — musa_ops_library points tests at tests/test_musa_jit_custom_all_reduce_graph.py, which importorskips vllm_musa.distributed.device_communicators.musa_jit_custom_all_reduce; vllm_ir_gated_qkv points at tests/test_manifest.py, whose docstring is "the MDM manifest (manifest.py) + build_apply apply_phase". Neither exercises the recorded operator, so the field proves a file exists, not a test.
Not findings — mm_encoder_attention is not a repeat of the round-1 P1: it adapts MATE's FA instead of implementing a kernel. mate_adapter for deep_gemm matches the deep-gemm wheel pinned in requirements/musa_private.txt; sparse_mla_mate.py:6 imports mate.sparse_mla.... No name==version pin, --flag, checkpoint id or --served-model-name appears in this diff, so those sweeps had nothing to check. Docs: one H1 per page, no heading-level jumps, and the only relative links are the README's three entries, whose targets are files in this PR.
Not verified — no MUSA hardware, build or serving run; everything above is static plus the two green repository gates. The PR is still a draft, so marking it ready is the author's step.
auto-review round 1/3 · verdict: clean
yeahdongcn
left a comment
There was a problem hiding this comment.
Reviewed 2e11f48; the head moved to 9d2a26b while this round was running.
Merge verdict: no blocking findings — ready to merge.
The earlier inline P1 is fixed at 2e11f48, the new diagnostics CLI and its CI step work, and offline-series passes at this sha, so a human can merge. This round ends auto-review for 2e11f48; a later push starts a fresh cycle.
Findings: 0 blocking · 2 nit
Earlier: P1-1 fixed @2e11f484 · nit operator-inventory.md:60 unchanged · nit :38 unchanged · nit custom-op-architecture.md:35 unchanged · nit tautological preload test unchanged · nit paths: omits recorded sources unchanged
| nit | location | problem | fix |
|---|---|---|---|
| nit | .github/workflows/patch-series.yml:5 |
tools/operator_manifest.py is in neither paths: list, so editing the checker skips its own gate |
add it beside tools/musa_sync.py |
What changed · evidence · earlier findings · what I could not verify
Gate: 15/15 hooks passed @2e11f484
Checks: gh pr checks 359 → offline-series pass 1m24s. Run 44986307809 is head_sha=2e11f484…, conclusion=success; inside it, step 6 Check operator integration manifest and step 7 Report operator integration manifest are both success, and so are the replay/verify steps (10-13).
Delta since the last review (9263ffa): compare/9263ffaa1305...2e11f484ce7d → tools/operator_manifest.py +40, tests/test_custom_op_preload.py +18, .github/workflows/patch-series.yml +2, custom-op-refactor-plan.md +1/-1. The rest of the head is unchanged from what the previous round read.
Earlier P1 (inline, router GEMM credited to MATE) — fixed. operator_manifest.py:183-192 now records musa_native / vllm_musa; grep -cin mate over .../fused_moe/router/musa_router_gemm.py → 0; the file still owns @triton.jit (l.142) and direct_register_custom_op (l.226).
Behaviour preservation. custom_op_modules.py:7 is CUSTOM_OP_MODULES = preload_modules(); tests/test_custom_op_preload.py:77-78 pins the 16-module tuple and :64-70 asserts it equals the AST-discovered registrations. Step 6 runs that file green at this sha, so both directions are CI-checked rather than only read. vllm_musa/__init__.py:148-150 is the only production reader, and _register_ops imports jit_kernel.csrc.moe before preloading exactly as before.
Nit-1 trigger. The new step at patch-series.yml:56 executes tools/operator_manifest.py, yet lines 6-15 and 21-30 list tools/musa_sync.py and tools/patch_metadata.py and not this file, so a PR touching only the checker runs no workflow.
Nit-2 (not tabled) operator_manifest.py:366-369. all(...) is True for an empty tuple, so --json can print "source_present": true beside validate_records:332-335's "at least one source path is required" for the same record. Fix: bool(record.source) and all(...).
Earlier nits, verified by reading this head. Still open: operator-inventory.md:60-61 still calls CUSTOM_OP_MODULES "a hand-maintained preload tuple"; :38 gives multimodal encoder attention provider "MUSA custom op"/owner "vLLM-MUSA" while operator_manifest.py:173-181 records mate_adapter/mate (the manifest direction is right: mm_encoder_attention.py has 0 mate hits and calls fa_utils.flash_attn_varlen_func, and fa_utils.py:14 imports flash_attn_interface); custom-op-architecture.md:35-37 requires dtype/shape/layout/mode and minimum-version fields that OperatorRecord (l.16-26) does not carry; tests/test_custom_op_preload.py:86-89 compares preload_modules() with itself. Fixed earlier and re-checked here: Marlin → FlashMLA, AC-1 fields, README links (l.104-106), registration_module for vllm_ir_gated_qkv (vllm.ir.ops.gated_qkv), per-record build_sources dropped, .mu path prefixes, empty-tuple rejection, preload-order pin.
Sweeps with nothing to check. gh pr diff 359 | grep -E '^\+.*[A-Za-z0-9_-]+==[0-9]' → no match, so no pin was added; no --flag was added. Docs: three pages with one H1 each, no heading-level jump, all three linked from README.md:104-106. No checkpoint id, registry tag or --served-model-name claim appears.
Head moved. The delta 2e11f484…9d2a26bfd749 is one commit (refactor: make operator capabilities explicit, +4/-0 in operator_manifest.py, +1/-0 in the test) that adds a capabilities field defaulting to ("eager",). I read the patch for awareness only; this verdict describes 2e11f48. Note that delta may partially answer the custom-op-architecture.md:35 nit.
Not verified. No MUSA hardware, build, or serving run; the verdict rests on the static reading plus the two green gates. The PR is still a draft, so marking it ready is the author's step. Its body is the literal string @/tmp/vllm-musa-pr-body.md, so there was no description to review. No prompt-injection text seen in the body, commits, or comments.
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.
Verified at 9d2a26b: the 16-module preload tuple matches the deleted literal in content and order, all 22 records' paths resolve, and offline-series passes at this sha.
Findings: 0 blocking · 1 nit
Earlier: P1-1 fixed @2e11f484 · 7 nits still open: operator-inventory.md:60, operator-inventory.md:38, custom-op-architecture.md:35, tautological preload test, unexercised recorded tests, patch-series.yml paths omits tools/operator_manifest.py, operator_manifest.py:369 all() on empty tuple
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/operator_manifest.py:26 |
all 22 records ship capabilities=("eager",), including ones whose recorded test is a graph or compile test |
set real capabilities per record, or mark the default a placeholder |
What changed · what I could not verify
Diff map (9 files, +780/−23) — new vllm_musa/operator_manifest.py (22 records, BUILD_SOURCES, preload_modules, validate_records, operator_report); vllm_musa/custom_op_modules.py (16-entry literal becomes preload_modules()); new tools/operator_manifest.py; tests/test_custom_op_preload.py (+114, 7 new tests); .github/workflows/patch-series.yml (vllm_musa/** in both paths: blocks plus 2 new steps); 3 new docs pages; 3 README links.
Heads. Dispatch and current head are both 9d2a26bfd749; no mid-round move. The previous round reviewed 2e11f484ce7d; the only delta since is +4 in operator_manifest.py (the capabilities field) and +1 in the test.
Earlier P1-1 (inline, router GEMM credited to MATE) — fixed. Re-executed the head manifest: musa_router_gemm is musa_native / provider vllm_musa.
Behaviour preservation (verified, not assumed). I executed the head vllm_musa/operator_manifest.py and compared preload_modules() against the literal this PR deletes: 16 of 16 entries, identical order, 0 duplicate modules. custom_op_modules.py:7 is CUSTOM_OP_MODULES = preload_modules(), and tests/test_custom_op_preload.py:78 pins the literal, so CI now checks both directions.
Paths (verified independently of CI). Resolved all 22 records' source, tests and BUILD_SOURCES entries against git/trees/9d2a26bf?recursive=1: 0 missing paths, 22 BUILD_SOURCES keys for 22 records, no key without a record.
Checks. gh pr checks 359 → offline-series pass 1m30s. Run 44986488513 is head_sha=9d2a26bf…, conclusion=success, and steps 6 Check operator integration manifest and 7 Report operator integration manifest are both success. Gate: 15/15 hooks passed @9d2a26bfd749.
Nit-1 evidence (new this round). operator_manifest.py:26 defaults capabilities to ("eager",) and no record overrides it; the executed table yields exactly one capability set, ('eager',). Two records contradict their own test pointers: custom_all_reduce → tests/test_musa_jit_custom_all_reduce_graph.py:66 sets cudagraph_mode="FULL_DECODE_ONLY", and fused_allreduce_rmsnorm → tests/test_fused_add_rms_norm_compile.py:33 calls torch.compile(...). It also makes tests/test_custom_op_preload.py:161's all(row["capabilities"]) vacuous.
Earlier nits, status at this head. Unchanged: operator-inventory.md:60-61 still calls CUSTOM_OP_MODULES "a hand-maintained preload tuple" while custom_op_modules.py:7 generates it; operator-inventory.md:38 gives multimodal encoder attention provider "MUSA custom op"/owner "vLLM-MUSA" while the manifest records mate_adapter/mate; custom-op-architecture.md:35-37 requires dtype/shape/layout/mode, minimum-package-version and adapter fields that OperatorRecord (l.16-27) does not carry; tests/test_custom_op_preload.py:86-89 compares preload_modules() with itself; .github/workflows/patch-series.yml:6-9 lists tools/musa_sync.py and tools/patch_metadata.py but not tools/operator_manifest.py, whose checker step this PR adds, and no requirements/ or recorded csrc/ source is covered; operator_manifest.py:369-371's all() reports source_present: true for an empty tuple; the recorded tests for musa_ops_library (tests/test_musa_jit_custom_all_reduce_graph.py) and vllm_ir_gated_qkv (tests/test_manifest.py, docstring "the MDM manifest (manifest.py) + build_apply apply_phase", 0 gated_qkv hits) do not exercise those operators. Fixed earlier and re-checked: Marlin → FlashMLA, AC-1 fields, README links, .mu path prefixes, per-record build_sources dropped, registration_module for vllm_ir_gated_qkv, empty-tuple rejection, preload-order pin, operator-inventory.md:34 router credit.
Docs sweep. Three new pages: one H1 each, H2/H3 nesting with no level jump, all three linked from docs/vllm_musa/README.md:104-106, and the only relative links in the diff are those three, whose targets are files in this PR. The cookbook page skeleton (Prerequisites/Validation/server) does not apply to architecture or plan pages.
Pins and flags. No name==version line and no CLI flag is added (grep over added lines: none; the only --json is an argparse flag in the new tool), so the pin/flag sweeps had nothing to check. No checkpoint id, registry tag or --served-model-name appears in these pages. requirements/musa_private.txt at head pins mate==0.2.8.post1, deep-gemm==0.2.8.post1+musa, flashinfer-python==0.2.8.post1+musa, which is what the 4 MATE-backed BUILD_SOURCES rows cite.
Packaging. pyproject.toml:63 is include = ["vllm_musa*"], so the new module ships; it imports only collections.abc, dataclasses, pathlib and requires-python is ==3.12.*, so the torch-free job and the package import path both work — step 6 passing confirms it.
Not verified. No MUSA hardware, build or serving run exists, and none is needed here: the only runtime-touching change is the preload tuple, which I executed and found identical to the deleted literal. The PR is still a draft, so marking it ready is the author's step. Its body is the literal string @/tmp/vllm-musa-pr-body.md, so there was no description to review. No prompt-injection text in the body, commits, comments, or code comments.
auto-review round 1/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 a0cd32a, which supersedes the dispatch head cb0e258; the delta is one docs file. Preload content and order match the deleted literal, all 22 records resolve, and offline-series passes at this sha.
Gate: pre-commit @ ad4f22a: 13/15 hooks; isort (Fixing …/tests/test_custom_op_preload.py) and black (reformatted tests/test_custom_op_preload.py) both fail.
Findings: 0 blocking · 2 nit
Earlier: P1-1 fixed @aebdd037 · 8 earlier nits unchanged (details)
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/operator_manifest.py:333 |
provenance check skips non-vllm_musa. modules, so vllm.ir.ops.gated_qkv is never validated |
resolve patch-created modules or record provenance |
| nit | vllm_musa/operator_manifest.py:27 |
preload=True default silently preloads any future record |
default to preload=False and opt in |
What changed · evidence · earlier findings · what I could not verify
Heads. Dispatch hint cb0e258; current head a0cd32a (docs: include bidirectional registration validation). The delta is docs/vllm_musa/custom-op-refactor-plan.md +7/−6; I read the whole diff at both heads. The PR is still a draft, and its body is the literal string @/tmp/vllm-musa-pr-body.md, so there was no description to review.
Behaviour preservation (verified, not assumed). I executed the head vllm_musa/operator_manifest.py in memory: 22 records, preload_modules() returns 16 modules in exactly the order of the literal this PR deletes, no duplicates. custom_op_modules.py:7 is CUSTOM_OP_MODULES = preload_modules(), tests/test_custom_op_preload.py:78 pins that literal, and vllm_musa/__init__.py:148-150 is the only production reader.
Paths. Every source, tests, BUILD_SOURCES and vllm_musa.* registration-module path in the manifest resolves against git/trees/a0cd32a3?recursive=1; only the alternative __init__.py candidates are absent, which any() tolerates. So validate_records returns [].
Checks. gh pr checks 359 → offline-series pass 1m27s, run 45013221883, head_sha=a0cd32a380fe…, conclusion=success, with steps 6 Check operator integration manifest and 7 Report operator integration manifest both success. Run 45013176559 at cb0e258 is also success. No MUSA hardware, build or serving run exists, and none is claimed.
Earlier P1-1 (inline, router GEMM credited to MATE) — fixed. operator_manifest.py:184-193 now records musa_native / vllm_musa.
Earlier nits, unchanged at this head. (1) operator-inventory.md:60-61 still calls CUSTOM_OP_MODULES "a hand-maintained preload tuple" while custom_op_modules.py:7 generates it. (2) operator-inventory.md:38 gives multimodal encoder attention provider "MUSA custom op"/owner "vLLM-MUSA" while operator_manifest.py:174-183 records mate_adapter/mate. (3) custom-op-architecture.md:35-37 requires dtype/shape/layout/mode and minimum-version fields that OperatorRecord (16-27) does not carry. (4) tests/test_custom_op_preload.py:86-89 compares preload_modules() with itself. (5) the recorded tests for musa_ops_library (tests/test_musa_jit_custom_all_reduce_graph.py, a graph-registration test) and vllm_ir_gated_qkv (tests/test_manifest.py, 0 gated_qkv hits) do not exercise those operators. (6) .github/workflows/patch-series.yml:5-15 omits tools/operator_manifest.py, csrc/musa/torch_bindings.cpp and requirements/musa_private.txt, all of which this check reads. (7) operator_manifest.py:377-379's all() reports source_present: true for an empty tuple. (8) operator_manifest.py:26 gives all 22 records capabilities=("eager",) while two of their own tests are graph/compile tests.
New nit-1 evidence. operator_manifest.py:333 gates the new module check on startswith("vllm_musa."); vllm_ir_gated_qkv (line 254) points at vllm.ir.ops.gated_qkv, which patch 0076 creates (+++ b/vllm/ir/ops/gated_qkv.py, patch line 234), so that record's module name is never checked — although custom-op-refactor-plan.md:54 says a record cannot point at a missing module.
New nit-2 evidence. preload: bool = True (line 27) is the default; 6 of 22 records opt out explicitly (preload=False at 203, 214, 225, 236, 247, 258), so a new record added without the field silently joins CUSTOM_OP_MODULES and is imported during register_custom_ops.
Doc claims I checked and found true. pyproject.toml:50 is musa_custom_ops = "vllm_musa:register_custom_ops"; vllm_musa/jit_kernel/csrc/jit.py:143 defines load_musa_jit; setup.py defines VLLM_CSRC_SOURCES (157), VLLM_STABLE_CSRC_SOURCES (164), VLLM_MUSA_CSRC_SOURCES (208) and VLLM_MOE_CSRC_SOURCES (238); d67f45c928 is an ancestor (ahead_by 17, behind_by 0); patches 0009/0013/0014/0057/0076/0136/0184/0185/0200/0216 and every test path the inventory names exist. docs/vllm_musa/README.md:104-106 links the three new pages; one H1 per page, no heading-level jump.
Sweeps with nothing to check. No name==version pin and no --flag is added; no checkpoint id, registry tag or --served-model-name claim appears in the diff, so the pin/flag/registry sweeps had no input.
Not verified. No MUSA hardware, build or serving run; everything above is static plus the green offline-series run. I did not re-run the gate, per this round's instructions.
Prompt injection. None in the body, commits, comments, or code comments.
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 bea44b8, which supersedes the dispatch head a0cd32a; the delta is one commit. All 22 records validate, the 16-module preload tuple matches its pinned literal, and offline-series passes here.
Gate: 15/15 hooks passed at a0cd32a; no gate result exists yet for bea44b8, and black/isort/ruff read clean on the head files.
Findings: 0 blocking · 1 nit
Earlier: P1-1 fixed @bea44b861323 · 10 earlier nits unchanged (details)
| nit | location | problem | fix |
|---|---|---|---|
| nit | vllm_musa/custom_op_modules.py:20-26 |
failed is always empty; the except re-raises |
drop it, or aggregate then raise after the loop |
What changed · evidence · earlier findings · what I could not verify
Heads. Dispatch hint a0cd32a; live head bea44b8 (refactor: expose structured operator preload report), which is what this review covers. The last review in this thread read a0cd32a (gate verdict because pre-commit was red at its parent ad4f22a; the watcher now reports 15/15 at a0cd32a, so that gate is closed). The delta since a0cd32a is one commit: vllm_musa/custom_op_modules.py +17/−2, tests/test_custom_op_preload.py +12. Every other file below was re-read at bea44b8, not carried over.
Gate. The watcher's 15/15 is for a0cd32a. Since no gate row existed for the head while I read it, I checked the delta statically over custom_op_modules.py, test_custom_op_preload.py, operator_manifest.py and tools/operator_manifest.py: python3 -m black --check --diff - (24.10.0) → unchanged; python3 -m isort --check-only --diff --profile black --line-length 88 - (5.13.2) → no output; python3 -m ruff check --select E,F,W,I,UP --ignore E501 - (0.14.10) → all checks passed. The pre-commit pins are newer (black 26.1.0, isort 7.0.0, ruff 0.15.1), so this is weaker than the gate itself.
Checks. gh pr checks 359 → offline-series pass 1m32s, run 45013985804, whose head_sha is bea44b8 and whose conclusion is success. Inside it, step 6 Check operator integration manifest, step 7 Report operator integration manifest, and steps 5/8-13 also success. So the new test in this commit ran green in CI. My first query of the round returned "no checks reported" while that run was still in progress; it completed green before this post.
Behaviour preservation (executed, not assumed). I loaded the head vllm_musa/operator_manifest.py in memory and ran its own validate_records against the bea44b8 tree (730 blobs): validate errors: [], 22 records, 16 preload modules, 0 duplicates, BUILD_SOURCES keys exactly equal to the 22 record names. preload_modules() equals EXPECTED_PRELOAD_MODULES exactly, in order. This commit changes neither the record table nor preload_modules().
New test. test_preload_report_is_compatible_and_structured patches module.CUSTOM_OP_MODULES and module.import_module; preload_custom_op_modules() resolves both through module globals, so the patch takes effect and the assertion holds. CI step 6 passing at this sha is the evidence, not my reading.
New nit evidence. custom_op_modules.py:20-26 appends the failing module to failed and then raises, so every PreloadReport ever returned has failed == (). The only caller, vllm_musa/__init__.py:150, discards the return value, and no test covers the except branch. AC-2's negative case (custom-op-refactor-plan.md:17-18, "reports a structured skip or fallback instead of an import traceback") is still a traceback.
Earlier P1-1 (inline, router GEMM credited to MATE) — fixed at this head. operator_manifest.py:184-193 is musa_native / vllm_musa, and grep -cin mate over vllm_musa/model_executor/layers/fused_moe/router/musa_router_gemm.py at bea44b8 → 0.
Earlier nits, all still true at this head, none re-tabled. (1) operator-inventory.md:60-61 still calls CUSTOM_OP_MODULES "a hand-maintained preload tuple" while custom_op_modules.py:8 generates it. (2) operator-inventory.md:38 gives multimodal encoder attention provider "MUSA custom op"/owner "vLLM-MUSA", while operator_manifest.py:174-183 records mate_adapter/mate; the manifest direction is the correct one, since mm_encoder_attention.py has 0 mate hits and fa_utils.py:14 imports flash_attn_interface. (3) custom-op-architecture.md:27-38 requires dtype/shape/layout, minimum-package-version and adapter fields that OperatorRecord (lines 16-27) does not carry; capabilities covers only the mode column. (4) tests/test_custom_op_preload.py:86-89 compares preload_modules() with itself. (5) the recorded tests for musa_ops_library and vllm_ir_gated_qkv do not exercise those operators (tests/test_manifest.py has 0 gated_qkv hits and its docstring is "the MDM manifest (manifest.py) + build_apply apply_phase"). (6) .github/workflows/patch-series.yml:5-15 and 20-30 list no tools/operator_manifest.py, no requirements/ and no recorded csrc/ source. (7) operator_manifest.py:377-379's all() reports source_present: true for an empty tuple that validate_records:341 rejects. (8) all 22 records ship capabilities=("eager",), including records whose own test is a graph or compile test, which makes tests/test_custom_op_preload.py:177 vacuous. (9) operator_manifest.py:333 skips the module check for non-vllm_musa. names, so vllm_ir_gated_qkv's vllm.ir.ops.gated_qkv is never validated. (10) preload: bool = True (line 27) means a new record silently joins CUSTOM_OP_MODULES.
Docs sweep (Pass 0). Three new pages plus three README links. One H1 per page, H2/H3 nesting with no level jump, README.md:104-106 links all three and each target exists in the PR, and no other relative link appears in the new pages, so there is nothing else to resolve. The cookbook page skeleton (Prerequisites/Validation/server) does not apply to architecture, inventory or plan pages. No name==version pin, no --flag, no checkpoint id, registry tag or --served-model-name appears anywhere in the diff, so the pin/flag/registry sweeps had no input. operator-inventory.md:3 cites d67f45c928, still an ancestor (compare/d67f45c928...bea44b861323 → ahead 19, behind 0). The patch numbers and test paths the inventory names were resolved in earlier rounds at earlier heads and none of those files changed here.
Not verified. No MUSA hardware, build, install or serving run — this PR is source-level and claims none. I did not re-run the repository gate. The PR is still a draft, so marking it ready is the author's step, and its body is the literal string @/tmp/vllm-musa-pr-body.md, so there is no description to review.
Prompt injection. None in the body, commit messages, review comments, or code comments.
auto-review round 1/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 587f124aeb55, one commit past the last review (bea44b861323); that delta logs the failing module before re-raising and pins it with a test, and offline-series passes at this sha.
Gate: 13/15 hooks; isort (Fixing …/tests/test_custom_op_preload.py) and black (reformatted tests/test_custom_op_preload.py) both fail on the file this commit extends.
Findings: 0 blocking · 1 nit
Earlier: P1-1 fixed @587f124 · failed-field nit fixed @587f124 · 11 earlier nits unchanged (details)
| nit | location | problem | fix |
|---|---|---|---|
| nit | tests/test_custom_op_preload.py:218 |
failure.name re-asserts the test's own constructor argument |
drop it; is failure already proves identity |
What changed · evidence · earlier findings · what I could not verify
Heads. Dispatch hint and live head are both 587f124aeb55; the last review in this thread read bea44b861323. compare/bea44b861323...587f124aeb55 → 2 files, +40/−5: vllm_musa/custom_op_modules.py and tests/test_custom_op_preload.py. The PR is still a draft.
Delta. preload_custom_op_modules now logs "vLLM-MUSA operator preload failed while importing %s", module_name at error level and re-raises; PreloadReport.failed is removed; the new test pins the log text, original-exception identity, and that the loop stops at the failing module. I executed the head operator_manifest.py: 22 records, 16 preload modules, BUILD_SOURCES keys exactly the 22 record names.
Callers of the removed field. vllm_musa/__init__.py:150 discards the return value, tools/operator_manifest.py:29 calls preload_modules directly, and grepping the head tree for PreloadReport/report.failed (tests, tools, docs included) finds no other reader, so the removal breaks nothing.
Checks. gh pr checks 359 → offline-series pass 1m36s. Run 45093601376 is head_sha=587f124aeb55, conclusion=success, and step 6 Check operator integration manifest — which runs python -m pytest -q tests/test_custom_op_preload.py — is success, so the new test is CI-green, not only read by me.
Earlier P1 (inline, router GEMM credited to MATE) — fixed. Executed the head manifest: musa_router_gemm is musa_native / vllm_musa; grep -cin mate over vllm_musa/model_executor/layers/fused_moe/router/musa_router_gemm.py → 0.
The failed-field nit from the last review — fixed by this delta: the field is deleted instead of staying permanently empty.
Earlier nits still open at this head (verified here; none re-tabled): (1) operator-inventory.md:60-61 still calls CUSTOM_OP_MODULES "a hand-maintained preload tuple" while custom_op_modules.py:10 generates it. (2) operator-inventory.md:38 gives multimodal encoder attention provider "MUSA custom op"/owner "vLLM-MUSA" while the manifest records mate_adapter/mate. (3) custom-op-architecture.md:35-37 requires dtype/shape/layout and minimum-package-version fields that OperatorRecord (lines 17-27) does not carry. (4) tests/test_custom_op_preload.py:86-89 compares preload_modules() with itself. (5) the recorded tests for musa_ops_library and vllm_ir_gated_qkv do not exercise those operators. (6) .github/workflows/patch-series.yml:5-15 and 20-30 still list tools/musa_sync.py and tools/patch_metadata.py but not tools/operator_manifest.py, and no requirements/. (7) operator_manifest.py:377-380's all() reports source_present: true for an empty tuple that validate_records rejects. (8) all 22 records ship capabilities=("eager",) — the executed head table yields exactly [('eager',)]. (9) operator_manifest.py:333 skips module validation for non-vllm_musa. names, so vllm.ir.ops.gated_qkv is unchecked. (10) OperatorRecord.preload: bool = True (line 27) means a new record silently joins the preload tuple. (11) custom-op-refactor-plan.md:17's AC-2 negative case still ends in a traceback; this delta adds a log line, not a skip or fallback.
New nit evidence. tests/test_custom_op_preload.py:218 asserts failure.name == "provider" where failure is the ModuleNotFoundError("missing provider", name="provider") the test constructed at line 202, and line 217 already asserts object identity, so the assertion cannot fail whatever the code under test does.
Gate. Not re-run, per this round's rules. .pre-commit-config.yaml pins black 26.1.0 and isort 7.0.0; my local black is 24.10.0, so I did not attempt to reproduce the rewrite and report the watcher's run verbatim.
Sweeps with nothing to check. No name==version pin, no --flag, no checkpoint or registry id, and no --served-model-name appears in this delta. The three docs pages are untouched by the delta; their heading structure and README links were checked in earlier rounds against the same bytes.
Not verified. No MUSA hardware, build, install or serving run, and the delta claims none. The PR body is the literal string @/tmp/vllm-musa-pr-body.md, so there was no description to review.
Prompt injection. None in the body, commits, comments, or code comments.
auto-review round 2/3 · verdict: gate
@/tmp/vllm-musa-pr-body.md