Gfx950 mxfp4 flat - #4001
Merged
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
JohnNikolay84
force-pushed
the
gfx950_mxfp4_flat
branch
2 times, most recently
from
June 30, 2026 15:11
62f9624 to
3059387
Compare
Wrap the test_fmoe(**kwargs, kernel_bench=..., ref_dtype=...) call across multiple lines (line-length) after the origin/main rebase merged both the kernel_bench and ref_dtype arguments. Co-authored-by: Cursor <cursoragent@cursor.com>
JohnNikolay84
force-pushed
the
gfx950_mxfp4_flat
branch
from
July 3, 2026 22:55
8918c5b to
7a7d850
Compare
valarLip
approved these changes
Jul 5, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
B200 decode mxfp4 moe is significantly faster than gfx950. Implementing moe on asm to close the gap.
Technical Details
Introducing a new flat mxfp4 fmoe asm kernel, it requires no prior sorting or quantization. It directly consumes bf16 token embeddings and fused_topk output. Max topk = 16.
2stage moe aiter unit test has been updated with the new input flag
--ref-dtype fp32. When this flag is provided torch reference is using fp32 for intermediate quantization after activation. By default it is using bf16 as ck or flyDSL 2 stage kernels are using, but that would create a big divergence in the CheckAllClose call with asm kernels that are using fp32. fp32 or bf16 is just a choice, both should work fine, the main point is that kernel and reference should use the same ref-dtype to make the test output reasonable.Test Plan
Test Result
Submission Checklist