Skip to content

[MemCache] Return only the matched length from match_prefix; read KV indices off the node path - #42923

Merged
hnyls2002 merged 4 commits into
mainfrom
lsyin/match-len
Oct 8, 2026
Merged

hnyls2002 merged 4 commits into
mainfrom
lsyin/match-len

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator
  • MatchResult carries device_prefix_len instead of the concatenated device_indices; radix, unified (Python and Rust tree core), FlexKV, LMCache and session matches no longer concatenate per-node values
  • Probe matches (priority sort, cache-aware policy, in-batch prefix check, admission) were discarding that concatenation; the indices are now read only where needed, through BasePrefixCache.path_device_indices(node) (checkpoint rematch, PD decode prealloc / rematch, LMCache publish / store, buffer-mode ownership check) and prefix_device_indices(req) at allocation
  • Rust binding no longer moves a tensor to Python per match; tree cores expose empty_device_indices for empty placeholders

CI States

Latest PR Test (Base): ❌ Run #37709082763
Latest PR Test (Extra): ❌ Blocked -- run-ci is required first.
Latest PR Test (AMD ROCm 10): ❌ Run #37709082516

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/rerun-test test_radix_cache_unit.py test_unified_cache_linker.py test_unified_radix_cache_unittest.py test_unified_radix_cache_bench.py test_rust_unified_radix_cache_unittest.py test_radix_cache_hit.py test_swa_radix_cache_kl.py test_hicache_variants.py test_hicache_storage_file_backend.py test_disaggregation_decode_offload.py test_disaggregation_decode_radix_cache.py

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🚀 1-gpu-5090 (6 tests): ✅ View workflow run

cd test/ && python3 registered/unit/mem_cache/test_radix_cache_unit.py
cd test/ && python3 registered/unit/mem_cache/test_unified_cache_linker.py
cd test/ && python3 registered/unit/mem_cache/test_unified_radix_cache_unittest.py
cd test/ && python3 registered/unit/mem_cache/test_unified_radix_cache_bench.py
cd test/ && python3 registered/unit/mem_cache/test_rust_unified_radix_cache_unittest.py
cd test/ && python3 registered/radix_cache/test_radix_cache_hit.py

🚀 1-gpu-h100 (2 tests): ✅ View workflow run

cd test/ && python3 registered/radix_cache/test_swa_radix_cache_kl.py
cd test/ && python3 registered/hicache/test_hicache_variants.py

🚀 2-gpu-h100 (2 tests): ❌ View workflow run

cd test/ && python3 registered/hicache/test_hicache_storage_file_backend.py
cd test/ && python3 registered/disaggregation/test_disaggregation_decode_offload.py

🚀 8-gpu-h20 (1 test): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_decode_radix_cache.py

@hnyls2002 hnyls2002 removed the run-ci CI: run the baseline test suite on this PR label Oct 8, 2026
@hnyls2002
hnyls2002 merged commit 5a4d01a into main Oct 8, 2026
100 of 116 checks passed
@hnyls2002
hnyls2002 deleted the lsyin/match-len branch October 8, 2026 08:10
@hnyls2002 hnyls2002 added the release-highlight Candidate PR for release note highlight label Oct 9, 2026
nvpohanh added a commit to weireweire/sglang that referenced this pull request Oct 13, 2026
Resolve the conflict in rust/sglang-radix-tree/src/python_bindings.rs
with the PyO3 0.29 upgrade (sgl-project#42807) and the dynamo_kv_event_format
binding parameter (sgl-project#42455): convert the EvictExcessPathStates action
with into_py_any, keep both dynamo_kv_event_format and
swa_max_states_per_path in TreeCoreInitParamsBinding, and call the
two-argument evict_excess_path_states under py.detach.

sgl-project#42923 replaced MatchResult.device_indices with device_prefix_len, so
the SWA path-cap fixture tests now read device_prefix_len.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation hicache Hierarchical Caching for SGLang release-highlight Candidate PR for release note highlight unified-radix-cache

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants