[Core] Add prefill step cadence for better non-PD DP balancing (#44558)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-06-16 13:17:18 -07:00
committed by GitHub
parent 475a6ad18a
commit d8d95998dc
7 changed files with 306 additions and 4 deletions
+7 -1
View File
@@ -49,7 +49,7 @@ class SchedulerInterface(ABC):
raise NotImplementedError
@abstractmethod
def schedule(self) -> "SchedulerOutput":
def schedule(self, throttle_prefills: bool = False) -> "SchedulerOutput":
"""Schedule the requests to process in this scheduling step.
The scheduling decision is made at the iteration level. Each scheduling
@@ -68,6 +68,12 @@ class SchedulerInterface(ABC):
or the batch as a whole. The model runner will use this information in
preparing inputs to the model.
Args:
throttle_prefills: DP prefill balancing. When True (set by the DP
engine core on non-cadence-aligned steps), new prefill compute is
deferred to a later step so prefills stay aligned across DP ranks;
automatically overridden when the rank is saturated.
Returns:
A SchedulerOutput object containing information about the scheduled
requests.