Skip to content

Commit dcdc3fa

Browse files
authored
[ci] fix broken tests (#10956)
Signed-off-by: youkaichao <[email protected]>
1 parent c05cfb6 commit dcdc3fa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

vllm/worker/model_runner.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1782,16 +1782,16 @@ def need_recv_kv(self, model_input, kv_caches) -> bool:
17821782
kv_caches: vLLM's paged memory
17831783
"""
17841784

1785+
if self.vllm_config.kv_transfer_config is None:
1786+
return False
1787+
17851788
prefill_meta = model_input.attn_metadata.prefill_metadata
17861789

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

1792-
if self.vllm_config.kv_transfer_config is None:
1793-
return False
1794-
17951795
return self.vllm_config.kv_transfer_config.is_kv_consumer and (
17961796
not is_profile_run) and is_prefill_run
17971797

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

1810+
if self.vllm_config.kv_transfer_config is None:
1811+
return False
1812+
18101813
prefill_meta = model_input.attn_metadata.prefill_metadata
18111814

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

1817-
if self.vllm_config.kv_transfer_config is None:
1818-
return False
1819-
18201820
return self.vllm_config.kv_transfer_config.is_kv_producer and (
18211821
not is_profile_run) and is_prefill_run
18221822

0 commit comments

Comments
 (0)