-
Notifications
You must be signed in to change notification settings - Fork 729
fix: DIS-706 skip offloading the G1 matched blocks during offloading #3299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
264871e to
70cc164
Compare
WalkthroughUpdated Slot trait and VllmConnectorSlot method signatures to include an is_new_request flag, adjusted internal logic around evaluated_blocks and offloading decisions, set explicit true/false at two call sites distinguishing new vs cached requests, and changed disk pool layout construction to clone config before use. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant Leader as KvConnectorLeader
participant Slot as VllmConnectorSlot
participant Scheduler
Client->>Leader: build_connector_metadata(request)
Leader->>Scheduler: get scheduler output
alt New request
note over Leader,Slot: is_new_request = true
Leader->>Slot: apply_scheduler_output_with_computed_position(..., true)
Slot->>Slot: Conditionally advance evaluated_blocks
Slot->>Slot: Compute num_candidate_blocks via saturating_sub
Slot->>Slot: Offload if num_candidate_blocks > 0
else Cached request
note over Leader,Slot: is_new_request = false
Leader->>Slot: apply_scheduler_output_with_computed_position(..., false)
Slot->>Slot: Skip onboarding advancement
Slot->>Slot: Compute/decide offload as above
end
Leader-->>Client: connector metadata
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (1)lib/llm/src/block_manager/offload.rs (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🔇 Additional comments (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
lib/bindings/python/rust/llm/block_manager/vllm/connector/leader/slot.rs
Outdated
Show resolved
Hide resolved
lib/bindings/python/rust/llm/block_manager/vllm/connector/leader/slot.rs
Outdated
Show resolved
Hide resolved
lib/bindings/python/rust/llm/block_manager/vllm/connector/leader/slot.rs
Outdated
Show resolved
Hide resolved
lib/bindings/python/rust/llm/block_manager/vllm/connector/leader/slot.rs
Outdated
Show resolved
Hide resolved
lib/bindings/python/rust/llm/block_manager/vllm/connector/leader/slot.rs
Show resolved
Hide resolved
097d571 to
9aa8230
Compare
|
/ok to test 9aa8230 |
fix fix fix fix fix fix fix Signed-off-by: richardhuo-nv <[email protected]>
Signed-off-by: richardhuo-nv <[email protected]>
Signed-off-by: richardhuo-nv <[email protected]>
9aa8230 to
6a6b3e6
Compare
…3299) Signed-off-by: richardhuo-nv <[email protected]>
…3299) Signed-off-by: richardhuo-nv <[email protected]>
Overview:
There is a bug in TRTLLM KVBM offloading, that we might double offloading the G1 matched blocks again. This PR fixed this bug.
Details:
In the prefill stage, the scheduler output for a new request will always report 0 computed tokens; it only indicates the connector of the device blocks, and the prefill tokens.
Therefore, if the request is new and the computed position is greater than 0, but the slot’s evaluated blocks count is 0, it means there are matched tokens already present on the GPU.
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
Bug Fixes
Performance Improvements
Refactor