Files
sglang/test/registered
laoyao0822 648a33ab30 Remove NSA spec-v2 graph metadata host syncs
NSA spec-v2 draft-extend graph replay was still using host-derived sequence lengths and the draft-decode backend allowlist. That kept NSA on eager draft-extend for spec-v2 and left seq_lens_cpu.max()/list-to-GPU tensor construction on the decode critical path.

This ports the small upstream DSA metadata fixes into the local NSA backend: size the captured graph page table to req_to_token width, use the static captured page-table width for graph replay, split v2 draft-extend from variable-length v1 draft-extend, and decide draft-extend graph support from the prefill-style backend.

Constraint: Current branch does not have the full upstream needs_cpu_seq_lens scheduler/FutureMap infra.

Rejected: Cherry-pick the full DSA fused metadata generation series | too broad and overlaps with local NSA fused metadata-copy code.

Confidence: medium

Scope-risk: moderate

Directive: Do not collapse DRAFT_EXTEND and DRAFT_EXTEND_V2 here; v1 keeps variable accept lengths while v2 must stay graph-static.

Tested: local pytest test/registered/spec/eagle/test_eagle_v2_draft_extend_contract.py -q (19 passed)

Tested: local py_compile on nsa_backend.py, nsa_backend_mtp_precompute.py, eagle_worker_v2.py

Tested: remote g0034 cjy-glm5-new pytest test/registered/spec/eagle/test_eagle_v2_draft_extend_contract.py -q (19 passed)

Tested: remote g0034 cjy-glm5-new py_compile on nsa_backend.py, nsa_backend_mtp_precompute.py, eagle_worker_v2.py

Not-tested: full decode E2E with SGLANG_ENABLE_SPEC_V2=1
2026-06-29 03:16:14 +08:00
..
2026-03-21 17:10:35 +08:00
2026-06-29 03:16:14 +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.