Repository navigation
[FlyDSL] Migrate mixed MoE 2-stage LDS to fly shared storage - #5317
Merged
Merged
Conversation
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]>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
coderfeli
previously approved these changes
Sep 7, 2026
coderfeli
approved these changes
Sep 8, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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