Files
sglang/test/registered
laoyao0822 ceb5345410 Account decode handoff queues in DP load snapshots
Decode DP dispatch was collapsing onto a few ranks because the controller only randomizes among exact minimum load pairs. The load snapshot undercounted decode handoff work: pending prefill-info requests were absent, and DecodeRequest wrappers in prealloc/transfer queues were skipped because their rid lives on .req.

This makes scheduler load accounting unwrap DecodeRequest items and include pending decode requests, so TOTAL_TOKENS sees queued handoff backlog instead of repeatedly treating busy ranks as empty.

Constraint: Do not mask imbalance with synthetic per-request token penalties; dispatch should be driven by accurate observed load.

Rejected: Add req*4000 or other queue penalties | heuristic, workload-dependent, and hides the accounting bug.

Confidence: medium

Scope-risk: moderate

Directive: Any new decode handoff queue must be included in get_load() or DP routing can regress to stale/min-load collapse.

Tested: Remote cjy-glm5-new: PYTHONPATH=python python -m pytest -q test/registered/unit/observability/test_scheduler_metrics_load.py test/registered/unit/managers/test_prefill_adder.py -> 27 passed.

Not-tested: Fresh decode ETE distribution after service restart.
2026-06-13 02:35:10 +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.