Add LMCache-compatible offload connector#1
Open
yhl-amd wants to merge 1 commit into
Open
Conversation
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.
Summary
Replace the current LMCache offload worker save/load path with LMCache
CacheEngine.store()/CacheEngine.retrieve()while keeping ATOM's AITER KV layout as opaque raw bytes.Key pieces:
ATOMRawBytesLMCacheMetadataandATOMLMCacheGPUConnector;LMCacheEngineBuilder.get_or_create();ATOMKVByteCodec;Why
The first LMCache-compatible version had a regression where a prefix already hit in LMCache/HBM could still be saved again with
skip=0. A bad 128K case looked like:This PR tracks the LMCache hit save frontier and rolls it back only on load failure, so warm requests only save newly computed suffix chunks.
Validation
Host:
Docker
yhl_kvoff_009:Bench Notes
Compared against previous no-fastpath
segment_indexedCPU offload:2.6139s->1.9139s; load avg675.43ms->459.30ms.2.3633s->2.2717s; load avg478.18ms->457.24ms.Server logs confirm
enable_prefix_caching=Trueandenable_chunked_prefill=True; no failed load markers were observed.