Merged
Conversation
apply_rewrite! computed `pos` before calling resolve_rhs, but resolve_rhs can insert new instructions via insert_before! (e.g. negf in the subf→fma rule), shifting positions. The stale pos then overwrote the newly-inserted instruction instead of the original root, producing self-referential IR and leaving the root unrewritten. Recompute pos after resolve_rhs completes. This fixes FMA fusion for subf(mulf(x,y), z) → fma(x, y, negf(z)), which was silently broken for all patterns with nested RCall nodes in the RHS. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Amazing work, Tim!!🙏 |
Contributor
|
Any reason for the difference in timing of the new Python baseline? In the diff I see matmul going from 50.2 TFLOPS to 43.5 TFLOPS, and batched matmul from 40.0 TFLOPS to 30.9 TFLOPS. Since the problem sizes were unchanged, did the runs happen under different conditions / hardware, or maybe a regression in tileiras? |
Member
Author
I'm suspecting this. I upgraded from CTK 13.1 to 13.2, and had already noticed register allocation differences before when comparing to cuTile.jl with |
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.
Much better performance with all of the recent work.