[MoE Refactor] Separate Router into OO Classes (#30623)
Signed-off-by: Bill Nell <bnell@redhat.com>
This commit is contained in:
@@ -1158,6 +1158,15 @@ class EplbState:
|
||||
return self._allreduce_list(load_pass_list)
|
||||
|
||||
|
||||
@dataclass
|
||||
class EplbLayerState:
|
||||
"""Runtime EPLB data stored in the MoE layer."""
|
||||
|
||||
expert_load_view: torch.Tensor | None = None
|
||||
logical_to_physical_map: torch.Tensor | None = None
|
||||
logical_replica_count: torch.Tensor | None = None
|
||||
|
||||
|
||||
def _node_count_with_rank_mapping(
|
||||
pg: ProcessGroup | StatelessProcessGroup,
|
||||
rank_mapping: dict[int, int],
|
||||
|
||||
Reference in New Issue
Block a user