@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6f067b1fb7
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 9, 21:48 UTC

[Cleanup] Remove unused `KVConnectorModelRunnerMixin` methods (#32077)

Signed-off-by: Nick Hill <nickhill123@gmail.com>

Nick Hill committed Jan 20, 2026 at 19:16 UTC 6f067b1fb7309ed9dc05f187f25ca29f82f6fd9a
2 files changed +2 -32
tests/v1/kv_connector/unit/test_nixl_connector.py
+2 -2
@@ -518,7 +518,7 @@ class TestNixlHandshake:
518 )
519 connector.bind_connector_metadata(metadata)
520
521 - # Mimic maybe_setup_kv_connector in gpu_model_runner.
521 + # Mimic logic in KVConnectorModelRunnerMixin._get_kv_connector_output.
522 dummy_ctx = ForwardContext(
523 no_compile_layers={},
524 attn_metadata={},
@@ -531,7 +531,7 @@ class TestNixlHandshake:
531 f"start_load_kv took {_after_load - _before_load} seconds"
532 )
533
534 - # Mimic get_finished_kv_transfers in gpu_model_runner.
534 + # Mimic logic in KVConnectorModelRunnerMixin._get_kv_connector_output.
535 _, done_recving = connector.get_finished(finished_req_ids=set())
536 if len(done_recving) > 0:
537 assert request_id in done_recving
vllm/v1/worker/kv_connector_model_runner_mixin.py
-30
@@ -38,42 +38,12 @@ logger = init_logger(__name__)
38
39 # Defined as a kv connector functionality mixin for ModelRunner (GPU, TPU)
40 class KVConnectorModelRunnerMixin:
41 - @staticmethod
42 - def maybe_setup_kv_connector(scheduler_output: "SchedulerOutput"):
43 - # Update KVConnector with the KVConnector metadata forward().
44 - if has_kv_transfer_group():
45 - kv_connector = get_kv_transfer_group()
46 - assert isinstance(kv_connector, KVConnectorBase)
47 - assert scheduler_output.kv_connector_metadata is not None
48 - kv_connector.bind_connector_metadata(scheduler_output.kv_connector_metadata)
49 -
50 - # Background KV cache transfers happen here.
51 - # These transfers are designed to be async and the requests
52 - # involved may be disjoint from the running requests.
53 - # Do this here to save a collective_rpc.
54 - kv_connector.start_load_kv(get_forward_context())
55 -
41 @staticmethod
42 def ensure_kv_transfer_shutdown() -> None:
43 # has_kv_transfer_group can be None during interpreter shutdown.
44 if has_kv_transfer_group and has_kv_transfer_group(): # type: ignore[truthy-function]
45 ensure_kv_transfer_shutdown()
46
62 - @staticmethod
63 - def maybe_wait_for_kv_save() -> None:
64 - if has_kv_transfer_group():
65 - get_kv_transfer_group().wait_for_save()
66 -
67 - @staticmethod
68 - def get_finished_kv_transfers(
69 - scheduler_output: "SchedulerOutput",
70 - ) -> tuple[set[str] | None, set[str] | None]:
71 - if has_kv_transfer_group():
72 - return get_kv_transfer_group().get_finished(
73 - scheduler_output.finished_req_ids
74 - )
75 - return None, None
76 -
47 @staticmethod
48 def kv_connector_no_forward(
49 scheduler_output: "SchedulerOutput", vllm_config: VllmConfig