[EPLB] Drop defensive getattr for ep_dispatch_algorithm (#31804)
Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
co-authored by
Brayden Zhong
parent
df254b0a11
commit
37ebacb50f
@@ -254,8 +254,7 @@ class HashTopK(nn.Module):
|
||||
log2phy_prob = None
|
||||
if (
|
||||
expert_location_dispatch_info is not None
|
||||
and getattr(expert_location_dispatch_info, "ep_dispatch_algorithm", None)
|
||||
== "lp"
|
||||
and expert_location_dispatch_info.ep_dispatch_algorithm == "lp"
|
||||
):
|
||||
if self.layer_id is None:
|
||||
raise RuntimeError("HashTopK LP dispatch requires layer_id.")
|
||||
|
||||
@@ -2147,8 +2147,7 @@ def _post_process_topk_ids(
|
||||
log2phy_prob = None
|
||||
if (
|
||||
expert_location_dispatch_info is not None
|
||||
and getattr(expert_location_dispatch_info, "ep_dispatch_algorithm", None)
|
||||
== "lp"
|
||||
and expert_location_dispatch_info.ep_dispatch_algorithm == "lp"
|
||||
):
|
||||
from sglang.srt.eplb.lplb_solver import get_global_lplb_solver
|
||||
|
||||
|
||||
Reference in New Issue
Block a user