-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GPU] Use affine.delinearize_index for MMA tiles and vector distribution #19228
Open
krzysz00
wants to merge
8
commits into
main
Choose a base branch
from
users/krzysz00/linearize-mma
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
krzysz00
force-pushed
the
users/krzysz00/gpu-distribute-with-linearize
branch
from
November 21, 2024 20:54
5328767
to
5a8fa83
Compare
krzysz00
force-pushed
the
users/krzysz00/linearize-mma
branch
from
November 21, 2024 22:30
829c3d5
to
aaf6cf8
Compare
krzysz00
force-pushed
the
users/krzysz00/gpu-distribute-with-linearize
branch
from
November 26, 2024 19:24
5a8fa83
to
291f570
Compare
krzysz00
force-pushed
the
users/krzysz00/linearize-mma
branch
from
November 26, 2024 19:28
aaf6cf8
to
3ccf6a4
Compare
Base automatically changed from
users/krzysz00/gpu-distribute-with-linearize
to
main
November 26, 2024 20:38
krzysz00
force-pushed
the
users/krzysz00/linearize-mma
branch
4 times, most recently
from
December 17, 2024 23:07
ba7bc66
to
d577300
Compare
krzysz00
force-pushed
the
users/krzysz00/linearize-mma
branch
from
January 3, 2025 22:12
31e58d0
to
5592a62
Compare
Update: staring at tests showed that I should go implement the value bounds op interfaces on the affine.delinearize_index and affine.linearize_index because there were some single-iteration loops that weren't getting eliminated. |
krzysz00
force-pushed
the
users/krzysz00/linearize-mma
branch
from
January 7, 2025 00:13
8e5ebb0
to
de7e313
Compare
krzysz00
requested review from
antiagainst,
MaheshRavishankar,
kuhar,
qedawkins,
hanhanW and
benvanik
as code owners
January 7, 2025 00:21
krzysz00
force-pushed
the
users/krzysz00/linearize-mma
branch
from
January 8, 2025 18:31
1f0b25f
to
0277d07
Compare
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.
This commit updates some by-hand delinearizations in MMA tile generation and vector distribution to use
affine.delinearize_index
instead.The main tricky thing here is that a lot of that MMA code would use
(id / stride) % size
, whereas delinearize's outputs all have the form(id % stride) / nextStride
. In all the cases at issue, we could use a utility to convert arrays of sizes and strides to a permutation on a delinearization basis.In order to not break existing tests, the trivial-loop detector had to be manually instrumented to support
delinearize_index
(and I gotutil.assume.int
while I was there). (I suspect there're a few other cases, and that, long-term, that detector should be using one of the bounds interfaces, but that's not this PR)