Skip to content

[Fix] moe: Publish a server config in the CUTLASS runner dispatch-format and placement tests - #45376

Merged
ShangmingCai merged 1 commit into
sgl-project:mainfrom
JackChuang:fix-cutlass-moe-runner-tests-config
Oct 20, 2026
Merged

ShangmingCai merged 1 commit into
sgl-project:mainfrom
JackChuang:fix-cutlass-moe-runner-tests-config

Conversation

@JackChuang

@JackChuang JackChuang commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #43363, merged today: it broke two CPU unit tests on main, and this test-only PR fixes them. Sorry for the breakage.
cc @Fridge003 (merged #43363; added the dispatcher test in #44666) and @Jiminator (added the placement test in #44518).
Ready to run: /rerun-test test/registered/unit/layers/moe/test_flashinfer_dispatcher.py. test_moe_runner_config_placement.py runs only in the Intel CPU suite (stage-b-test-cpu-intel), so /rerun-test on ubuntu-latest skips it.

Summary

  • Fixes two CPU unit tests that fail on main since #43363 merged. Both call the FlashInfer CUTLASS MoE runner directly without publishing server args. #43363 made the runner read the disagg config to size its tuning range, so they now raise ValueError: config namespace 'disagg' not published.
  • Test-only change; no runtime code changes. Each call is wrapped in get_context().override_server_args(model_path="dummy"), the same pattern the neighbouring tests in these files already use.

Motivation

Since #43363, the CUTLASS MoE runner (python/sglang/srt/layers/moe/moe_runner/flashinfer_cutlass.py) reads get_disagg() and the prefill-chunk settings on every call. That PR also updated the tests that existed at its base. Two tests were added on main after that base, and they call the runner without any server args published:

Test Added in CI suite Result on main f8fd41c36e4
test/registered/unit/layers/moe/test_flashinfer_dispatcher.py::TestFlashinferRunnerDispatchFormats::test_cutlass_preserves_prefill_and_decode_combine_formats #44666 base-a-test-cpu error (both subtests)
test/registered/unit/layers/moe/test_moe_runner_config_placement.py::test_sm120_nvfp4_dispatch_uses_live_layer_placement #44518 stage-b-test-cpu-intel fail

Both fail with ValueError: config namespace 'disagg' not published, raised from _cutlass_moe_tune_max_num_tokens. A real server always publishes these configs, so serving is not affected. Only these tests are.

Modifications

  • test_flashinfer_dispatcher.py: add get_context().override_server_args(model_path="dummy") to the existing with (...) block around fused_experts_flashinfer_to_flashinfer_cutlass.
  • test_moe_runner_config_placement.py: wrap the _run_flashinfer_cutlass call in the same context manager. This is the pattern _kernel_placement in the same file uses.

These two tests and #43363's own test_flashinfer_cutlass_swiglu_params.py are the only tests under test/ that call the CUTLASS MoE runner entry points directly.

Accuracy Tests

Not applicable: no runtime code changes.

Speed Tests and Profiling

Not applicable: no runtime code changes.

Tests

Run CPU-only, the way CI runs them (cd test && python3 registered/<file>):

File main f8fd41c36e4 this PR
unit/layers/moe/test_flashinfer_dispatcher.py 2 errors 5 tests OK
unit/layers/moe/test_moe_runner_config_placement.py 1 failed, 5 passed 6 passed
unit/layers/moe/test_flashinfer_cutlass_swiglu_params.py (unchanged) 11 tests OK 11 tests OK

pre-commit run on the two changed files passes.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ⏳ Run #39407165818
Latest PR Test (Extra): ❌ Run #39407165706
Latest PR Test (AMD ROCm 10): ⏳ Run #39407165709

@JackChuang JackChuang changed the title [Test] moe: Publish server args in two CUTLASS MoE runner unit tests [Fix][Test] moe: Publish server args in two CUTLASS MoE runner unit tests Oct 20, 2026
@github-actions

This comment has been minimized.

@JackChuang JackChuang changed the title [Fix][Test] moe: Publish server args in two CUTLASS MoE runner unit tests [Fix] moe: Publish server args in two CUTLASS MoE runner unit tests Oct 20, 2026
@JackChuang JackChuang changed the title [Fix] moe: Publish server args in two CUTLASS MoE runner unit tests [Fix] moe: Publish a server config in the CUTLASS runner dispatch-format and placement tests Oct 20, 2026

@ShangmingCai ShangmingCai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ShangmingCai

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Oct 20, 2026
@ShangmingCai
ShangmingCai merged commit 800e60e into sgl-project:main Oct 20, 2026
180 of 222 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants