[Misc] correct static type check for GroupCoordinator (#21946)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
This commit is contained in:
@@ -251,6 +251,7 @@ class EplbState:
|
||||
|
||||
if global_expert_load is not None:
|
||||
ep_group = get_ep_group().device_group
|
||||
assert ep_group is not None
|
||||
assert global_expert_load.shape == (model.num_moe_layers,
|
||||
model.num_logical_experts)
|
||||
assert global_expert_load.dtype == torch.int64
|
||||
@@ -357,6 +358,7 @@ class EplbState:
|
||||
|
||||
# Collect load metrics from all ranks
|
||||
ep_group = get_ep_group().device_group
|
||||
assert ep_group is not None
|
||||
num_tokens_list = [
|
||||
torch.empty_like(num_tokens) for _ in range(ep_group.size())
|
||||
]
|
||||
@@ -412,6 +414,7 @@ class EplbState:
|
||||
"""
|
||||
|
||||
ep_group = get_ep_group().device_group
|
||||
assert ep_group is not None
|
||||
ep_rank = ep_group.rank()
|
||||
|
||||
time_start = None
|
||||
|
||||
Reference in New Issue
Block a user