vllm.distributed.kv_transfer.kv_connector.v1.nixl.push_scheduler
¶
Push-specific scheduler-side logic for the NIXL connector.
In push mode, scheduler-side responsibilities are:
- D side (decode): on
update_state_after_alloc, stash registration data (D's identity + locally allocated block IDs) into_push_pending_registrations. The D worker drains it frommeta.push_registrationsnext step and sends a NIXL notification to the P worker (no scheduler-level networking). - P side (prefill): on
request_finished, stash the finished block IDs into_finished_request_blocksfor the lease, and into_newly_finished_push_blocksso the P worker picks them up viameta.push_finished_blocksand matches against any D registrations it already received via NIXL notifications. - Both sides:
has_pending_push_workkeeps the engine main loop stepping while pushes are in flight.update_connector_outputcleans up_finished_request_blocksonce the WRITE completes.
A soft per-registration watchdog on the D scheduler fails requests that have been registered but not fulfilled within a configurable timeout.
Classes:
-
NixlPushConnectorScheduler–Push-specific scheduler logic (WRITE-based KV transfer).
NixlPushConnectorScheduler
¶
Bases: NixlBaseConnectorScheduler
Push-specific scheduler logic (WRITE-based KV transfer).
All P2P communication is deferred to the worker level via NIXL
notifications. The scheduler communicates with workers only through
the standard build_connector_meta / update_connector_output
hooks.
Methods:
-
get_num_new_matched_tokens–In push mode, D doesn't pull — it registers blocks and waits.
-
request_finished–Push-mode request_finished: stores blocks for workers.
-
update_connector_output–Clean up finished request blocks after push completes.
-
update_state_after_alloc–In push mode, D stores registration data for the worker to send
get_num_new_matched_tokens(request, num_computed_tokens)
¶
In push mode, D doesn't pull — it registers blocks and waits.
However, we still need to handle the do_remote_prefill case where D needs to know how many tokens will be pushed.
request_finished(request, block_ids)
¶
Push-mode request_finished: stores blocks for workers.
update_connector_output(connector_output)
¶
Clean up finished request blocks after push completes.
update_state_after_alloc(request, blocks, num_external_tokens)
¶
In push mode, D stores registration data for the worker to send
to P via NIXL notification (deferred to build_connector_meta).