Support Cache|Posix H2H pipeline for SGLang MLA models - #1280
Open
lc1314555 wants to merge 2 commits into
Open
Conversation
lc1314555
requested review from
Infinite666,
Wwwzff,
harrisonyhq,
mag1c-h,
qyh111 and
ygwpz
as code owners
August 25, 2026 11:54
mag1c-h
reviewed
Aug 25, 2026
| if (shard.addrs[i] == nullptr) { | ||
| return Status::InvalidParam("invalid null host source({})", i); | ||
| } | ||
| std::memcpy(dst + offset, shard.addrs[i], tensorSizes_[i]); |
Collaborator
There was a problem hiding this comment.
CacheStore employs a single-threaded, asynchronous I/O scheduling model; synchronous memcpy operations would cause all access operations to be serialized.
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.
Purpose
Enable SGLang MLA models to use the UCM
Cache|Posixpipeline throughHost-to-Host transfers.
SGLang HiCache passes Host KV addresses to external storage, while CacheStore
previously treated all addresses as device pointers and always performed
D2H/H2D transfers.
This PR adds a Host-buffer mode to CacheStore and automatically selects
Cache|Posixfor MLA models.Supported scenarios:
page_first_kv_splitpage_firstNon-MLA models continue to use the Posix-only pipeline.
Modifications
CacheStore H2H support
cache_use_host_bufferconfiguration.tensor_size_list.cache_sdma_directuse_gdrgpu_kv_buffer_addrsData path: