From bed3280f50dce36ff9472eee937d1aada7e31d75 Mon Sep 17 00:00:00 2001 From: Itay Etelis <92247226+Etelis@users.noreply.github.com> Date: Mon, 31 Aug 2026 14:31:18 +0300 Subject: [PATCH] [KV offload] Order CPU->GPU loads against the compute stream (#50696) Signed-off-by: Itay Etelis Co-authored-by: Itay Etelis Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- vllm/v1/kv_offload/cpu/gpu_worker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vllm/v1/kv_offload/cpu/gpu_worker.py b/vllm/v1/kv_offload/cpu/gpu_worker.py index d2625c2376..bcaf21ff75 100644 --- a/vllm/v1/kv_offload/cpu/gpu_worker.py +++ b/vllm/v1/kv_offload/cpu/gpu_worker.py @@ -636,8 +636,10 @@ class SingleDirectionOffloadingHandler: # Stores must wait for the model to finish writing the KV they read. # Loads must wait for pending writes (including zeroing) to their - # destination blocks; otherwise an earlier transfer can be overwritten - # by compute-stream work that was already queued when the load began. + # destination blocks: the scheduler's _skip_zero_block_ids only edits + # the step being scheduled and cannot retract zeroing shipped in an + # earlier step for a since-reallocated block; with async scheduling + # nothing else orders that zeroing against this copy. stream.wait_stream(current_platform.current_stream()) if self._transfers: last_transfer: Transfer = self._transfers[-1]