Skip to content

Gfx950 mxfp4 flat - #4001

Merged
valarLip merged 8 commits into
mainfrom
gfx950_mxfp4_flat
Jul 5, 2026
Merged

Gfx950 mxfp4 flat#4001
valarLip merged 8 commits into
mainfrom
gfx950_mxfp4_flat

Conversation

@JohnNikolay84

@JohnNikolay84 JohnNikolay84 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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

image

Submission Checklist

@JohnNikolay84
JohnNikolay84 requested a review from a team June 29, 2026 16:19
@github-actions

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: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 4001 --add-label <label>

@JohnNikolay84 JohnNikolay84 self-assigned this Jun 29, 2026
@JohnNikolay84
JohnNikolay84 requested a review from valarLip June 29, 2026 16:29
@JohnNikolay84
JohnNikolay84 force-pushed the gfx950_mxfp4_flat branch 2 times, most recently from 62f9624 to 3059387 Compare June 30, 2026 15:11
nholmber added a commit to nholmber/aiter that referenced this pull request Jun 30, 2026
…cale fix

Base: gfx950_mxfp4_flat @ 4d901943e (includes i_dim=512 precision fix)
Cherry-picked:
- 30464bb: HD256 FMHA FP8 GFX950
- 71218e5: forward q/k/v descale params through flash_attn_varlen_func
Sergey Solo and others added 8 commits July 3, 2026 22:54
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>
@valarLip
valarLip merged commit bd82ce0 into main Jul 5, 2026
66 of 67 checks passed
@valarLip
valarLip deleted the gfx950_mxfp4_flat branch July 5, 2026 01:57
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