Skip to content

feat(dsv4): mxscale/MoE gfx1250 optimization - #4150

Merged
yadaish merged 2 commits into
mainfrom
dev/yandai_dsv4_optimization
Jul 10, 2026
Merged

yadaish merged 2 commits into
mainfrom
dev/yandai_dsv4_optimization

Conversation

@yadaish

@yadaish yadaish commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@yadaish
yadaish requested a review from a team July 9, 2026 05:08
@github-actions

github-actions Bot commented Jul 9, 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: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 4150 --add-label <label>

Comment thread op_tests/test_moe_2stage.py Resolved
Comment thread op_tests/test_moe_2stage.py Resolved
@yadaish yadaish closed this Jul 9, 2026
@yadaish yadaish reopened this Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 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: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 4150 --add-label <label>

@yadaish
yadaish force-pushed the dev/yandai_dsv4_optimization branch from c9e9172 to c219884 Compare July 9, 2026 06:55
FlyDSL mxscale/MoE optimization for gfx1250, squashed:
- mxscale-gemm: .cg weight TDM cache policy, gemm1 fused quant+preshuffle,
  tdm_as_in_prologue LDS reclaim, WST shared cache modifier
- grouped MoE gemm; moe_gather_reduce on main's base + fp32 route weights
- moe_contiguous_psum on main's base + build_moe_route_psum_fused_module
- NaN/Inf-robust fused grouped quant; arch-aware moe_shuffle_weight
- AITER_MOE_NUM_EXPERT_ACTIVATED; tuner configs; op_tests

Co-authored-by: xzhu <[email protected]>
Co-authored-by: lalala-sh <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@yadaish
yadaish force-pushed the dev/yandai_dsv4_optimization branch from c219884 to c33d142 Compare July 9, 2026 07:50
Drop the weight-TDM .cg cache policy entirely: the TDM_CG_CACHE_POLICY
constant + AITER_MXSCALE_TDM_CG_CACHE_POLICY env var, the make_desc_b tag,
the wst_active_load helper, the inline prologue/loop B-descriptor tagging,
and the dual_b cache_policy args. gemm_common's issue_tdm_loads reverts to
main (no per-descriptor cache_policy). No quantize/amax changes here.

Co-authored-by: xzhu <[email protected]>
Co-authored-by: lalala-sh <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@zufayu
zufayu self-requested a review July 10, 2026 01:49
@yadaish
yadaish merged commit 8f86aad into main Jul 10, 2026
66 of 67 checks passed
@yadaish
yadaish deleted the dev/yandai_dsv4_optimization branch July 10, 2026 03:09
JiaLuo-CAN pushed a commit that referenced this pull request Jul 12, 2026
* feat(dsv4): mxscale/MoE gfx1250 optimization

FlyDSL mxscale/MoE optimization for gfx1250, squashed:
- mxscale-gemm: .cg weight TDM cache policy, gemm1 fused quant+preshuffle,
  tdm_as_in_prologue LDS reclaim, WST shared cache modifier
- grouped MoE gemm; moe_gather_reduce on main's base + fp32 route weights
- moe_contiguous_psum on main's base + build_moe_route_psum_fused_module
- NaN/Inf-robust fused grouped quant; arch-aware moe_shuffle_weight
- AITER_MOE_NUM_EXPERT_ACTIVATED; tuner configs; op_tests

Co-authored-by: xzhu <[email protected]>
Co-authored-by: lalala-sh <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* refactor(dsv4): remove TDM .cg cache-modifier support from mxscale gemm

Drop the weight-TDM .cg cache policy entirely: the TDM_CG_CACHE_POLICY
constant + AITER_MXSCALE_TDM_CG_CACHE_POLICY env var, the make_desc_b tag,
the wst_active_load helper, the inline prologue/loop B-descriptor tagging,
and the dual_b cache_policy args. gemm_common's issue_tdm_loads reverts to
main (no per-descriptor cache_policy). No quantize/amax changes here.

Co-authored-by: xzhu <[email protected]>
Co-authored-by: lalala-sh <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: xzhu <[email protected]>
Co-authored-by: lalala-sh <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
@yadaish yadaish self-assigned this Jul 14, 2026
zhiding512 added a commit that referenced this pull request Oct 15, 2026
The test cast fused_topk's route weights to bf16, which the gfx1250
gather-reduce required until it learned to read fp32 weights natively
(#4150). Serving passes fp32 route weights, and so does the replay, so
the cache holds only the fp32 gather-reduce and the test, which runs
run-only by default, missed launch_moe_gather_reduce on every row.

The bf16 and f16 weights the EP route kernel writes for gather-reduce
are still exercised, now by the gather-reduce sweep of
test_flydsl_moe_aux.py, which until now read only fp32 weights.

Signed-off-by: zhimding <[email protected]>
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