[Bug Fix] Reject pp_max_micro_batch_size=0 to prevent silent deadlock on generate() (#23799)
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user