Repository navigation
[Plugin] Import drop_presort_on_error, which fused_moe already uses - #8179
Conversation
`aiter/fused_moe.py` gained `@drop_presort_on_error` on the routed custom op in #8075, but the import block below it lists only `drop_presort_after`. Importing the module therefore raises at decoration time: aiter/fused_moe.py:2824: in <module> @drop_presort_on_error NameError: name 'drop_presort_on_error' is not defined `import aiter` still works -- `aiter/__init__.py` does not import `fused_moe` -- so this surfaces only for callers that reach the module, which includes `tests/test_plugin_routed_ops.py`. That file now fails during collection, so the plugin suite cannot run on main at all. Both names are defined side by side in `aiter/presorted_moe.py`; only one was listed. Verified: `import aiter.fused_moe` succeeds, and `tests/test_plugin_routed_ops.py tests/test_plugin_contracts.py` is 77 passed. black and ruff clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
…n route aiter/fused_moe.py conflicted with three main commits: - #8075 (ee71544) routes fused_moe_ through the kernel plugin interface and decorates the public fused_moe with drop_presort_after instead of drop_presort_on_error. Taken as is. fused_moe_'s _eager_body is now the plugin's routed wrapper, so the eager call that skips the torch.ops dispatch still asks the providers first; the plan cache and scratch sort sit below the route, in the native body. The op test checks that the directly called body is the fused_moe route. - #7135 (ca7cfa1) sizes the config lookup by config_M / config_topk (_config_shape). The plan's recorded get_2stage_cfgs arguments use them, and a call with _config_shape takes no plan, like one with _stage2_override. - #8179 (a6c759b) imports drop_presort_on_error again; taken as is.
Summary
import aiter.fused_moeraises on main. One name is used as a decorator but not imported.What happens
#8075 added
@drop_presort_on_errorto the routed custom op inaiter/fused_moe.py:2824. The import block at line 74 lists onlydrop_presort_after. Both are defined side by side inaiter/presorted_moe.py(lines 220 and 238); only one was listed.import aiterstill works, becauseaiter/__init__.pydoes not importfused_moe. So this surfaces only for callers that reach the module -- which includestests/test_plugin_routed_ops.py. That file fails during collection, so the plugin suite cannot run on main at all.Testing
import aiter.fused_moesucceedspytest tests/test_plugin_routed_ops.py tests/test_plugin_contracts.py-- 77 passed (collection error gone)black --checkcleanruff checkcleanDocumentation
Dependencies
Breaking Changes
None. This only makes an existing decorator resolvable.
🤖 Generated with Claude Code