Skip to content

refactor: make MUSA registration entry points explicit - #362

Draft
yeahdongcn wants to merge 1 commit into
v0.32.0-devfrom
refactor/musa-registration-entrypoints
Draft

yeahdongcn wants to merge 1 commit into
v0.32.0-devfrom
refactor/musa-registration-entrypoints

Conversation

@yeahdongcn

Copy link
Copy Markdown
Collaborator

@/tmp/tmp.IqPs7cUfSx

@yeahdongcn yeahdongcn left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge verdict: no blocking findings — ready to merge.
Verified at 7fa376a: the 15-module list moved verbatim into registration.py, and no in-tree consumer of the old side effect remains. The PR is still a draft, so marking it ready is the author's call.

Findings: 0 blocking · 3 nit

nit location problem fix
nit docs/vllm_musa/registration.md:7 rows imply disjoint lists, but layers.activation sits in both say a layer that registers ops also joins custom_op_modules.py
nit vllm_musa/model_executor/registration.py:5 comment narrates a future migration, not the current constraint state that import order matters; drop the migration clause
nit tests/test_quant_fp8_oot_source.py:22 init_source now holds registration.py rename it to registration_source
What changed · what I could not verify

Diff map. model_executor/__init__.py drops 15 side-effect imports; the same 15 move to _EXTENSION_MODULES in the new registration.py; _register_ops() calls register_model_executor_extensions() where it used to do import vllm_musa.model_executor; one source test is repointed; a new developer page plus a README link.

Verified at this head (read-only).

  • Module list identity: base 56f8dee vllm_musa/model_executor/__init__.py vs head registration.py → 15 vs 15, order identical, nothing lost or added.
  • No in-tree consumer of the removed side effect: scanned 431 text files of the head tarball for import vllm_musa.model_executor, from vllm_musa.model_executor import, from .model_executor import → one hit, vllm_musa/__init__.py:148, the new explicit import.
  • Load order kept: custom_op_modules.py has no import-time side effect beyond from importlib import import_module, and preload_custom_op_modules() still runs after registration.
  • Packaging: pyproject.toml uses [tool.setuptools.packages.find] include = ["vllm_musa*"], so the new module ships.
  • Changed test: all 7 assertions evaluated against the head sources in memory → PASS.
  • Docs page: linked from docs/vllm_musa/README.md:100; one H1, no heading level jump, no relative link to resolve; a head-tarball scan for mkdocs.y*ml, docusaurus.config.*, nav.yml, .pages, SUMMARY.md returned zero hits, so the README is the only index. Every API the page names exists at head: register_oot (model_executor/layers/layernorm.py:37), register_impl (kernels/musa_ops.py:66), MUSAPlatformBase.import_ir_kernels (platform.py:303, imports vllm_musa.kernels), custom_op_modules.py.
  • Pass 0 pins/flags: these 6 files change no name==version pin and no --flag, so those sweeps are empty by construction, not by omission.
  • gh pr checks 362: deploy skipping, build pass 8s, offline-series pass 1m15s.

Gate: 14/14 hooks passed @ 7fa376a

Not verified. GitHub Actions CI cannot exercise MUSA plugin registration, and this read-only session ran no runtime import probe, so the registration path is unverified on hardware. The refactor is also an intentional API change for any out-of-tree code that imported the bare package for its side effects; I can only prove no such caller inside this repo.

Observed, not raised as findings. _EXTENSION_MODULES has no completeness guard, while CUSTOM_OP_MODULES has test_custom_op_manifest_covers_all_custom_op_modules (tests/test_custom_op_preload.py:43), so a forgotten entry fails silently. The README places the new link at the tail of the _custom_ops.py section rather than under Module Overview.

auto-review round 1/3 · verdict: clean

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant