Skip to content

[Config] [MoE] Add DeepSeek-V4.1-Flash EP8 fused-MoE rows for gfx950 - #7731

Merged
yifehuan merged 1 commit into
ROCm:mainfrom
yhl-amd:hyi/dsv41-ep8-fmoe-all-buckets
Nov 11, 2026
Merged

yifehuan merged 1 commit into
ROCm:mainfrom
yhl-amd:hyi/dsv41-ep8-fmoe-all-buckets

Conversation

@yhl-amd

@yhl-amd yhl-amd commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

DeepSeek-V4.1-Flash served with expert parallelism over 8 GPUs runs the routed MoE with shape 5120 x 2304, 48 local experts, top-6, FP8 activations x FP4 weights (per_1x32), interleaved gate/up. Its DSpark draft model uses the same layout with 16 local experts, top-3. dsv41_fp8fp4_tuned_fmoe.csv has no rows for either shape, so the server logs no tuned FlyDSL config ... using heuristic FlyDSL fallback for every token bucket and both decode and prefill run the default FlyDSL tiles.

Technical Details

  • aiter/configs/model_configs/dsv41_fp8fp4_tuned_fmoe.csv
    • Main MoE (48 experts, top-6): rows for token buckets 8 to 16384. In this deployment the token key is the padded EP receive-buffer row count, so decode lands in the 2048 bucket and prefill chunks in 4096/8192.
    • Draft MoE (16 experts, top-3): rows for token buckets 64 to 4096.
    • Small and mid buckets use FlyDSL block_m 32, the 2048/4096 buckets block_m 64; the 8192/16384 buckets use the OPUS stage 1 with a FlyDSL stage 2. Stage 1 uses the fused intermediate quant (_fp8) variant.
  • aiter/configs/model_configs/dsv41_bf16_tuned_gemm.csv: retuned the M=192 bucket of the router GEMM (N=384, K=5120).
  • Candidates were timed with routing sampled from real per-expert load distributions (several skew levels), stage-1 x stage-2 pairs re-timed together.
  • Config-only change; no kernel, API or environment-variable change. Existing rows are untouched apart from the single router-GEMM row.

Test Plan

  • Kernel level: old (heuristic fallback) vs new rows on the same weights and routing, every bucket; correctness against an fp32 reference, poisoned padding rows (NaN / large values) must not leak into valid rows, 0 / 1 / non-power-of-two tokens per expert, run-to-run determinism.
  • Table lookup: with the patch applied to a clean image, the fused-MoE lookup hits a tuned row for every bucket of both shapes (no fallback warning).
  • End to end: DeepSeek-V4.1-Flash EP8 (DP attention), DSpark, agentic serving benchmark, old vs new rows on the same image.
  • Accuracy: GSM8K 3-shot, full 1319.

Test Result

  • Kernel level: the new rows are faster than the fallback in every bucket; correctness checks pass with error no worse than the fallback.
  • End to end: higher decode throughput, prefill step time lower.
  • GSM8K within run-to-run noise of the baseline.

🤖 Generated with Claude Code

The EP8 shape of DeepSeek-V4.1-Flash (5120 x 2304, 48 local experts,
top-6, FP8 activations x FP4 weights) and its DSpark draft MoE (16 local
experts, top-3) had no rows in dsv41_fp8fp4_tuned_fmoe.csv, so every
token bucket fell back to the heuristic FlyDSL kernels. Add tuned rows
for all buckets of both shapes, and retune the M=192 bucket of the
router GEMM (N=384, K=5120) in dsv41_bf16_tuned_gemm.csv.

Config-only change; no kernel, API or environment-variable change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@yhl-amd
yhl-amd requested a review from a team November 10, 2026 10:33
@yhl-amd yhl-amd added the Config label Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
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 Radeon R9700 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 7731 --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.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

@aiter-bot

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision e030b41a0e40 · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. Which exact workload keys consume these configuration changes, and what evidence shows that unrelated shapes keep their previous selection?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — missing ### Reviewed revision in the PR description
  • FAIL — missing ### Behavior and intent in the PR description
  • FAIL — missing ### Validation and unverified scope in the PR description
  • FAIL — missing ### PR-specific question in the PR description
  • FAIL — missing ### Changed op tests in the PR description
  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA
  • FAIL — Behavior and intent has no substantive answer
  • FAIL — Validation and unverified scope has no substantive answer
  • FAIL — PR-specific question has no substantive answer

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@yifehuan yifehuan 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.

LGTM

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