Skip to content

[FlyDSL] [CI] Add HY4 MXFP8 heterogeneous MoE fusion - #6050

Merged
valarLip merged 2 commits into
ROCm:mainfrom
qli88:hy4-mxfp8-fhmoe
Oct 15, 2026
Merged

valarLip merged 2 commits into
ROCm:mainfrom
qli88:hy4-mxfp8-fhmoe

Conversation

@qli88

@qli88 qli88 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Fuse HY4's FP8 shared expert into the routed MXFP8 MoE kernels to reduce launch and scheduling overhead, with AOT coverage, correctness guards, and reproducible gfx950 tuning.

@github-actions

github-actions Bot commented Oct 1, 2026

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
multigpu 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: 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 6050 --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.

@qli88
qli88 marked this pull request as ready for review October 1, 2026 15:06
@qli88
qli88 requested review from a team and a balanced review from Copilot October 1, 2026 15:06
@github-actions github-actions Bot changed the title [FlyDSL] Add HY4 MXFP8 heterogeneous MoE fusion [FlyDSL] [CI] Add HY4 MXFP8 heterogeneous MoE fusion Oct 1, 2026

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.

Copilot review overview

🟡 Changes recommended

The tuner can modify mismatched configuration rows, accept non-finite baselines, and one HY4 reference path disagrees with runtime clamping.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Adds gfx950 HY4 MXFP8-routed/FP8-shared heterogeneous MoE fusion, tuning, AOT coverage, and validation.

Changes:

  • Extends FlyDSL FHMoE kernels and dispatch to MXFP8 routed weights.
  • Adds HY4 tuned configurations and an offline tuner.
  • Expands correctness, AOT, pipeline, and CI coverage.
File Description
.github/​scripts/​split_tests.sh Adds tuner tests to CI splitting.
aiter/​aot/​flydsl/​fhmoe.py Enables MXFP8 FHMoE AOT compilation.
aiter/​configs/​tuned_fhmoe.csv Adds HY4 tuning rows.
aiter/​fhmoe.py Adds HY4 validation and dispatch.
aiter/​ops/​flydsl/​fhmoe.py Exposes MXFP8 and shared-clamp controls.
aiter/​ops/​flydsl/​kernels/​fhmoe.py Forwards shared-clamp specialization.
aiter/​ops/​flydsl/​kernels/​mixed_moe_gemm_2stage.py Updates module terminology.
aiter/​ops/​flydsl/​kernels/​mixed_moe_gemm_2stage_common.py Implements MXFP8 heterogeneous kernel support.
op_tests/​test_fhmoe.py Adds HY4 correctness and AOT tests.
op_tests/​tuners/​tune_fhmoe.py Adds the FHMoE tuner.
op_tests/​tuning_tests/​README.md Documents FHMoE tuning.
op_tests/​tuning_tests/​test_config_shape_collision.py Validates merged HY4 rows.
op_tests/​tuning_tests/​test_fhmoe_tuner.py Tests tuner utilities.
op_tests/​tuning_tests/​test_tune_pipeline.py Adds FHMoE pipeline smoke coverage.

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

Comment thread op_tests/test_fhmoe.py Resolved
Comment thread op_tests/tuners/tune_fhmoe.py Resolved
Comment thread op_tests/tuners/tune_fhmoe.py Resolved
Copilot AI balanced review requested due to automatic review settings October 1, 2026 17:25

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.

Copilot review overview

🟡 Changes recommended

Production prefill and reduce-mode configurations lack oracle-backed numerical coverage.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (3)

Comment thread aiter/fhmoe.py Resolved
@zufayu
zufayu requested a review from coderfeli October 2, 2026 00:33
Copilot AI balanced review requested due to automatic review settings October 2, 2026 04:25

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.

Copilot review overview

🟡 Changes recommended

The tuner crashes between token rows, and the AOT helper rejects its own default CU-count sentinel.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)

Comment thread op_tests/tuners/tune_fhmoe.py Resolved
Comment thread aiter/aot/flydsl/fhmoe.py Resolved
@qli88
qli88 marked this pull request as draft October 2, 2026 04:39
@zufayu
zufayu removed the request for review from coderfeli October 3, 2026 00:31
@qli88
qli88 force-pushed the hy4-mxfp8-fhmoe branch 2 times, most recently from 0eb320b to f2c8961 Compare October 6, 2026 19:25
@qli88
qli88 marked this pull request as ready for review October 6, 2026 19:29
Copilot AI balanced review requested due to automatic review settings October 6, 2026 19:29

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.

Copilot review overview

🔵 Needs a closer look

Unresolved split-K clamping and architecture-specific numerical changes require human review with gfx950 correctness and matched performance validation.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (3)

Comment thread aiter/ops/flydsl/fhmoe.py Resolved
Copilot AI balanced review requested due to automatic review settings October 6, 2026 19:56

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.

🔵 Needs a closer look

