[gfx1250][FlyDSL] Refactor GEMMs with layout-based API#4374
Open
aoli26 wants to merge 4 commits into
Open
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
Author
|
Depends on #4210 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors and extends gfx1250 FP8 GEMM support by introducing new FlyDSL layout-based WMMA kernels (PTPC and blockscale bpreshuffle), updating quantization scale shuffling semantics, and refreshing tuned-config coverage plus AOT compilation support for the new kernel families.
Changes:
- Add gfx1250 FlyDSL WMMA kernels for a8w8 PTPC bpreshuffle GEMM and a8w8 blockscale bpreshuffle GEMM, and update gfx1250 bpreshuffle dispatch to use the new launchers.
- Update quantization kernels/dispatch to distinguish MX-hardware e8m0 swizzle (group_size==32) vs. transpose (other group sizes), and expose an fp8-e8m0 scale output option via
scale_type. - Update tuned CSVs (new gfx1250 entries) and extend AOT precompile tooling plus op_tests to exercise the fp8-e8m0 scale path.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| op_tests/test_gemm_a8w8_blockscale.py | Adds optional fp8-e8m0 scale generation/testing path and a --flydsl flag for blockscale tests. |
| csrc/kernels/quant_kernels.cu | Refines e8m0 scale padding/shuffle behavior to be MX-layout-specific (group_size==32) and uses transpose otherwise. |
| aiter/ops/quant.py | Adds scale_type option to per_group_quant_hip and routes fp8-e8m0 scale requests through per-group quant op. |
| aiter/ops/gemm_op_a8w8.py | Adds gfx1250 support and dispatch for FlyDSL blockscale bpreshuffle path when scales are fp8-e8m0. |
| aiter/ops/flydsl/kernels/tdm_oob.py | Removes vendored OOB-capable TDM descriptor builder fallback. |
| aiter/ops/flydsl/kernels/gemm_mxscale_gfx1250.py | Tightens buffer resource bounds for grouped-contiguous-M metadata loads. |
| aiter/ops/flydsl/kernels/gemm_a8w8_ptpc_gfx1250.py | New FlyDSL WMMA PTPC (per-token/per-channel fp32 scale) preshuffle GEMM kernel for gfx1250. |
| aiter/ops/flydsl/kernels/gemm_a8w8_blockscale_gfx1250.py | New FlyDSL WMMA blockscale (e8m0 scale) preshuffle GEMM kernel for gfx1250. |
| aiter/ops/flydsl/gemm_tune/flydsl_gemm_a8w8_bpreshuffle_wmma_common.py | Reworks gfx1250 PTPC candidate generation and shape-fitting logic. |
| aiter/ops/flydsl/gemm_tune/flydsl_gemm_a8w8_blockscale_bpreshuffle_wmma_common.py | Adds gfx1250 blockscale WMMA candidate catalog and shape-fitting logic. |
| aiter/ops/flydsl/bpreshuffle_gemm_gfx1250.py | Updates gfx1250 PTPC runner to call the new layout-based WMMA launcher and adjusts split-k limits. |
| aiter/ops/flydsl/blockscale_bpreshuffle_gemm_gfx1250.py | New gfx1250 blockscale bpreshuffle runner and kernelName parser/dispatcher. |
| aiter/configs/model_configs/dsv4_a8w8_blockscale_bpreshuffle_tuned_gemm.csv | Adds many gfx1250 flydsl tuned entries for blockscale bpreshuffle GEMM. |
| aiter/configs/a8w8_bpreshuffle_tuned_gemm.csv | Updates gfx1250 flydsl tuned entries for PTPC bpreshuffle GEMM. |
| aiter/aot/flydsl/gemm.py | Extends AOT to detect/compile the new gfx1250 WMMA kernel families and adds optional ARCH-based job filtering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aoli26
force-pushed
the
gfx1250/refactor-flydsl-gemm
branch
from
July 24, 2026 10:54
ff1a0dd to
5c660ff
Compare
aoli26
force-pushed
the
gfx1250/refactor-flydsl-gemm
branch
from
July 24, 2026 11:00
5c660ff to
b0d3305
Compare
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
Replace legacy gfx1250 GEMM implementations with focused, layout-based kernels.
Technical Details
Add A8W8 PTPC, and A8W8 blockscale kernels and remove legacy implementations.
Test Plan
Ran a8w8 blockscale/PTPC GEMM correctness tests and AOT pre-compilation on gfx1250.
Test Result
Results match the previous kernel path; AOT compilation passes.
Submission Checklist