Guard generic topology search from introducing EP

This commit is contained in:
2026-06-24 15:21:22 +08:00
parent c245774d76
commit 8fa758797e
2 changed files with 108 additions and 0 deletions

View File

@@ -1482,6 +1482,11 @@ def _legal_topology_points(
and current_ep > 1
):
ep_values = [current_ep]
elif not current_enable_ep and current_ep <= 1:
# Generic topology search should not introduce EP. EP is a separate
# intervention family and needs direct EP-specific evidence; otherwise
# TTFT/TPOT topology probes can waste trials on launch-risky EP variants.
ep_values = [1]
elif constraints is not None and constraints.allowed_expert_parallel_sizes:
ep_values = sorted(set(constraints.allowed_expert_parallel_sizes))
elif "expert-parallel-size" in tunable: