Prefix materialize prefetch has fixed launch and coordination overhead, so tiny cache-hit prefixes should stay on the simpler synchronous path. The default threshold is now expressed as a cached import-time token threshold while the existing page override remains available for workload-specific tuning. Both MLA and index prefix prefetchers use the same page-size-aware threshold, so CP shared-KV prefix prefetch is enabled only when the prefix covers at least one page per CP lane and at least the configured token threshold. Constraint: The default token threshold must be read once to avoid hot-path env lookups Constraint: Existing page threshold override must continue to disable or force the gate Rejected: Hard-code 1024 tokens | tuning needs to be possible without code changes Rejected: Read token threshold on every maybe_create call | unnecessary hot-path env lookup Confidence: medium Scope-risk: narrow Directive: Keep MLA and index prefetch threshold logic shared; do not let their gates diverge Tested: Not rerun per user request; prior py_compile, diff check, and isolated env-cache check had passed before commit Not-tested: full pytest in local environment due missing optional dependencies/kernel import constraints Not-tested: GLM5 E2E throughput after this threshold change
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.