[EPLB] Drop defensive getattr for ep_dispatch_algorithm (#31804)

Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
Beihao Zhou
2026-09-15 16:14:41 +08:00
committed by GitHub
co-authored by Brayden Zhong
parent df254b0a11
commit 37ebacb50f
3 changed files with 8 additions and 6 deletions
+1 -2
View File
@@ -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.")
+1 -2
View File
@@ -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