The extensive GPU kernel, dispatch, tuning, and AOT changes require final human review with matched gfx950 correctness and performance validation.

0 open findings

🧠 Review effort: Balanced

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.

🟡 Changes recommended

AOT generation drops the unclamped specialization and omits ordinary MoE debug variants.

2 open findings

🧠 Review effort: Balanced

Comment thread aiter/aot/flydsl/moe.py Resolved
Comment thread aiter/aot/flydsl/moe.py Resolved

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.

🟡 Changes recommended

The pipeline architecture gate uses the build override rather than live hardware, making gfx950 smoke coverage unreliable.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced

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.

🟡 Changes recommended

Architecture-detection failures can silently skip the new end-to-end FHMoE tuner coverage on gfx950 CI.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

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.

🟡 Changes recommended

Forced-reduce handling can corrupt a16w output, and large HY4 reduce buffers exceed 32-bit kernel addressing.

2 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread aiter/configs/tuned_fhmoe.csv Resolved
Comment thread aiter/fused_moe.py Resolved

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.

🟡 Changes recommended

Unrelated Triton cleanup and DSV4 retuning violate the repository’s one-backend, one-concern PR policy.

3 open findings
2 resolved since last review

🧠 Review effort: Balanced

Comment thread aiter/configs/tuned_fhmoe.csv Resolved
Comment thread aiter/fhmoe.py Resolved

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.

🔵 Needs a closer look

The unrelated DSV4 retuning and Triton test cleanup should be split into follow-up pull requests.

3 open findings

🧠 Review effort: Balanced

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.

🔵 Needs a closer look

The unrelated Triton rope test change violates the repository’s one-backend and one-concern PR rule.

0 open findings

3 resolved since last review

🧠 Review effort: Balanced

Comment thread aiter/aot/flydsl/moe.py Resolved
Comment thread aiter/aot/flydsl/moe.py Resolved

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.

🟡 Changes recommended

Existing partial output files can silently truncate the tuned configuration, and an unrelated Triton test should be split out.

1 open finding

🧠 Review effort: Balanced

Comment thread op_tests/tuners/tune_fhmoe.py Resolved

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.

🔵 Needs a closer look

The GPU kernel and dispatch changes require final gfx950 correctness and performance validation.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread op_tests/tuners/tune_fhmoe.py Resolved

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.

🔵 Needs a closer look

The low-level GPU kernel, dispatch, tuning, and AOT changes require final human review with head-matched gfx950 correctness and performance validation.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

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.

🟡 Changes recommended

The route-buffer size guard rejects valid packed-FP8 reduction shapes using an uncompressed BF16/FP16 size calculation.

1 open finding

🧠 Review effort: Balanced

Comment thread aiter/fused_moe.py Resolved

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.

🟡 Changes recommended

The new workspace preflight incorrectly skips non-common reducers that are not subject to the FlyDSL buffer limit.

2 open findings

🧠 Review effort: Balanced

Comment thread op_tests/test_moe_2stage.py Resolved

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.

🟡 Changes recommended

Quick tuning does not honor its XCD exclusion, and workspace preflight miscalculates FP8-reduce storage.

2 open findings
2 resolved since last review

🧠 Review effort: Balanced

Comment thread op_tests/test_moe_2stage.py Resolved
Comment thread op_tests/tuners/tune_fhmoe.py Resolved

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.

🟡 Changes recommended

The capability API can report support outside its gfx950-only runtime contract, leading callers into a path that later rejects execution.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced

Comment thread aiter/fhmoe.py Resolved

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.

🔵 Needs a closer look

The broad GPU-kernel, AOT, dispatch, and tuning changes require head-matched gfx950 correctness and performance validation.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

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.

🔵 Needs a closer look

GPU kernel correctness, numerical behavior, AOT cache compatibility, and tuned performance require final gfx950 hardware validation.

0 open findings

🧠 Review effort: Balanced

Comment thread aiter/aot/flydsl/common.py Resolved
Comment thread aiter/aot/flydsl/moe.py Resolved

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.

🔵 Needs a closer look

Shared dispatch, GPU kernel, and compilation changes need human confirmation backed by matched gfx950 correctness, cache-retrieval, and performance evidence.

0 open findings

🧠 Review effort: Balanced

Fuse HY4's FP8 shared expert into the routed MXFP8 MoE kernels to reduce launch and scheduling overhead, with AOT coverage, correctness guards, and reproducible gfx950 tuning.

Co-authored-by: Cursor <cursoragent@cursor.com>

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.

🟡 Changes recommended

Two AOT coverage gaps leave supported FP8 stage-2 runtime variants without matching compiled artifacts.

2 open findings

🧠 Review effort: Balanced

Comment thread aiter/aot/flydsl/moe.py Resolved
Comment thread aiter/aot/flydsl/mxfp4_moe.py Resolved

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.

🔵 Needs a closer look

Shared kernel, dispatch, and compilation changes need human review backed by gfx950 correctness, cache-retrieval, and matched performance validation.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants