Repository navigation
[FlyDSL] [gfx1250] Absorb grouped MoE GEMM1 prefill opts into mega stage-1 - #7919
Merged
Merged
Conversation
# Conflicts: # aiter/configs/tuned_grouped_fmoe.csv
Rename the benchmark to reproduce.sh and pin the validated zero-input configuration. Include standalone activation/quantization dependencies and tests so the script does not rely on stashed implementation changes. Preserve unrelated work in stash. GPU timing was not rerun for this commit.
Use normal WMMA order with operand B reuse and precomputed payload LDS bases. Initialize accumulators before the prologue TDM wait and select WPT1 for the conc16384 tuned configuration. Include the local benchmark scripts and the reproducer iteration update.
Resolve sched_vgpr through rocdl.experimental on FlyDSL 0.5.0 while retaining compatibility with the older public API. Keep strict placement enabled for prefill kernels. Validated DSV4 Pro conc16384 with three const/random runs at 32 iterations. Both GEMMs have zero scratch instructions and accumulator placement at physical v512-v1023; median const GEMM1/GEMM2 is 465.77/322.86 us.
…or 1-1024 tokens The single 16x256x256 four-wave as-prologue row left gemm1 at ~16 TB/s for decode-sized batches (three workgroup rounds, extra round at 4 tokens, and a 64-row tile that doubled weight reads at 1024 tokens). Re-swept tiles and knobs for this shape on gfx1250: narrower gemm1 tiles (tile_n 64/128) with deeper buffering for 1-32 tokens, as-prologue kept only at 64 and 256 tokens where it measures faster, and 128x256 tiles at 1024 tokens. gemm1+gemm2 vs the previous rows (test_flydsl_grouped_gemm, constant + uniform init): 1 tok 1.81x, 2 1.11x, 4 1.25x, 8-256 1.12-1.16x, 512 1.08x, 1024 1.38x; >= 2048 unchanged.
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
…buckets - Pin VGPRs only for the 2x2 256^3 tile; S1F's 1x4 256 variant overflowed the map. - S1F GEMM1 warp grid per tile_m (2x2 at 256, AITER_MEGA_S1F_WARPS override) and pass the GEMM kernel_attrs to the S1F launch. - DSV4.1 Flash E96 rows: GEMM2 next_stage_prefetch + lds_soa_load_interleave at 8192+, add the missing 131072 bucket (tpr 32768: 3783 -> 3258 us/layer). Co-authored-by: Cursor <[email protected]>
… buckets The stage-1 producer writes the M16 packed A layout, and the 256-row GEMM1 turns on a_preshuffle, lds_soa and next_stage_prefetch together with the grouped-MoE prefill schedule. This runs only when the recv bound is at least 65536, which for EP4 top-6 is tpr 16384 and 32768. Payload and scale use separate buffer resources so the masked store sentinel stays out of range. DSV4.1 Flash EP4, 8-layer graph: 1654 vs 1704 us/layer at tpr 16384 (-2.9%) and 3111 vs 3258 at tpr 32768 (-4.5%). Smaller buckets stay on the 128-tile path. Co-authored-by: Cursor <[email protected]>
4 of 10 tasks
Boss2002n
added a commit
that referenced
this pull request
Nov 16, 2026
…age-1 (#7919) * Optimize FlyDSL grouped MoE kernels * improve test * support a preshuffle * add csv support * update quant and shuffle * update * update mega-moe * update * update csv * update * simplify code * fix accuracy drop * update csv * fix format * fix(flydsl): align A-preshuffle guards and AOT coverage * improve cs test * fix ruff * Tune conc16384 benchmark with WPT2 and cluster sync disabled * Add standalone conc16384 GEMM1 performance reproducer Rename the benchmark to reproduce.sh and pin the validated zero-input configuration. Include standalone activation/quantization dependencies and tests so the script does not rely on stashed implementation changes. Preserve unrelated work in stash. GPU timing was not rerun for this commit. * Tune grouped MoE LDS scheduling and prologue initialization Use normal WMMA order with operand B reuse and precomputed payload LDS bases. Initialize accumulators before the prologue TDM wait and select WPT1 for the conc16384 tuned configuration. Include the local benchmark scripts and the reproducer iteration update. * Pin FlyDSL WMMA scale registers to disjoint low VGPR slots * update * update * update * remove useless tests * add script * update script * update script and wheel * update * update1 * update * Fix LDS helper shadowing after GEMM task refactor * Simplify gfx1250 prefill scheduling and add reproducible MoE benchmarks * Keep local GPU benchmark scripts and microtests out of the branch * Restore LDS layout controls and decouple interleaving from scheduling * Fix strict VGPR pinning with FlyDSL 0.5.0 Resolve sched_vgpr through rocdl.experimental on FlyDSL 0.5.0 while retaining compatibility with the older public API. Keep strict placement enabled for prefill kernels. Validated DSV4 Pro conc16384 with three const/random runs at 32 iterations. Both GEMMs have zero scratch instructions and accumulator placement at physical v512-v1023; median const GEMM1/GEMM2 is 465.77/322.86 us. * update for ds flash v4.1 * Tune DSV4.1 Flash 8192 prefill configuration * update for release * add csv * update csv * update csv for dsr1 fused expert * Move DSR1 grouped MoE configs into a dedicated CSV * remove useless csv * update csv * [FlyDSL] Simplify prefill WMMA emission and barriers * Tune DSR1 65-expert (64 routed + 1 shared, topk 9) grouped MoE rows for 1-1024 tokens The single 16x256x256 four-wave as-prologue row left gemm1 at ~16 TB/s for decode-sized batches (three workgroup rounds, extra round at 4 tokens, and a 64-row tile that doubled weight reads at 1024 tokens). Re-swept tiles and knobs for this shape on gfx1250: narrower gemm1 tiles (tile_n 64/128) with deeper buffering for 1-32 tokens, as-prologue kept only at 64 and 256 tokens where it measures faster, and 128x256 tiles at 1024 tokens. gemm1+gemm2 vs the previous rows (test_flydsl_grouped_gemm, constant + uniform init): 1 tok 1.81x, 2 1.11x, 4 1.25x, 8-256 1.12-1.16x, 512 1.08x, 1024 1.38x; >= 2048 unchanged. * Simplify FlyDSL KSL0 fence configuration and kernel symbols * Merge PR #5899 (zxe/mega_stage1_compact_overlap) for local benchmarking Co-authored-by: Cursor <[email protected]> * mega: adapt S1F/GEMM2 to the MoE prefill path, tune DSV4.1 Flash EP4 buckets - Pin VGPRs only for the 2x2 256^3 tile; S1F's 1x4 256 variant overflowed the map. - S1F GEMM1 warp grid per tile_m (2x2 at 256, AITER_MEGA_S1F_WARPS override) and pass the GEMM kernel_attrs to the S1F launch. - DSV4.1 Flash E96 rows: GEMM2 next_stage_prefetch + lds_soa_load_interleave at 8192+, add the missing 131072 bucket (tpr 32768: 3783 -> 3258 us/layer). Co-authored-by: Cursor <[email protected]> * [FlyDSL] [gfx1250] Pack GEMM1 A inside mega stage-1 for large prefill buckets The stage-1 producer writes the M16 packed A layout, and the 256-row GEMM1 turns on a_preshuffle, lds_soa and next_stage_prefetch together with the grouped-MoE prefill schedule. This runs only when the recv bound is at least 65536, which for EP4 top-6 is tpr 16384 and 32768. Payload and scale use separate buffer resources so the masked store sentinel stays out of range. DSV4.1 Flash EP4, 8-layer graph: 1654 vs 1704 us/layer at tpr 16384 (-2.9%) and 3111 vs 3258 at tpr 32768 (-4.5%). Smaller buckets stay on the 128-tile path. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: yadaish <[email protected]> Co-authored-by: JiaoliangYu <[email protected]> Co-authored-by: lalala-sh <[email protected]> Co-authored-by: hyi <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: XingerZhu <[email protected]>
XingerZhu
added a commit
that referenced
this pull request
Nov 20, 2026
…age-1 (#7919) * Optimize FlyDSL grouped MoE kernels * improve test * support a preshuffle * add csv support * update quant and shuffle * update * update mega-moe * update * update csv * update * simplify code * fix accuracy drop * update csv * fix format * fix(flydsl): align A-preshuffle guards and AOT coverage * improve cs test * fix ruff * Tune conc16384 benchmark with WPT2 and cluster sync disabled * Add standalone conc16384 GEMM1 performance reproducer Rename the benchmark to reproduce.sh and pin the validated zero-input configuration. Include standalone activation/quantization dependencies and tests so the script does not rely on stashed implementation changes. Preserve unrelated work in stash. GPU timing was not rerun for this commit. * Tune grouped MoE LDS scheduling and prologue initialization Use normal WMMA order with operand B reuse and precomputed payload LDS bases. Initialize accumulators before the prologue TDM wait and select WPT1 for the conc16384 tuned configuration. Include the local benchmark scripts and the reproducer iteration update. * Pin FlyDSL WMMA scale registers to disjoint low VGPR slots * update * update * update * remove useless tests * add script * update script * update script and wheel * update * update1 * update * Fix LDS helper shadowing after GEMM task refactor * Simplify gfx1250 prefill scheduling and add reproducible MoE benchmarks * Keep local GPU benchmark scripts and microtests out of the branch * Restore LDS layout controls and decouple interleaving from scheduling * Fix strict VGPR pinning with FlyDSL 0.5.0 Resolve sched_vgpr through rocdl.experimental on FlyDSL 0.5.0 while retaining compatibility with the older public API. Keep strict placement enabled for prefill kernels. Validated DSV4 Pro conc16384 with three const/random runs at 32 iterations. Both GEMMs have zero scratch instructions and accumulator placement at physical v512-v1023; median const GEMM1/GEMM2 is 465.77/322.86 us. * update for ds flash v4.1 * Tune DSV4.1 Flash 8192 prefill configuration * update for release * add csv * update csv * update csv for dsr1 fused expert * Move DSR1 grouped MoE configs into a dedicated CSV * remove useless csv * update csv * [FlyDSL] Simplify prefill WMMA emission and barriers * Tune DSR1 65-expert (64 routed + 1 shared, topk 9) grouped MoE rows for 1-1024 tokens The single 16x256x256 four-wave as-prologue row left gemm1 at ~16 TB/s for decode-sized batches (three workgroup rounds, extra round at 4 tokens, and a 64-row tile that doubled weight reads at 1024 tokens). Re-swept tiles and knobs for this shape on gfx1250: narrower gemm1 tiles (tile_n 64/128) with deeper buffering for 1-32 tokens, as-prologue kept only at 64 and 256 tokens where it measures faster, and 128x256 tiles at 1024 tokens. gemm1+gemm2 vs the previous rows (test_flydsl_grouped_gemm, constant + uniform init): 1 tok 1.81x, 2 1.11x, 4 1.25x, 8-256 1.12-1.16x, 512 1.08x, 1024 1.38x; >= 2048 unchanged. * Simplify FlyDSL KSL0 fence configuration and kernel symbols * Merge PR #5899 (zxe/mega_stage1_compact_overlap) for local benchmarking Co-authored-by: Cursor <[email protected]> * mega: adapt S1F/GEMM2 to the MoE prefill path, tune DSV4.1 Flash EP4 buckets - Pin VGPRs only for the 2x2 256^3 tile; S1F's 1x4 256 variant overflowed the map. - S1F GEMM1 warp grid per tile_m (2x2 at 256, AITER_MEGA_S1F_WARPS override) and pass the GEMM kernel_attrs to the S1F launch. - DSV4.1 Flash E96 rows: GEMM2 next_stage_prefetch + lds_soa_load_interleave at 8192+, add the missing 131072 bucket (tpr 32768: 3783 -> 3258 us/layer). Co-authored-by: Cursor <[email protected]> * [FlyDSL] [gfx1250] Pack GEMM1 A inside mega stage-1 for large prefill buckets The stage-1 producer writes the M16 packed A layout, and the 256-row GEMM1 turns on a_preshuffle, lds_soa and next_stage_prefetch together with the grouped-MoE prefill schedule. This runs only when the recv bound is at least 65536, which for EP4 top-6 is tpr 16384 and 32768. Payload and scale use separate buffer resources so the masked store sentinel stays out of range. DSV4.1 Flash EP4, 8-layer graph: 1654 vs 1704 us/layer at tpr 16384 (-2.9%) and 3111 vs 3258 at tpr 32768 (-4.5%). Smaller buckets stay on the 128-tile path. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: yadaish <[email protected]> Co-authored-by: JiaoliangYu <[email protected]> Co-authored-by: lalala-sh <[email protected]> Co-authored-by: hyi <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: XingerZhu <[email protected]>
junhaha666
pushed a commit
that referenced
this pull request
Nov 26, 2026
* [FlyDSL] [gfx1250] Absorb grouped MoE GEMM1 prefill opts into mega stage-1 (#7919) * Optimize FlyDSL grouped MoE kernels * improve test * support a preshuffle * add csv support * update quant and shuffle * update * update mega-moe * update * update csv * update * simplify code * fix accuracy drop * update csv * fix format * fix(flydsl): align A-preshuffle guards and AOT coverage * improve cs test * fix ruff * Tune conc16384 benchmark with WPT2 and cluster sync disabled * Add standalone conc16384 GEMM1 performance reproducer Rename the benchmark to reproduce.sh and pin the validated zero-input configuration. Include standalone activation/quantization dependencies and tests so the script does not rely on stashed implementation changes. Preserve unrelated work in stash. GPU timing was not rerun for this commit. * Tune grouped MoE LDS scheduling and prologue initialization Use normal WMMA order with operand B reuse and precomputed payload LDS bases. Initialize accumulators before the prologue TDM wait and select WPT1 for the conc16384 tuned configuration. Include the local benchmark scripts and the reproducer iteration update. * Pin FlyDSL WMMA scale registers to disjoint low VGPR slots * update * update * update * remove useless tests * add script * update script * update script and wheel * update * update1 * update * Fix LDS helper shadowing after GEMM task refactor * Simplify gfx1250 prefill scheduling and add reproducible MoE benchmarks * Keep local GPU benchmark scripts and microtests out of the branch * Restore LDS layout controls and decouple interleaving from scheduling * Fix strict VGPR pinning with FlyDSL 0.5.0 Resolve sched_vgpr through rocdl.experimental on FlyDSL 0.5.0 while retaining compatibility with the older public API. Keep strict placement enabled for prefill kernels. Validated DSV4 Pro conc16384 with three const/random runs at 32 iterations. Both GEMMs have zero scratch instructions and accumulator placement at physical v512-v1023; median const GEMM1/GEMM2 is 465.77/322.86 us. * update for ds flash v4.1 * Tune DSV4.1 Flash 8192 prefill configuration * update for release * add csv * update csv * update csv for dsr1 fused expert * Move DSR1 grouped MoE configs into a dedicated CSV * remove useless csv * update csv * [FlyDSL] Simplify prefill WMMA emission and barriers * Tune DSR1 65-expert (64 routed + 1 shared, topk 9) grouped MoE rows for 1-1024 tokens The single 16x256x256 four-wave as-prologue row left gemm1 at ~16 TB/s for decode-sized batches (three workgroup rounds, extra round at 4 tokens, and a 64-row tile that doubled weight reads at 1024 tokens). Re-swept tiles and knobs for this shape on gfx1250: narrower gemm1 tiles (tile_n 64/128) with deeper buffering for 1-32 tokens, as-prologue kept only at 64 and 256 tokens where it measures faster, and 128x256 tiles at 1024 tokens. gemm1+gemm2 vs the previous rows (test_flydsl_grouped_gemm, constant + uniform init): 1 tok 1.81x, 2 1.11x, 4 1.25x, 8-256 1.12-1.16x, 512 1.08x, 1024 1.38x; >= 2048 unchanged. * Simplify FlyDSL KSL0 fence configuration and kernel symbols * Merge PR #5899 (zxe/mega_stage1_compact_overlap) for local benchmarking Co-authored-by: Cursor <[email protected]> * mega: adapt S1F/GEMM2 to the MoE prefill path, tune DSV4.1 Flash EP4 buckets - Pin VGPRs only for the 2x2 256^3 tile; S1F's 1x4 256 variant overflowed the map. - S1F GEMM1 warp grid per tile_m (2x2 at 256, AITER_MEGA_S1F_WARPS override) and pass the GEMM kernel_attrs to the S1F launch. - DSV4.1 Flash E96 rows: GEMM2 next_stage_prefetch + lds_soa_load_interleave at 8192+, add the missing 131072 bucket (tpr 32768: 3783 -> 3258 us/layer). Co-authored-by: Cursor <[email protected]> * [FlyDSL] [gfx1250] Pack GEMM1 A inside mega stage-1 for large prefill buckets The stage-1 producer writes the M16 packed A layout, and the 256-row GEMM1 turns on a_preshuffle, lds_soa and next_stage_prefetch together with the grouped-MoE prefill schedule. This runs only when the recv bound is at least 65536, which for EP4 top-6 is tpr 16384 and 32768. Payload and scale use separate buffer resources so the masked store sentinel stays out of range. DSV4.1 Flash EP4, 8-layer graph: 1654 vs 1704 us/layer at tpr 16384 (-2.9%) and 3111 vs 3258 at tpr 32768 (-4.5%). Smaller buckets stay on the 128-tile path. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: yadaish <[email protected]> Co-authored-by: JiaoliangYu <[email protected]> Co-authored-by: lalala-sh <[email protected]> Co-authored-by: hyi <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: XingerZhu <[email protected]> * [FlyDSL] [gfx1250] Defer the mega GEMM2 EP-scatter wait; tune DSV4.1 EP4 buckets A persistent bf16 EP scatter now stages its rows in the last pipeline stage and skips the tensor_wait after the remote gather-store (defer_c_wait): the next tile's first fence retires it and the persistent loop drains at exit. It turns on by itself when the rows fit there (tile_m > 32, > 2 buffers, no planar LDS / A-scale prologue / k_waves); AITER_FLYDSL_EP_DEFER_C_WAIT=0 turns it off. DSV4.1-Flash EP4 a4w4 fp4-wire, mega S1F+S2F, uniform routing, 3x A/B: - tpr 512 (token 2048): persistent_workers2=512 -> GEMM2 57.6 -> 55.2 us, layer 217.0 -> 214.7 us (-1.1%). - tpr 1024 (token 4096): num_buffer_stage2=3 -> GEMM2 81.2 -> 78.9 us. Accuracy (layers=2) PASS at both with an unchanged logits_diff. Co-authored-by: Cursor <[email protected]> * [FlyDSL] [gfx1250] Skip pinned VGPRs when the prefill slot exceeds 128 dwords FP4 256x256 at 1x4 needs 160 dwords and asserts in make_rmem_slot. Gate the explicit map on the same slot width, so that shape stays on the ordinary allocator while 2x2 (128 dwords) keeps the pinned schedule. Co-authored-by: Cursor <[email protected]> * [FlyDSL] [gfx1250] Prefetch kernel code past the launch window A launch preloads only the first ~32 KiB of a kernel into the instruction cache. The S1F tile-256 kernel (~46 KiB) and the stage-1 GEMM (up to ~62 KiB) ran their tails cold whenever another large kernel had evicted them, so UT gains did not always show up end to end. Add prefetch_kernel_code(num_waves) to gemm_common_gfx1250, following #7827: set MODE.SCALAR_PREFETCH_EN through llvm.amdgcn.s.setreg, find the kernel span with s_getpc_b64 and .Lfunc_end0, and have each wave issue every num_waves-th 4 KiB s_prefetch_inst chunk up to 56 KiB, without branches. S1F replaces its old inline-asm prefetch, which was a no-op without MODE[24]; the a8w4 TDM GEMM calls it at kernel entry and tags the kernel name with _ipf. AITER_FLYDSL_INST_PREFETCH=0 turns it off. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Satya Nikhil Kodukula <[email protected]> Co-authored-by: yadaish <[email protected]> Co-authored-by: JiaoliangYu <[email protected]> Co-authored-by: lalala-sh <[email protected]> Co-authored-by: hyi <[email protected]> Co-authored-by: Cursor <[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.
Summary
Bring the grouped-MoE GEMM1 prefill path into mega stage-1 (S1F) on top of
zxe/mega_update_moe. For large EP4 top-6 buckets the stage-1 producer writes the M16 packed A layout, and GEMM1 runs the same 256³ 2×2 prefill schedule as grouped MoE:a_preshuffle,lds_soa_load_interleave,next_stage_prefetch, pinned VGPRs, and WMMA 2×4.On DSV4.1 Flash, 4×gfx1250, EP4, E384, top-6, hidden 5120, intermediate 2304, A4W4 MXFP4, fp4 dispatch, stage-1 and stage-2 fused, 8-layer graph:
Motivation
Grouped MoE prefill GEMM1 (the 256³ rows in #7726) is faster because packed A lets the TDM loads, LDS SoA interleave, and next-stage prefetch fire together. Mega stage-1 was still producing row-major wire rows, so those options did not apply. Turning the flags on without the packed layout did not recover the gain.
Changes
(M/16, K/128, 4, 16, 16B)plus row-major e8m0 scales, using masked VMEM stores. A TDM store would clobber 128 B blocks shared by several runs. Payload and scale are separate buffer resources so the masked-lane offset0x7FFFFFFFstays out of range; one resource for the whole region is about 2.21 GB at tpr 32768 and made every masked lane a real system-scope store (~50 ms).mxfp4_preshuffle_gfx1250_tdm.py(wmma_2x4, explicit VGPR partition,ds_group=3,mma_group=2, KSL fences, TDM early timeout), plusa_preshuffle,lds_soa, andnext_stage_prefetch.s1f_prefill_tilesays so. For EP4 top-6 that is recv bound ≥ 65536, i.e. tpr 16384 and 32768. The plan alignment follows the same threshold.AITER_MEGA_S1F_PREFILL_RECV=0turns it off.out_preshuffled=0). Grouped MoE can pack that output too; on the standalone fused MoE it did not change the time, and mega GEMM2 still reads the row-major wire.num_buffers=4: planar LDS for four stages is about 328 KB, over the 320 KB per-CU budget. S1F keeps 3 buffers.cluster2×2 / 4×2: S1F usesexplicit_tileand persistent workers, and that GEMM mode requirescluster_m = cluster_n = 1.next_stage_prefetch+lds_soaon the DSV4.1 Flash E96 rows, and the missing 131072 grouped-GEMM bucket.Performance (if applicable)
S1F / GEMM2 device time on the same 8-layer runs: tpr 16384 is 632 / 575 µs, tpr 32768 is 1160 / 1126 µs. Before the buffer split, tpr 32768 S1F was about 50 ms.
Testing
bench_mega_moe.py--acc_verify 1on 4× gfx1250, same shape, layers=2: PASS at tpr 8, 8192, 16384, and 32768 (avg logits diff ≈ 0.0423, tol 0.0636). The 16-point tpr sweep above is--layers 8 --warmup 5 --iters 5. No MI250X or MI300X run; this kernel is gfx1250.Documentation
The new behavior is an internal schedule of the existing mega stage-1 launch, gated by the recv bound. The env override
AITER_MEGA_S1F_PREFILL_RECVis documented ons1f_prefill_tile.Dependencies
Breaking Changes
None. Buckets below the recv threshold keep the previous 128-tile stage-1 kernel.
AITER_MEGA_S1F_PREFILL_RECV=0disables the 256-tile packed path.PR Self-Review
Reviewed revision
ff2637a
Behavior and intent
Large prefill steps of mega stage-1 now consume packed A and the grouped-MoE GEMM1 prefill schedule. The previous row-major compact layout could not use those loads, so the same flags did not speed S1F up. Smaller steps are unchanged.
Validation and unverified scope
Accuracy and the 16-point latency sweep were run on 4× gfx1250 as listed above. Not run: MI250X, MI300X, non-uniform routing, EP sizes other than 4, and top-k other than 6.
num_buffers=4and GEMM1 clustering were not enabled; both conflict with the current S1F LDS budget or persistent-tile contract.PR-specific question
No automated self-review question is available at submission. The change is limited to the gfx1250 mega stage-1 prefill schedule and the GEMM1 output-layout switch that lets S1F keep a row-major quant output while reading packed A.
Changed op tests
None in ff2637a. The branch diff against
zxe/mega_update_moestill contains the grouped-GEMM test updates that arrived with the prefill kernel; mega stage-1 itself is checked byop_tests/multigpu_tests/bench_mega_moe.py --acc_verify 1.Made with Cursor