[Bug Fix] Reject pp_max_micro_batch_size=0 to prevent silent deadlock on generate() (#23799)

This commit is contained in:
Praneth Paruchuri
2026-04-27 13:36:04 +08:00
committed by GitHub
parent e5198386bd
commit b7113cadb1
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -702,7 +702,7 @@ class Scheduler(
_,
_,
) = self.tp_worker.get_worker_info()
if get_global_server_args().pp_max_micro_batch_size is None:
if not get_global_server_args().pp_max_micro_batch_size:
get_global_server_args().pp_max_micro_batch_size = max(
self.max_running_requests // self.pp_size, 1
)
+7
View File
@@ -6619,6 +6619,13 @@ class ServerArgs:
self.tp_size * self.pp_size
) % self.nnodes == 0, "tp_size must be divisible by number of nodes"
assert (
self.pp_max_micro_batch_size is None or self.pp_max_micro_batch_size >= 1
), (
"pp_max_micro_batch_size must be a positive integer or None (for auto-compute). "
f"Got: {self.pp_max_micro_batch_size}"
)
if self.pp_size > 1:
assert (
self.disable_overlap_schedule and self.speculative_algorithm is None