fix(PD): respect pause_generation in disagg event loops (#20908)

This commit is contained in:
Lawrence Wu
2026-04-12 18:07:51 -07:00
committed by GitHub
parent c1ab68b45e
commit 28e40d873c
3 changed files with 107 additions and 2 deletions
+4 -2
View File
@@ -1178,8 +1178,9 @@ class SchedulerDisaggregationDecodeMixin:
# Receive requests
recv_reqs = self.recv_requests()
self.process_input_requests(recv_reqs)
# polling and allocating kv cache
self.process_decode_queue()
if self._engine_paused:
continue
# Get the next batch to run
batch = self.get_next_disagg_decode_batch_to_run()
@@ -1205,8 +1206,9 @@ class SchedulerDisaggregationDecodeMixin:
# Receive requests
recv_reqs = self.recv_requests()
self.process_input_requests(recv_reqs)
# polling and allocating kv cache
self.process_decode_queue()
if self._engine_paused:
continue
# Get the next batch to run
batch = self.get_next_disagg_decode_batch_to_run()
@@ -397,6 +397,9 @@ class SchedulerDisaggregationPrefillMixin:
self.waiting_queue.extend(
self.disagg_prefill_bootstrap_queue.pop_bootstrapped()
)
if self._engine_paused:
self.process_disagg_prefill_inflight_queue()
continue
# Get the next batch to run
batch = self.get_next_disagg_prefill_batch_to_run()
@@ -428,6 +431,9 @@ class SchedulerDisaggregationPrefillMixin:
self.waiting_queue.extend(
self.disagg_prefill_bootstrap_queue.pop_bootstrapped()
)
if self._engine_paused:
self.process_disagg_prefill_inflight_queue()
continue
# Get the next batch to run
batch = self.get_next_disagg_prefill_batch_to_run()