Skip to content

Fix group topk dispatch for glm5#2611

Merged
valarLip merged 2 commits intomainfrom
jun/group_topk_glm5
Apr 4, 2026
Merged

Fix group topk dispatch for glm5#2611
valarLip merged 2 commits intomainfrom
jun/group_topk_glm5

Conversation

@junhaha666
Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@junhaha666 junhaha666 requested review from a team and Copilot April 3, 2026 13:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:triton-355 Run Triton tests on MI355 in addition to MI325
ci:sglang SGLang integration tests
ci:atom ATOM benchmark (DeepSeek-R1 + GPT-OSS)
ci:vllm vLLM benchmark
ci:all All of the above

Add labels via the sidebar or gh pr edit 2611 --add-label <label>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the grouped top‑k dispatch logic to avoid using moe_fused_gate for configurations with large experts-per-group (notably affecting GLM5), and adjusts the associated benchmark test to skip the moe_fused_gate comparison in those cases.

Changes:

  • Update biased_grouped_topk dispatch to route to the HIP implementation when experts-per-group exceeds 32.
  • Gate the moe_fused_gate (“sglang”) performance/correctness comparison in the benchmark test to only run when experts-per-group is ≤ 32.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
op_tests/test_moeTopkSoftmax.py Skips moe_fused_gate comparison when experts-per-group exceeds the supported threshold.
aiter/ops/topk.py Adjusts dispatch logic to avoid moe_fused_gate when experts-per-group is too large.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread aiter/ops/topk.py
Comment thread aiter/ops/topk.py
Comment thread op_tests/test_moeTopkSoftmax.py
Comment thread op_tests/test_moeTopkSoftmax.py
@valarLip valarLip merged commit 35d347b into main Apr 4, 2026
23 of 25 checks passed
@valarLip valarLip deleted the jun/group_topk_glm5 branch April 4, 2026 04:31
yzhou103 pushed a commit that referenced this pull request Apr 8, 2026
* Fix group topk dispatch for glm5

* update grouped_topk not compute topk group when group=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants