The CP shared-KV path now has a gated tai-kernel replacement for NSA index K/scale plus MQA range preparation, and Phase8 prefetch can skip tiny prefixes that do not cover all CP lanes. The Phase9 plan documents the next scheduler work for overlapping CP communication with peer-request attention windows. Temporary diagnostic logs added while validating prefetch ownership and fused index prepare routing were removed before committing so the runtime path does not add log-only synchronization, log counters, or shape-reporting overhead. Constraint: Production profiling showed small per-request CPU/GPU overhead from diagnostic logging and sync-prone debug counters. Rejected: Keep fused-index prepare fallback/used logs behind a new env var | it leaves another runtime branch and logging surface for a path that should be benchmarked with profiler evidence instead. Rejected: Keep owned page-count prefetch logs | they require sync-prone tensor reductions and were only useful for one-off diagnosis. Confidence: medium Scope-risk: moderate Directive: Reintroduce CP shared-KV diagnostics only behind explicit debug paths, and avoid .item()/shape-heavy logging in hot prefill paths. Tested: git diff --check for staged sglang-dev changes. Tested: AST parse for environ.py, cp_shared_kv_prefetch.py, cp_shared_kv_runtime.py, nsa_indexer.py, and test_cp_shared_kv_runtime.py. Not-tested: Full unit test suite. Not-tested: Multi-node GLM5 prefill/decode/router runtime after this exact commit.
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.