Skip to content

Add full 16-tier Qwen3-VL FP4 MoE tuned config for gfx950 - #4759

Open
johannes-graner wants to merge 3 commits into
mainfrom
jograner/fp4-moe-stage2-SILOTIGER-910
Open

Add full 16-tier Qwen3-VL FP4 MoE tuned config for gfx950#4759
johannes-graner wants to merge 3 commits into
mainfrom
jograner/fp4-moe-stage2-SILOTIGER-910

Conversation

@johannes-graner

Copy link
Copy Markdown
Contributor

Motivation

The Qwen3-VL W4A4 FP4 MoE path on gfx950 had no tuned config for its dominant shapes, so
fused_moe fell back to a slower base stage2 kernel across most token counts. This ships a
complete, peer-matching tuned config so the FP4 MoE path dispatches its best-known kernel at
every padded token tier.

Technical Details

  • aiter/configs/model_configs/qwen3_vl_fp4_tuned_fmoe.csv: expanded to the full 16-tier padded
    power-of-two grid (tokens 1..32768), matching the row density/completeness of peer fmoe
    configs. Every row is fully measured (us1/us2/us/tflops/bw populated).
  • aiter/configs/model_configs/qwen3_vl_fp4_untuned_fmoe.csv: expanded to the same 16 tiers
    (superset of the tuned shapes).
  • Kernel selection: small tiers (1–1024) use the isolated-tuner winners; large tiers
    (2048–32768) select the existing
    flydsl_moe2_afp4_wfp4_bf16_t64x128x256_atomic_persist_async_w4_cumul3 stage2 kernel, whose
    large-tier selection was validated against the real fused end-to-end fused_moe path (not
    just isolated per-kernel timing).
  • Config-data only — no kernel or dispatch code changes.

Test Plan

  • Fused end-to-end correctness: aiter.fused_moe(..., quant_type=QuantType.per_1x32) on the
    Qwen3-VL FP4 shapes, gated on cosine similarity against the torch reference.
  • Collision guard: python3 -m unittest op_tests.tuning_tests.test_config_shape_collision.
  • Fused-path performance validation (--run_config) across the large-tier grid (2048–32768)
    against the naive isolated-tuner pick.

Test Result

Correctness passes at every tuned tier (cosine-gated). Collision guard passes. Large tiers
match or beat the naive isolated-tuner pick when validated end-to-end, up to −22% at the
16384-token tier; dominant-shape stage2 improves ~19.8% over the untuned fallback.

Submission Checklist

No tuned fmoe config existed for the Qwen3-VL W4A4 FP4 MoE shapes on
gfx950, so fused_moe fell back to a slower base stage2 kernel across
most token counts. Add a complete 16-tier config (tokens 1..32768)
matching the row density and completeness of peer fmoe configs, with
every row fully measured.

Small tiers (1-1024) use the isolated-tuner winners; large tiers
(2048-32768) select the cumul3 stage2 kernel
(flydsl_moe2_afp4_wfp4_bf16_t64x128x256_atomic_persist_async_w4_cumul3),
whose large-tier selection was validated on the real fused end-to-end
path rather than isolated per-kernel timing. Config-data only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@johannes-graner
johannes-graner requested review from a team and a lite review from Copilot August 14, 2026 11:04
@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; 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 4759 --add-label <label>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds complete per-model FP4 MoE (fused_moe) config coverage for Qwen3-VL on gfx950 by extending both tuned and untuned CSV shape grids to the full 16-tier padded power-of-two token set, enabling consistent best-kernel dispatch across token counts.

Changes:

  • Added a full 16-tier (1..32768) untuned shape list for Qwen3-VL FP4 MoE.
  • Added a full 16-tier tuned table with measured stage1/stage2 kernel selections and perf metrics for each tier.
  • Standardized large-tier selections onto the validated stage2 kernel for 2048–32768 tokens.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
aiter/configs/model_configs/qwen3_vl_fp4_untuned_fmoe.csv Adds the 16-tier padded token grid of Qwen3-VL FP4 MoE shapes for tuning/lookup coverage.
aiter/configs/model_configs/qwen3_vl_fp4_tuned_fmoe.csv Adds measured tuned rows per tier so fused_moe can dispatch the intended best-performing kernels across token sizes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread aiter/configs/model_configs/qwen3_vl_fp4_tuned_fmoe.csv Outdated
Adopt the 29-column peer FP4 fmoe schema (gfx-first, +xbf16/flat, per
glm5_fp4/kimik3_fp4/minimax_m3_fp4) so the target arch (gfx950) is
explicit rather than relying on the legacy cu_num->gfx backfill. Values
unchanged; collision guard passes. Addresses PR review feedback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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