Repository navigation
[FlyDSL] flydsl implementation of a16w16 gemm - #2725
Merged
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Collaborator
Contributor
Author
|
@coderfeli Its only been tested on AM workflows as of now, I will further optimize the code and test it on hardware soon. Added FlyDSL PR to the description |
1 task
omuhamma
marked this pull request as ready for review
July 20, 2026 15:18
coderfeli
previously approved these changes
Sep 4, 2026
valarLip
requested changes
Sep 4, 2026
coderfeli
reviewed
Sep 4, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
coderfeli
previously approved these changes
Sep 9, 2026
valarLip
previously requested changes
Sep 9, 2026
valarLip
left a comment
Collaborator
There was a problem hiding this comment.
all changes should under "aiter/ops/flydsl/"
coderfeli
approved these changes
Sep 14, 2026
sammysun0711
pushed a commit
to sammysun0711/aiter
that referenced
this pull request
Sep 16, 2026
* flydsl implementation of a16w16 gemm, WIP * Code styling and unit test fixes * UT update * code updates, best runs * Kernel updates,split k for smaller configs and unroll variable * Update shuffle.py * Added compute bound variant + black/ruff * black/ruff * black/ruff * new api * Cleanup pt2 * Reverting UT changes that existed for AM * Revert prev commit * small refactor * Splitting up kernel / wrapper * black/ruff * refactor with claude skill * black/ruff * kernel updates based off comments * black/ruff * Update gemm_a16w16_gfx1250.py * oob edge cases * Revert "Update gemm_a16w16_gfx1250.py" This reverts commit da29bb5. * e2e testing and fixes * Wire flydsl_gfx1250 a16w16 dispatch into tuned_gemm solMap The tuned CSV rows added for gfx1250 (libtype=flydsl_gfx1250) had no matching solMap entry, so those bf16 shapes would KeyError at dispatch. Add the kernelName parser (tile/warp/buffer/split_k/unroll encoding) and the flydsl_gfx1250_gemm dispatch wrapper, and register it in solMap. Addresses PR review feedback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Update aiter/tuned_gemm.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Address review nits: fx-native LDS pointer, single typed casts - _frag transposed load: replace raw llvm_dialect.inttoptr + ir.Type.parse("!llvm.ptr<3>") with fx.PointerType/fx.inttoptr/ fx.to_llvm_ptr (matches chunk_gated_delta_h); drops the flydsl._mlir imports entirely. - Collapse redundant fx wraps in _f32/_imm64/_slot_off to single typed casts. No functional change: 172/172 op tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Support FlyDSL >=0.3.1: version-gate raw buffer op aux argument FlyDSL 0.3.1 changed raw_ptr_buffer_store/atomic_fadd's trailing aux from a required SSA operand (i32 Value) to an optional MLIR attribute; the old Value form raises on store and is silently dropped on atomic_fadd (losing the split-k device-scope bits). Gate the four call sites on the installed version at compile time: <=0.3.0 keeps the operand form, >=0.3.1 passes aux=SCOPE_DEV as an int and omits the zero aux on stores. Tested: 172/172 op tests on both flydsl 0.3.0 and 0.3.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * resolving comments * removing bad copies, and unncessary padding * config picker, refactor, kernel change to prevent copies with split k * Fix ruff I001 and drop deleted is_flydsl_available import Co-authored-by: Cursor <cursoragent@cursor.com> * Addressing comments * CI fix --------- Co-authored-by: Satya Nikhil <nikhil.kodukula@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Felix Li <felix.li@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Xiake Sun <xiake.sun@amd.com>
RElbers
pushed a commit
that referenced
this pull request
Sep 25, 2026
* flydsl implementation of a16w16 gemm, WIP * Code styling and unit test fixes * UT update * code updates, best runs * Kernel updates,split k for smaller configs and unroll variable * Update shuffle.py * Added compute bound variant + black/ruff * black/ruff * black/ruff * new api * Cleanup pt2 * Reverting UT changes that existed for AM * Revert prev commit * small refactor * Splitting up kernel / wrapper * black/ruff * refactor with claude skill * black/ruff * kernel updates based off comments * black/ruff * Update gemm_a16w16_gfx1250.py * oob edge cases * Revert "Update gemm_a16w16_gfx1250.py" This reverts commit da29bb5. * e2e testing and fixes * Wire flydsl_gfx1250 a16w16 dispatch into tuned_gemm solMap The tuned CSV rows added for gfx1250 (libtype=flydsl_gfx1250) had no matching solMap entry, so those bf16 shapes would KeyError at dispatch. Add the kernelName parser (tile/warp/buffer/split_k/unroll encoding) and the flydsl_gfx1250_gemm dispatch wrapper, and register it in solMap. Addresses PR review feedback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Update aiter/tuned_gemm.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Address review nits: fx-native LDS pointer, single typed casts - _frag transposed load: replace raw llvm_dialect.inttoptr + ir.Type.parse("!llvm.ptr<3>") with fx.PointerType/fx.inttoptr/ fx.to_llvm_ptr (matches chunk_gated_delta_h); drops the flydsl._mlir imports entirely. - Collapse redundant fx wraps in _f32/_imm64/_slot_off to single typed casts. No functional change: 172/172 op tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Support FlyDSL >=0.3.1: version-gate raw buffer op aux argument FlyDSL 0.3.1 changed raw_ptr_buffer_store/atomic_fadd's trailing aux from a required SSA operand (i32 Value) to an optional MLIR attribute; the old Value form raises on store and is silently dropped on atomic_fadd (losing the split-k device-scope bits). Gate the four call sites on the installed version at compile time: <=0.3.0 keeps the operand form, >=0.3.1 passes aux=SCOPE_DEV as an int and omits the zero aux on stores. Tested: 172/172 op tests on both flydsl 0.3.0 and 0.3.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * resolving comments * removing bad copies, and unncessary padding * config picker, refactor, kernel change to prevent copies with split k * Fix ruff I001 and drop deleted is_flydsl_available import Co-authored-by: Cursor <cursoragent@cursor.com> * Addressing comments * CI fix --------- Co-authored-by: Satya Nikhil <nikhil.kodukula@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Felix Li <felix.li@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com>
RElbers
pushed a commit
that referenced
this pull request
Sep 25, 2026
* flydsl implementation of a16w16 gemm, WIP * Code styling and unit test fixes * UT update * code updates, best runs * Kernel updates,split k for smaller configs and unroll variable * Update shuffle.py * Added compute bound variant + black/ruff * black/ruff * black/ruff * new api * Cleanup pt2 * Reverting UT changes that existed for AM * Revert prev commit * small refactor * Splitting up kernel / wrapper * black/ruff * refactor with claude skill * black/ruff * kernel updates based off comments * black/ruff * Update gemm_a16w16_gfx1250.py * oob edge cases * Revert "Update gemm_a16w16_gfx1250.py" This reverts commit da29bb5. * e2e testing and fixes * Wire flydsl_gfx1250 a16w16 dispatch into tuned_gemm solMap The tuned CSV rows added for gfx1250 (libtype=flydsl_gfx1250) had no matching solMap entry, so those bf16 shapes would KeyError at dispatch. Add the kernelName parser (tile/warp/buffer/split_k/unroll encoding) and the flydsl_gfx1250_gemm dispatch wrapper, and register it in solMap. Addresses PR review feedback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Update aiter/tuned_gemm.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Address review nits: fx-native LDS pointer, single typed casts - _frag transposed load: replace raw llvm_dialect.inttoptr + ir.Type.parse("!llvm.ptr<3>") with fx.PointerType/fx.inttoptr/ fx.to_llvm_ptr (matches chunk_gated_delta_h); drops the flydsl._mlir imports entirely. - Collapse redundant fx wraps in _f32/_imm64/_slot_off to single typed casts. No functional change: 172/172 op tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Support FlyDSL >=0.3.1: version-gate raw buffer op aux argument FlyDSL 0.3.1 changed raw_ptr_buffer_store/atomic_fadd's trailing aux from a required SSA operand (i32 Value) to an optional MLIR attribute; the old Value form raises on store and is silently dropped on atomic_fadd (losing the split-k device-scope bits). Gate the four call sites on the installed version at compile time: <=0.3.0 keeps the operand form, >=0.3.1 passes aux=SCOPE_DEV as an int and omits the zero aux on stores. Tested: 172/172 op tests on both flydsl 0.3.0 and 0.3.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * resolving comments * removing bad copies, and unncessary padding * config picker, refactor, kernel change to prevent copies with split k * Fix ruff I001 and drop deleted is_flydsl_available import Co-authored-by: Cursor <cursoragent@cursor.com> * Addressing comments * CI fix --------- Co-authored-by: Satya Nikhil <nikhil.kodukula@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Felix Li <felix.li@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks done
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
To write the gemm for gfx1250 in flydsl
FlyDsl Pr: ROCm/FlyDSL#401
Test Plan
Unit tests & performance taken on HW
e2e testing on HW
Benchmarked with ISL/OSL 1k, 64 CONC, 640 num prompts
Test Result
All tests pass
server and benchmark work, accuracy remains the same (90%) before and after the change as well (with lm_eval)
Submission Checklist