Repository navigation
[FlyDSL] [gfx1250] MegaMoE: bf16-wire combine reduce reads its inputs directly - #7664
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
|
The Standard Tests (1 GPU) shard 2 failure is |
The bf16 wire has no scale plane to stage, so its reduce no longer goes through LDS: each lane loads one b128 (8 bf16) per slot for its token, all topk (+ shared) loads first, and sums them in registers. Slot rows are read non-temporal; the output store is not, since the next op reads it. The grid is sized from the token count. The quantized wires keep the existing LDS-staged reduce. Outputs are bit-identical. Co-Authored-By: Claude Opus 5.5 <[email protected]>
3ffd8d6 to
3851d21
Compare
|
CI note: the failing job (MI35X Standard Tests shard 2, https://github.com/ROCm/aiter/actions/runs/43041317469/job/130664727526) has a single failure, |
…7664) The bf16 wire has no scale plane to stage, so its reduce no longer goes through LDS: each lane loads one b128 (8 bf16) per slot for its token, all topk (+ shared) loads first, and sums them in registers. Slot rows are read non-temporal; the output store is not, since the next op reads it. The grid is sized from the token count. The quantized wires keep the existing LDS-staged reduce. Outputs are bit-identical. Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
The bf16-wire combine reduce of the gfx1250 MegaMoE fused combine reads its inputs straight from global memory instead of staging them through LDS.
Motivation
The bf16 wire has no scale plane, so the LDS round trip in its reduce buys nothing: every element is read once and summed once. Dropping it removes the LDS staging and its barrier, and lets each lane keep all of a token's slot loads in flight at once.
Changes
combine.py: new_make_combine_direct_reduceandcombine_direct_reduce_blocks. Each lane owns one b128 (8 bf16) of a token's hidden row; it issues all top-k (+ shared) loads first, then sums in registers in the same order as before. Slot rows are loaded non-temporal (read once); the output store is a normal store since the next op reads it. The grid is sized from the token count.stages/combine_fused.py: the bf16 wire (quant_bits == 0) uses the direct reduce, with and without the shared add from [FlyDSL] [gfx1250] MegaMoE: fold the shared expert output into the fused combine reduce #7661. Quantized wires keep the existing LDS-staged reduce.Validation
op_tests/multigpu_tests/test_mega_moe_gfx1250.pyimport cleanly.🤖 Generated with Claude Code