Repository navigation
Conversation
aoli26
force-pushed
the
gfx1250/gemm-opt-0805
branch
from
August 6, 2026 09:35
3cf26da to
462fd44
Compare
aoli26
force-pushed
the
gfx1250/gemm-opt-0805
branch
from
August 11, 2026 14:57
7e4a5f0 to
f5482e9
Compare
aoli26
force-pushed
the
gfx1250/gemm-opt-0805
branch
from
August 25, 2026 07:48
ace7f0a to
44158f9
Compare
aoli26
marked this pull request as ready for review
August 26, 2026 07:23
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new hand-scheduled, compute-bound GEMM kernels for gfx1250 (A8W8/A8W4/A4W4 at 256-wide tiles) and extends TDM descriptor utilities to support persistent descriptor reuse and !fly.memref LDS views, with expanded correctness/behavioral tests (including split-K reduction and guard-row OOB detection).
Changes:
- Introduces new gfx1250 compute-bound GEMM launchers for 256x256-family tiles (A8W8/A8W4/A4W4), plus a split-K reduction epilogue kernel.
- Extends
tdm_ops.make_tensor_descriptor_2dto accept Fly shared views and addsupdate_tensor_descriptor_2d_lds_addrfor retargeting persistent descriptors. - Refactors/expands the gfx1250 GEMM test harness to cover new modes, profile constraints, split-K, cluster constraints, determinism, and OOB store clamping.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/kernels/test_gemm_fp8fp4_gfx1250.py | Refactors mode/case construction; adds coverage for new 256-wide kernels, split-K reduce, determinism, and OOB store clamping. |
| python/flydsl/expr/rocdl/tdm_ops.py | Adds LDS-base extraction for !fly.memref and a helper to update the LDS address field in a 2D descriptor. |
| kernels/gemm/gemm_a8w8_splitk_reduce_gfx1250.py | New split-K partial-reduction epilogue kernel and cached compiler entrypoint. |
| kernels/gemm/gemm_a8w8_gfx1250.py | Unifies mx32/mx128/ptpc launcher knobs; adds split-K support and kernel-name sanitization. |
| kernels/gemm/gemm_a8w8_256x256_gfx1250.py | New hand-scheduled compute-bound A8W8 256-wide kernel with strict tuned-profile assertions. |
| kernels/gemm/gemm_a8w4_mxscale_gfx1250.py | Adds split-K support and updates wave-size handling. |
| kernels/gemm/gemm_a8w4_256x256_gfx1250.py | New hand-scheduled compute-bound A8W4 256x256 kernel (fixed tuned profile). |
| kernels/gemm/gemm_a4w4_256x256_gfx1250.py | New hand-scheduled compute-bound A4W4 256x256 kernel (fixed tuned profile). |
| kernels/common/kernels_common.py | Adds format_kernel_name() to sanitize kernel symbol names for assembly/linking. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 7, 2026
This branch has not been deployed
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
Add 256x256 tile specific compute-bound A8W4, A4W4 and A8W8 kernel for gfx1250.
Technical Details
gemm_{a8w8,a8w4,a4w4}_256x256_gfx1250.py(new): hand-scheduled for exactly one profile — 256x256x128 tile, 2x2 waves. Hand-placeds_wait_dscnt/READY fences, odd/even wave-parity loop clones, operand-major planar LDS with B in its own 64 KiB segment.tdm_ops.py: addupdate_tensor_descriptor_2d_lds_addr(re-point one persistent descriptor per ring slot); widenlds_memrefto accept!fly.memref. Both additive.is_mxscale/block_sizeconstexprs.Test Plan
pytest tests/kernels/test_gemm_fp8fp4_gfx1250.pyon gfx1250.Test Result
All tests passed.
Submission Checklist