Repository navigation
[KVCR 4/5] Add request-scoped linker hooks and owned inventory - #45648
Closed
ziqifan617 wants to merge 5 commits into
Closed
ziqifan617 wants to merge 5 commits into
ziqifan617 wants to merge 5 commits into
Conversation
…points Signed-off-by: Ziqi Fan <ziqif@nvidia.com>
… offsets Signed-off-by: Ziqi Fan <ziqif@nvidia.com>
Port the generic parts of Moein and Lin linker work to the current request-private loading lifecycle. Keep GPU and storage inventory ownership separate, preserve event namespaces after eviction, and confirm sparse prefix boundaries without early tree publication. This slice adds no KVCR runtime or backend. Co-authored-by: Moein Khazraee <moein@nvidia.com> Co-authored-by: Lin Hu <linhu@nvidia.com>
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack and review base
Depends on #45646. Logical base:
ziqifan617/kvcr-shared-foundationate17419bd4a3e8d6783202359fe6eab1ad41d2183.GitHub base is
main, so Files changed is cumulative until ancestors land. Upstream cannot target a base branch in the contributor fork. Review this slice using the exact incremental comparison: ziqifan617/sglang@e17419b...a2f9da8Do not merge before the parent. Rebase/revalidate after it lands. HiCache and linker are independent sibling modes.
Motivation
Provide generic request-lifetime and inventory hooks for an optional KVCR direct linker while preserving current SGLang request-private load safety.
Modifications
Includes attributed Moein/Lin work and its adaptation to newer request-private loading. The old early-tree-publication behavior is not restored.
Integration
The direct-device backend is a child. Dynamo ai-dynamo/dynamo#16827 provides the external state-agent bridge for opt-in TP1 aggregated linker workers. It does not enable the same bridge for HiCache or qualify TP>1/PD.
Accuracy Tests
Recorded CPU checks: 90 wrapper cases and 24 event cases passed; the initial CPU run skipped 20 CUDA-dependent cases. A subsequent matching Linux production/inspection native build ran all 110 wrapper cases with zero skips, including the 20 GPU cases. Exact binary and source identities were verified. An initial test collection failure caused by UUID-vs-numeric CUDA visibility was preserved; only test launch configuration changed for the successful retry.
Locked Rust core/test/binding type checks and formatting also passed. Type checking alone is not a Cargo runtime-test pass.
Speed Tests and Profiling
No isolated speed claim for generic hooks. The direct-linker leaf reports its exact model acceptance separately; Guard replacement, independent-inventory eviction/recovery and broader configurations remain separate gates.
Known merge gate
Fresh comparison against upstream
a3d00eff58b6c22ea7539f882cc10c537634200bconflicts inrust/sglang-radix-tree/src/python_bindings.rs. This is the tested prepared source, not a newly validated rebase.Checklist
Full draft stack
These are upstream draft review slices with logical dependencies, not branches based on upstream staging refs. Dependent Files changed views are cumulative; the incremental comparison above isolates this slice. Do not merge dependent drafts before their ancestors. The original #43635 and existing Dynamo PRs remain unchanged.