Complete the lever-A hot-path integration behind SGLANG_CP_SHARED_KV_PER_LAYER_TRANSFER: - PerLayerTransferContext: add num_layers + a completion event so finish() waits until ALL layers are processed before wait_batch_transfers (never races ahead of the worker threads and silently drops in-flight layers); times out to FAILURE. - PerLayerTransferManager: has_room (for the swap) + drop (abort/failure drain so outstanding RDMA finishes before pages are reclaimed). - MooncakeKVManager.register_per_layer_transfer: build + register a context before the forward, reusing send()'s exact CP filter (no re-derivation). - transfer_worker: when a room is per-layer-active, wait those transfers (finish) instead of the monolithic send_kvcache -- no double-send; aux/state/completion unchanged. The skip path drops the context on abort/failure. - prefill scheduler: _register_per_layer_transfers(batch) before run_batch, scoped (first impl) to single-forward, no-cached-prefix requests (the notifier transfers forward-written pages; chunked/cached-prefix are HiCache-loaded -> lever B). Unit-tested (25 cases). e2e output-equality + TTFT verification next. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.