[Elastic EP] Async preparation (#47288)

Signed-off-by: Itay Alroy <ialroy@nvidia.com>
This commit is contained in:
Itay Alroy
2026-07-28 05:19:13 -07:00
committed by GitHub
parent d2bfc6fe20
commit 35efdf6b34
21 changed files with 701 additions and 677 deletions
+8 -23
View File
@@ -821,7 +821,10 @@ class CoreEngineActorManager:
return placement_groups, local_dp_ranks
def scale_up_elastic_ep(
self, cur_vllm_config: VllmConfig, new_data_parallel_size: int
self,
cur_vllm_config: VllmConfig,
new_data_parallel_size: int,
num_redundant_experts: int,
) -> None:
import copy
@@ -864,6 +867,9 @@ class CoreEngineActorManager:
if new_data_parallel_size > 1:
_apply_dp_identity_suffix(dp_vllm_config, rank)
dp_vllm_config.parallel_config.data_parallel_size = new_data_parallel_size
dp_vllm_config.parallel_config.eplb_config.num_redundant_experts = (
num_redundant_experts
)
dp_vllm_config.parallel_config.placement_group = pg
# Check if this placement group is on the head node
@@ -906,39 +912,18 @@ class CoreEngineActorManager:
self.created_placement_groups.append(pg)
self.placement_group_is_local.append(local_client)
ray.get(
[
actor.wait_for_init.remote()
for actor in (
self.local_engine_actors[-new_local_engines:]
if new_local_engines > 0
else []
)
+ self.remote_engine_actors[
-(len(placement_groups) - new_local_engines) :
]
]
)
actors = (
self.local_engine_actors[-new_local_engines:]
if new_local_engines > 0
else []
) + self.remote_engine_actors[-(len(placement_groups) - new_local_engines) :]
ray.get([actor.wait_for_init.remote() for actor in actors])
for actor in actors:
ref = actor.run.remote()
self.run_refs.append(ref)
self.actor_run_ref_dict[actor] = ref
cur_vllm_config.parallel_config.data_parallel_size = new_data_parallel_size
# Update old_vllm_config with new data_parallel_size_local if any new
# local engines were added
if new_local_engines > 0:
cur_vllm_config.parallel_config.data_parallel_size_local += (
new_local_engines
)
def scale_down_elastic_ep(
self, cur_data_parallel_size: int, new_data_parallel_size: int
) -> None: