Repository navigation
[FlyDSL] Modularize MI308 MoE kernels (1/3) - #5795
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
e6955e4 to
0d1a83a
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved cache, batch-1 compilation, environment override, and runtime configuration issues remain.
Review effort: Lite
Findings: 2
Open (3)
What changed in this PR
Modularizes the MI308 FlyDSL MoE kernels into reusable kernel, quantization, reduction, and helper modules.
Changes:
- Splits the monolithic implementation into an architecture-neutral package.
- Updates fused-MoE dispatch and shared utilities.
- Removes legacy gfx942 kernel and utility modules.
| File | Summary |
|---|---|
aiter/ops/flydsl/kernels/moe_gemm_2stage/quant.py |
FP8 quantization kernels |
aiter/ops/flydsl/kernels/moe_gemm_2stage/moe_reduce.py |
Routing reduction kernels |
aiter/ops/flydsl/kernels/moe_gemm_2stage/gemm2.py |
Down kernels and dispatch |
aiter/ops/flydsl/kernels/moe_gemm_2stage/gemm1.py |
Gate/Up kernels |
aiter/ops/flydsl/kernels/moe_gemm_2stage/common.py |
Shared layouts, numerics, and helpers |
aiter/ops/flydsl/kernels/moe_gemm_2stage/__init__.py |
Package exports and dispatch API |
aiter/ops/flydsl/kernels/moe_gemm_2stage_gfx942.py |
Removed legacy monolithic implementation |
aiter/ops/flydsl/kernels/moe_gemm_2stage_gfx942_utils.py |
Removed legacy utilities |
aiter/ops/flydsl/fused_moe_gfx942.py |
Updated imports and compilation dispatch |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🔵 Needs a closer look
Performance-sensitive kernel and dispatch refactoring warrants final human review.
0 open findings
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
|
Regression check:
|


Summary
This PR is a follow-up to #3987 — Add FlyDSL FP8 MoE kernels (decode weight-decompression + prefill) for MI308 — Qwen3.5-35B/397B, Hunyuan3.
It modularizes the already-merged implementation to improve maintainability and prepare for further optimization. This is part 1/3 of the original split; Down and B2–8 optimizations are deferred to separate PRs, pending approval of this refactor.
Changes
Validation
Locally validated on MI308X (gfx942) with ROCm 7.2.4 and FlyDSL 0.3.4.1. All 202 shapes passed correctness checks on both revisions after independent tuning. Overall GPU latency remained essentially unchanged (+0.20%, RTA mode).