diff --git a/vllm/distributed/ec_transfer/ec_connector/base.py b/vllm/distributed/ec_transfer/ec_connector/base.py index 1d5f467027..3c20a4a1f7 100644 --- a/vllm/distributed/ec_transfer/ec_connector/base.py +++ b/vllm/distributed/ec_transfer/ec_connector/base.py @@ -275,3 +275,15 @@ class ECConnectorBase(ABC): get_finished(). """ return False, None + + def has_pending_push_work(self) -> bool: + """Return True if the connector has push-mode work that requires + the engine main loop to keep stepping (e.g. for EPD, + Producer has push work when Xfer is in progress - Consumer + is reading it). + This mirrors exactly the KV Connector's has_pending_push_work(). + + Connectors that don't implement push-based EC transfer should + leave this as False. + """ + return False diff --git a/vllm/v1/core/sched/scheduler.py b/vllm/v1/core/sched/scheduler.py index 7fabf844a1..9ceda190b8 100644 --- a/vllm/v1/core/sched/scheduler.py +++ b/vllm/v1/core/sched/scheduler.py @@ -2362,6 +2362,10 @@ class Scheduler(SchedulerInterface): self.has_unfinished_requests() or self.has_finished_requests() or (self.connector is not None and self.connector.has_pending_push_work()) + or ( + self.ec_connector is not None + and self.ec_connector.has_pending_push_work() + ) ) def reset_prefix_cache(