File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2663,6 +2663,18 @@ def execute_model(
26632663 return make_empty_encoder_model_runner_output (scheduler_output )
26642664
26652665 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 )
26662678 if not has_kv_transfer_group ():
26672679 # Return empty ModelRunnerOutput if no work to do.
26682680 return EMPTY_MODEL_RUNNER_OUTPUT
You can’t perform that action at this time.
0 commit comments