vllm.distributed.eplb.migration_scheduler
¶
Schedule EPLB expert migrations into conflict-free batches.
Classes:
-
MigrationFlow–Expert transfers between one directed rank pair.
Functions:
-
schedule_migration_batches–Schedule expert migrations without per-rank communication contention.
-
schedule_migration_batches_for_layers–Precompute the independent migration schedule for every MoE layer.
MigrationFlow
dataclass
¶
Expert transfers between one directed rank pair.
Source code in vllm/distributed/eplb/migration_scheduler.py
schedule_migration_batches(num_local_experts, old_indices, new_indices)
¶
Schedule expert migrations without per-rank communication contention.
Experts assigned to the same source and destination ranks form one flow. Each flow is placed in the first batch that does not already use either endpoint, so a rank communicates with at most one peer in each batch while independent rank pairs can transfer concurrently.
Source code in vllm/distributed/eplb/migration_scheduler.py
schedule_migration_batches_for_layers(num_local_experts, old_indices, new_indices)
¶
Precompute the independent migration schedule for every MoE layer.
This reduces scheduling entry points from once per layer to once per rebalance cycle. Only CPU scheduling is grouped; transfers remain ordered by layer and preserve each layer's batch boundaries.