Avoid index prefetch fallback noise when disabled
The missing index prefetcher state is expected when MLA/index prefetch is disabled. Logging it as an index-prefetch fallback made the normal synchronous materialize path look like a failed fast path and created noisy reports. This keeps consume-miss warnings for enabled prefetchers, but suppresses missing-prefetcher warnings when the prefetch feature gate is off. Constraint: Index prefetch is controlled by the same MLA prefetch enable gate in the current pipeline. Rejected: Suppress all index prefetch fallback warnings | consume misses still indicate an enabled prefetch pipeline failed to serve a requested buffer. Confidence: high Scope-risk: narrow Directive: Missing prefetcher is not a fallback when SGLANG_CP_SHARED_KV_ENABLE_MLA_PREFETCH=0; do not re-add warning noise without a separate enable gate. Tested: Local py_compile for nsa_indexer.py and test_cp_shared_kv_runtime.py. Tested: Remote g0034 targeted regression set passed 4 tests: disabled sync materialize no warning, consume miss warning, first-layer no-warning, enabled create-skip warning. Not-tested: Full CUDA ETE run with logs.
This commit is contained in:
@@ -5462,3 +5462,30 @@ Remaining risk:
|
||||
requires higher-level eviction/allocation policy to preserve larger free runs;
|
||||
the allocator now avoids the worst CPU scan cost but cannot create physical
|
||||
contiguity that the free set does not contain.
|
||||
|
||||
### C127 — 2026-06-02 Disabled index prefetch must not emit fallback warnings
|
||||
|
||||
Finding:
|
||||
|
||||
- `CpSharedKVIndexPrefetcher.maybe_create()` correctly returns `None` without a
|
||||
warning when `SGLANG_CP_SHARED_KV_ENABLE_MLA_PREFETCH=0`.
|
||||
- The later synchronous materialization path in `nsa_indexer.py` still logged
|
||||
`[CP_SHARED_KV_FALLBACK][index_prefetch] reason=missing_prefetcher` whenever
|
||||
`forward_batch.cp_shared_kv_index_prefetcher` was `None`.
|
||||
- With MLA/index prefetch disabled, `None` is the expected state, so this warning
|
||||
made normal sync materialize look like a failed fast path and spammed logs.
|
||||
|
||||
Correction:
|
||||
|
||||
- Gate only the `missing_prefetcher` / `current_missing_prefetcher` warnings on
|
||||
`cp_shared_kv_mla_prefetch_enabled()`.
|
||||
- Keep `consume_miss` warnings unchanged: if a prefetcher exists but cannot serve
|
||||
the requested layer/current buffer, that is still a real enabled-prefetch miss.
|
||||
|
||||
Validation:
|
||||
|
||||
- Remote RED/GREEN test added:
|
||||
`test_index_sync_materialize_does_not_warn_when_prefetch_disabled`.
|
||||
- Remote targeted regression set passed (`4 passed`): disabled sync materialize,
|
||||
consume miss warning, first-layer no-warning, and create-skip warning when
|
||||
enabled.
|
||||
|
||||
Reference in New Issue
Block a user