Skip to content

[Unified Radix Cache] Complete the tree-core interface boundary - #33580

Merged
merrymercy merged 2 commits into
sgl-project:mainfrom
Jialin:jialino/unified-tree-core-interface-boundary
Aug 5, 2026
Merged

merrymercy merged 2 commits into
sgl-project:mainfrom
Jialin:jialino/unified-tree-core-interface-boundary

Conversation

@Jialin

@Jialin Jialin commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Motivation

UnifiedRadixCache still reaches into Python tree-core implementation details for several operations, which weakens the UnifiedTreeCoreInterface abstraction and makes alternate tree-core implementations harder to integrate and maintain.
This PR completes the applicable OSS interface boundary while preserving existing Python tree-core behavior.

Modifications

  • Add UnifiedTreeCoreInterface methods for retrieving the root handle, reading node-local hash values, and evicting excess Mamba path state.
  • Route Unified Radix Cache and Mamba call sites through those interface methods instead of accessing Python tree-core internals directly.
  • Update the component documentation for the resumable insert flow.
  • Log the selected tree-core implementation during cache initialization.
    The corresponding internal Rust-backend changes are intentionally excluded because that backend has no tracked OSS counterpart.

Accuracy Tests

This is a behavior-preserving interface refactor and does not change model forward computation or expected model outputs.

  • Mamba path-state tests: 7 passed, 5 CUDA-only tests skipped.
  • Unified cache CPU/mock tests: 24 passed.
  • Interface delegation and failure-cleanup smoke test: passed.
  • Broader CPU test run: 994 passed, 1,030 skipped. An additional 56 HiCache storage tests could not run in the local environment because libcrypto.so.3 was unavailable.

Speed Tests and Profiling

Not run. This change only redirects existing cache operations through the tree-core interface and adds a one-time initialization log; it does not modify cache algorithms or model execution.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci.
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ❌ Run #30933545094
Latest PR Test (Extra): ❌ Run #30933544005

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 4, 2026
@Jialin
Jialin marked this pull request as ready for review August 4, 2026 17:22
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@Jialin

Jialin commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

/tag-run-ci-label

@Jialin

Jialin commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci label Aug 4, 2026
@merrymercy
merrymercy merged commit b1bd871 into sgl-project:main Aug 5, 2026
311 of 342 checks passed
@Jialin
Jialin deleted the jialino/unified-tree-core-interface-boundary branch September 2, 2026 19:32
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 run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants