Repository navigation
Conversation
Expose a dense MXFP4 GEMM through the FlyDSL preshuffle path, mirroring
gemm_a8w8_bpreshuffle_flydsl. The underlying kernel (compile_preshuffle_gemm_a8,
in_dtype=fp4 -> CDNA4 mfma_scale_f32_16x16x128_f8f6f4) already existed; this
wires up the dense entrypoint that was previously only available for a8w8 and
for the a4w4 MoE stages.
- flydsl_preshuffle_gemm_a8: accept packed MXFP4 inputs (E2M1 x2 + E8M0
per-32 block scales); recover logical K from the K/2-wide packed last dim.
- gemm_a4w4_bpreshuffle_flydsl: public op; caller supplies quantized/preshuffled
operands (per_1x32_f4_quant_hip / shuffle_weight / e8m0_shuffle) and tiling
via config[kernelName].
Verified on MI355X (gfx950): relerr 0.0014 / cosine 1.0000 vs an fp32
dequantized reference across square M=N=K in {1024..16384}.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Staged search (tile -> waves_per_eu/cshuffle -> preload depth) over the FlyDSL fp4 preshuffle GEMM, reporting best TFLOP/s per square shape. Companion to gemm_a4w4_bpreshuffle_flydsl. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Merged
5 tasks done
Contributor
|
No activity for 15 days, so this is now labelled |
Contributor
|
Closing due to inactivity: no pushes, reviews, or comments for 105 days. This is housekeeping, not a judgement on the change — if you want to continue this work, comment here and we'll reopen, or open a fresh PR rebased on the latest main. |
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.
Motivation
FlyDSL has a dense preshuffle GEMM for
a8w8and ana4w4path for MoE stages, but no dense MXFP4 (a4w4) entrypoint. The fp4 kernel already exists (compile_preshuffle_gemm_a8(in_dtype="fp4"), CDNA4mfma_scale_f32_16x16x128_f8f6f4); this PR exposes it as a dense op. No new GPU kernel.Technical Details
aiter/ops/flydsl/gemm_kernels.py:flydsl_preshuffle_gemm_a8accepts packed MXFP4 (in_dtype="fp4"; recovers logical K from the K/2 packed dim; byte-views fp4 for the pointer path).aiter/ops/gemm_op_a4w4.py: newgemm_a4w4_bpreshuffle_flydsl, mirroringgemm_a8w8_bpreshuffle_flydsl. Caller supplies quantized/preshuffled operands (per_1x32_f4_quant_hip,shuffle_weight,e8m0_shuffle) and tiling viaconfig["kernelName"].aiter/ops/flydsl/gemm_tune/flydsl_gemm_a4w4_bpreshuffle_tune.py: staged tuning harness (tile → waves_per_eu/cshuffle → preload).Format: OCP MXFP4 — E2M1 packed 2/byte, one E8M0 scale per 32-element K block.
Test Plan
Compare the dense op to an fp32-dequantized reference on MI355X (gfx950) across square M=N=K ∈ {1024,2048,4096,8192,16384}; report relerr + cosine.
Test Result
gfx950: relerr 0.0014 / cosine 1.0000, flat across all shapes. Residual = intrinsic MXFP4 quant noise. Tuned throughput competitive with asm
gemm_a4w4.Submission Checklist