Skip to content

Fix CK MoE split-k dispatch for blockscale FP8 - #3050

Merged
valarLip merged 1 commit into
ROCm:mainfrom
EmbeddedLLM:fix_ck_moe_splitk_dispatch
May 6, 2026
Merged

valarLip merged 1 commit into
ROCm:mainfrom
EmbeddedLLM:fix_ck_moe_splitk_dispatch

Conversation

@kliuae

@kliuae kliuae commented May 6, 2026

Copy link
Copy Markdown
Contributor

Motivation

In ck_moe_stage1, split-k kernels write to a separate, differently sized buffer from the module output. However, currently the blockscale quant type predicate for split-k is compared through object identity rather than values, and may always be evaluated to False as QuantType is not a strict python enum.
The downstream cmdGenFunc_ck_moe_stage also determines its own split-k conditions based on name matching from tuned configs. While this may be fine when tuned configs are not used as the non-splitk versions are always chosen, when the split-k kernels are selected from tuned configs through name matching, the split-k kernels would consume wrong-sized buffers, resulting in memory access faults.

Technical Details

This PR replaces the QuantType comparison with value equality in the detection of CK MoE stage1's split-k so that the correct buffer can be allocated for the blockscale splitk paths.

Test Plan

Test Result

Submission Checklist

@kliuae
kliuae requested a review from a team May 6, 2026 09:48
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
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 3050 --add-label <label>

@valarLip valarLip left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@valarLip
valarLip merged commit c9a67d9 into ROCm:main May 6, 2026
1 check passed
sunway513 pushed a commit that referenced this pull request May 6, 2026
Liang-jianhao97 pushed a commit that referenced this pull request May 7, 2026
sunway513 added a commit that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants