Skip to content

[FlyDSL] Migrate mixed MoE 2-stage LDS to fly shared storage - #5317

Merged
coderfeli merged 1 commit into
mainfrom
xudong/flydsl-moe-2stage-lds-fly
Sep 8, 2026
Merged

coderfeli merged 1 commit into
mainfrom
xudong/flydsl-moe-2stage-lds-fly

Conversation

@xudoyuan

@xudoyuan xudoyuan commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Replace legacy SmemAllocator/SmemPtr (builtin memref) with fly-shared storage (@fx.struct + SharedAllocator) and fly ptr_load/ptr_store/ recast_iter across both stage1 and stage2 builders. Rewrite the LDS consumers (lds_store_*_xor16, c_shuffle_epilog) to fly-dialect ops. Preserve the LDS byte layout and occupancy padding.

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

Replace legacy SmemAllocator/SmemPtr (builtin memref) with fly-shared
storage (@fx.struct + SharedAllocator) and fly ptr_load/ptr_store/
recast_iter across both stage1 and stage2 builders. Rewrite the LDS
consumers (lds_store_*_xor16, c_shuffle_epilog) to fly-dialect ops.
Preserve the LDS byte layout and occupancy padding.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@xudoyuan
xudoyuan requested a review from a team September 7, 2026 14:29
@github-actions

github-actions Bot commented Sep 7, 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; main branch always runs both MI35X and MI300X
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 5317 --add-label <label>

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 opt this PR out.

coderfeli
coderfeli previously approved these changes Sep 7, 2026
@xudoyuan xudoyuan removed the ci:all label Sep 7, 2026
@coderfeli
coderfeli self-requested a review September 7, 2026 14:59
@coderfeli
coderfeli dismissed their stale review September 7, 2026 14:59

wait for ci

@coderfeli
coderfeli merged commit ebcc28f into main Sep 8, 2026
93 of 101 checks passed
@coderfeli
coderfeli deleted the xudong/flydsl-moe-2stage-lds-fly branch September 8, 2026 01:38
coderfeli added a commit that referenced this pull request Sep 8, 2026
Brings in #5317 ("migrate mixed MoE 2-stage LDS to fly shared storage"), which
touches the same two files as the vector.py shim removal.

Conflict resolution (24 hunks) takes main's side throughout: #5317 replaces the
LDS memref API (fx.Vector.load / .store on a memref + an explicit vec_ty) with
the pointer API (fx.ptr_load / fx.ptr_store on lds_ptr), which supersedes the
shim migration's version of those same statements. The dead-code deletion and
the dropped injected vector/arith parameters in mfma_preshuffle_pipeline.py are
preserved (they auto-merged cleanly).

Two fixups on top of main's side:
  - main's LDS A-tile load still calls vector.extract(), the shim this branch
    deletes. Replaced with fx.Vector indexing: bitcast(fx.Int64) then [0]/[1],
    dropping the now-needless .ir_value().
  - dropped a dead `T.vec(vec16_elems, x_elem)` expression statement and the
    vec2_i64 / f32_t locals left unused by the resolution.

Validation: AOT compile 569/569 kernel variants; a8w4 34/34 and a16wfp4 12/12;
the a4w4 fp4-quant path exits clean; ruff and black clean.

Co-Authored-By: Claude <[email protected]>
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.

2 participants