Files
sglang/test/registered
LuminolT 93e3840578 test(moe): add GLM MegaMoE validation coverage
Add parser coverage for --moe-a2a-backend=megamoe and local unit coverage for MegaMoE gating, GLM fast-path routing, fallback routing, and sidecar weight preservation.

Use monkeypatch-style tests so the forward and weight-layout checks do not require loading GLM 5.2 or importing a real deep_gemm runtime.

Constraint: tests must not stage or depend on local skill/doc artifacts.

Feature-flag: --moe-a2a-backend=megamoe.

Conflict-hotspots: test/registered/unit/server_args/test_server_args.py, test/registered/unit/moe/test_glm_megamoe.py.

Scope-risk: runtime GPU e2e still needs target Blackwell/DeepGEMM environment.

Tested: PYTHONPYCACHEPREFIX=/private/tmp/sglang_pycache python3 -m py_compile test/registered/unit/server_args/test_server_args.py test/registered/unit/moe/test_glm_megamoe.py.

Tested: git diff --check.

Not-tested: PYTHONPATH=python python3 -m pytest test/registered/unit/moe/test_glm_megamoe.py -q; local Python has no pytest.

Not-tested: PYTHONPATH=python python3 -m unittest test.registered.unit.moe.test_glm_megamoe -v; local Python has no torch.

Not-tested: GLM 5.2 MegaMoE GPU e2e; local environment lacks target runtime and hardware.
2026-07-06 10:44:05 +08:00
..
2026-03-21 17:10:35 +08:00
2025-11-26 13:24:39 -08:00

Registered Tests

Tests under this directory are auto-discovered by run_suite.py via CI registration decorators.

Where Should I Put My New Test?

No server / engine launch required

What you're testing Directory Requires
Component logic in isolation (cache, scheduler, config, parser, etc.) unit/<module>/ CPU or GPU
CUDA kernel correctness kernels/ GPU

Server / engine launch required (E2E)

What you're testing Directory Requires
Model inference correctness models/, 4-gpu-models/, 8-gpu-models/ GPU
Feature-specific (OpenAI API, LoRA, speculative, distributed, VLM, etc.) openai_server/, lora/, spec/, distributed/, ... GPU
Benchmarks (performance, accuracy, stress) benchmark/ GPU
Platform-specific amd/, ascend/ Vendor GPU

See unit/README.md for unit test conventions.