Skip to content

Commit

Permalink
[ci] fix broken tests (vllm-project#10956)
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
  • Loading branch information
youkaichao authored Dec 6, 2024
1 parent c05cfb6 commit dcdc3fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vllm/worker/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1782,16 +1782,16 @@ def need_recv_kv(self, model_input, kv_caches) -> bool:
kv_caches: vLLM's paged memory
"""

if self.vllm_config.kv_transfer_config is None:
return False

prefill_meta = model_input.attn_metadata.prefill_metadata

# check if the current run is profiling
is_profile_run = (kv_caches[0].numel() == 0)
# check if the current run is prefill
is_prefill_run = prefill_meta is not None

if self.vllm_config.kv_transfer_config is None:
return False

return self.vllm_config.kv_transfer_config.is_kv_consumer and (
not is_profile_run) and is_prefill_run

Expand All @@ -1807,16 +1807,16 @@ def need_send_kv(self, model_input, kv_caches) -> bool:
kv_caches: vLLM's paged memory
"""

if self.vllm_config.kv_transfer_config is None:
return False

prefill_meta = model_input.attn_metadata.prefill_metadata

# check if the current run is profiling
is_profile_run = (kv_caches[0].numel() == 0)
# check if the current run is prefill
is_prefill_run = prefill_meta is not None

if self.vllm_config.kv_transfer_config is None:
return False

return self.vllm_config.kv_transfer_config.is_kv_producer and (
not is_profile_run) and is_prefill_run

Expand Down

0 comments on commit dcdc3fa

Please sign in to comment.