Skip to content

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 from meta.push_registrations next 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_blocks for the lease, and into _newly_finished_push_blocks so the P worker picks them up via meta.push_finished_blocks and matches against any D registrations it already received via NIXL notifications.
  • Both sides: has_pending_push_work keeps the engine main loop stepping while pushes are in flight. update_connector_output cleans up _finished_request_blocks once 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

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(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).