# [MoE tuner] --ep-size bypasses --swiglu_limit validation

Open Beginner friendly
#8,194 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py at the argument parser around lines 1043–1080, then check where swiglu_limit is normalized and where EP tasks are dispatched around lines 5837–5885. Reject positive --ep-size with a non-None normalized clamp before task scheduling or output writing; verify the error is raised and each option still works independently.

Written by the indexing model from the issue text.

Description

Summary

The default FmoeTuner accepts both a positive --ep-size and an active --swiglu_limit. During task generation, the EP branch schedules FlyDSL v2 candidates and then continues past the existing clamp validation. Eligible candidates run without the requested clamp. If a candidate wins, the result writer can still stamp it with the requested swiglu_limit tag. EP task dispatch · Clamp validation · Result tag

Reproduction

Run from the repository root on gfx950. Save this input as untuned.csv.

gfx,cu_num,token,model_dim,inter_dim,expert,topk,act_type,dtype,q_dtype_a,q_dtype_w,q_type,use_g1u1,doweight_stage1
gfx950,256,32,3584,3072,8,2,ActivationType.Silu,torch.bfloat16,torch.float8_e4m3fn,torch.float8_e4m3fn,QuantType.per_1x32,1,0
PYTHONPATH=. python csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py \
  -i untuned.csv -o tuned_ep_clamp.csv \
  --ep-size 4 --swiglu_limit 0.5

Observed during review of #7542 at d59cf8b5 by inspecting dispatched tasks before timing.

  • The per_1x32 row generated 248 FlyDSL v2 candidates. The stage-one launch kwargs omitted the clamp, while the tuner retained the tag swiglu_limit=0.5.
  • Changing the row to QuantType.per_1x128 generated zero candidates and printed no shape to tune or no solution found.

Expected behavior

Reject a positive --ep-size combined with a non-None normalized swiglu_limit during argument parsing. Report that EP tuning and the clamp flag are unsupported together before scheduling tasks or writing output. The existing independent uses of each option should continue to work. Argument parser

Dominant language
Python
Stars
616
Forks
709
Avg merge
3d 10h
Merged PRs (30d)
321

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ROCm/aiter

All issues in ROCm/aiter

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.