A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 13, 02:00 UTC
[BugFix] Corner case that could cause out-of-sync with external launcher mode and dp >1 (#28774)
Bangsheng Tang committed
Nov 17, 2025 at 15:22 UTC
61485844fc5190721b1edf6bed9aa4d5567b70e0
1 file changed
+12
vllm/v1/worker/gpu_model_runner.py
+12
@@ -2663,6 +2663,18 @@ class GPUModelRunner(
2663
return make_empty_encoder_model_runner_output(scheduler_output)
2664
2665
if not num_scheduled_tokens:
2666
+ if (
2667
+ self.parallel_config.distributed_executor_backend
2668
+ == "external_launcher"
2669
+ and self.parallel_config.data_parallel_size > 1
2670
+ ):
2671
+ # this is a corner case when both external launcher
2672
+ # and DP are enabled, num_scheduled_tokens could be
2673
+ # 0, and has_unfinished_requests in the outer loop
2674
+ # returns True. before returning early here we call
2675
+ # dummy run to ensure coordinate_batch_across_dp
2676
+ # is called into to avoid out of sync issues.
2677
+ self._dummy_run(1)
2678
if not has_kv_transfer_group():
2679
# Return empty ModelRunnerOutput if no work to do.
2680
return EMPTY_MODEL_RUNNER_OUTPUT