Skip to content

[FlyDSL] Add gfx1250 grouped MoE A-preshuffle and tuned CSV validation - #6709

Merged
coderfeli merged 26 commits into
mainfrom
dev/yadai_improve_test
Oct 27, 2026
Merged

coderfeli merged 26 commits into
mainfrom
dev/yadai_improve_test

Conversation

@yadaish

@yadaish yadaish commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Add a CSV-selectable A-preshuffled activation layout to gfx1250 A4W4 grouped MoE and make the existing TP/EP test entry points validate every applicable tuned configuration. CSV sweeps now use each selected file for runtime configuration lookup, including when switching between model-specific files.

Technical Details

  • Thread a_preshuffle from the matched tuning row through activation preparation and both grouped GEMMs. Add compact MXFP4 quantization followed by routed scatter into M16 payload tiles and M16K4 scales; prequantized inputs can enter scatter directly.
  • Update TDM/LDS addressing and fused GEMM1 quantized output for the packed layout. Validate layout constraints and include the layout in kernel specialization/cache identities.
  • Align AOT generation with runtime launch signatures, stage-specific tile settings, A-preshuffle variants, and compact/aligned scale strides. Keep EP's topk=-1 tuning sentinel out of compile-time route-count arithmetic.
  • Add format-specific scheduling defaults for 256x256x256 prefill tiles, enable MoE expert scheduling by default, refresh main/Qwen tuning, and add Kimi gfx1250 tuning.
  • Extend the existing CSV runners: TP defaults to main + Qwen, EP defaults to main + Kimi, and --csv-path selects one file. Clear configuration lookup caches between files, support SiLU/Swiglu/Situv2, fix shared-expert reference mapping, and aggregate failures across selected files. Default sweeps exclude untuned configurations; TP skips EP rows.

Test Plan

Validated on gfx1250 using the existing test entry points without --csv-path:

  • TP: op_tests/flydsl_tests/test_flydsl_grouped_gemm.py --scenario csv --no-bias --iters 16 --no-check-aot-cache, with grouped GEMM enabled, CK disabled, and balanced routing. Run constant/constant and uniform/auto data/scale initialization with CUDA graphs and JIT allowed.
  • EP: op_tests/test_moe_ep.py -t ep_csv --ep-mode real, with four simulated ranks, top-k 8, and balanced routing. Validate local outputs only; distributed EP scatter-combine is outside this validation.
  • Ruff 0.16.0: ruff check .; whitespace: git diff --check.

Test Result

Mode Tuned CSV Correctness checks passed
TP Main 190/190
TP Qwen3.5-397B 72/72
EP Main 42/42
EP Kimi K3 gfx1250 27/27

All 200 applicable CSV rows passed, totaling 331 correctness checks. Both CSV processes exited successfully. The two ep_fused=1 rows were tested as local EP shapes; their fused scatter behavior was not validated. Ruff and whitespace checks passed.

Performance comparison remains pending: existing priority-script measurements had concurrent GPU activity or substantial timing variation and do not support a stable speedup/regression claim.

Submission Checklist

@yadaish
yadaish requested a review from a team October 20, 2026 09:04
@github-actions github-actions Bot changed the title Dev/yadai improve test [FlyDSL] Dev/yadai improve test Oct 20, 2026
@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:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
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: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
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 6709 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Comment thread aiter/ops/flydsl/moe_kernels.py Resolved
@amd-ruitang3 amd-ruitang3 changed the title [FlyDSL] Dev/yadai improve test [FlyDSL] Add gfx1250 grouped MoE A-preshuffle and tuned CSV validation Oct 26, 2026

@coderfeli coderfeli 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

@coderfeli
coderfeli merged commit ec1557e into main Oct 27, 2026
63 checks passed
@coderfeli
coderfeli deleted the dev/yadai_improve_test branch October 27, 2026 15:02
amd-bartgips added a commit that referenced this pull request Oct 28, 2026
#6709 added an a_preshuffle column to tuned_grouped_fmoe.csv without a
blank-cell value, so retuning a row of the production table raises, and
two test_tuner_infra tests fail on main. grouped_moe_gfx1250 reads a
blank a_preshuffle as 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
amd-bartgips added a commit that referenced this pull request Oct 28, 2026
#6709 added an a_preshuffle column to tuned_grouped_fmoe.csv without a
blank-cell value, so retuning a row of the production table raises, and
two test_tuner_infra tests fail on main. grouped_moe_gfx1250 reads a
blank a_preshuffle as 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
amd-bartgips added a commit that referenced this pull request Oct 28, 2026
#6709 added an a_preshuffle column to tuned_grouped_fmoe.csv without a
blank-cell value, so retuning a row of the production table raises, and
two test_tuner_infra tests fail on main. grouped_moe_gfx1250 reads a
blank a_preshuffle as 0.
amd-bartgips added a commit that referenced this pull request Nov 3, 2026
#6709 added an a_preshuffle column to tuned_grouped_fmoe.csv without a
blank-cell value, so retuning a row of the production table raises, and
two test_tuner_infra tests fail on main. grouped_moe_gfx1250 reads a
blank a_preshuffle as 0.
amd-bartgips added a commit that referenced this pull request Nov 4, 2026
#6709 added an a_preshuffle column to tuned_grouped_fmoe.csv without a
blank-cell value, so retuning a row of the production table raises, and
two test_tuner_infra tests fail on main. grouped_moe_gfx1250 reads a
blank a_preshuffle as 0.
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