[EPLB] Add contention-aware expert migration batching (#52641)
Signed-off-by: DOCCA0 <2947323341@qq.com> Co-authored-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com>
This commit is contained in:
@@ -106,6 +106,17 @@ class EPLBConfig:
|
||||
on CUDA, falls back to "torch_gloo")
|
||||
"""
|
||||
|
||||
enable_migration_batching: bool = False
|
||||
"""Schedule expert migrations in batches where each rank communicates with
|
||||
at most one peer. This reduces per-rank network contention at the cost of
|
||||
additional sequential communication steps. This option only applies to
|
||||
async EPLB and is disabled by default."""
|
||||
|
||||
@property
|
||||
def migration_batching_enabled(self) -> bool:
|
||||
"""Whether contention-aware batching is active for this configuration."""
|
||||
return self.use_async and self.enable_migration_batching
|
||||
|
||||
@model_validator(mode="after")
|
||||
def _validate_eplb_config(self) -> Self:
|
||||
if self.use_async and self.policy != "default":
|
||||
|
||||
Reference in New Issue
Block a user