-
Notifications
You must be signed in to change notification settings - Fork 645
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
[DispatchCreation] Move the logic to transpose indexing maps into dispatch formation logic. #19412
base: main
Are you sure you want to change the base?
[DispatchCreation] Move the logic to transpose indexing maps into dispatch formation logic. #19412
Conversation
/// transposed with respect to each other. To find more fusion opportunities for | ||
/// consumer elementwise operation, the indexing maps in the consumer can be | ||
/// made to "align" with the indexing map of the producer to enhance fusion. | ||
static bool areOpsFusableAfterInterchangeOfConsumer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename this to something like makeConsumerFusableViaInterchange
to signal that it modifies the operation? So it's more clear it has side-effects on the indexing maps of the op.
I'm not sure whats going on with the regression tests but otherwise this looks good. I'm glad ElementwiseOpInterchangePattern
is getting removed, it was a bit weird and caused some problems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on the naming suggestion. It sounds clearer to me.
caa1290
to
1387b89
Compare
well, I am going to hold off on submitting anything till the new year. |
ea95ca5
to
bef7a87
Compare
2e5ce76
to
b2e5527
Compare
…patch formation logic. For cases like ``` %0 = linalg.matmul %1 = linalg.generic { indexing_maps=[affine_map<(d0, d1) -> (d1, d0)>, ...], ...} ins(%0, ... : ...) outs(...) {...} ``` some preprocessing patterns convert these to ``` %0 = linalg.matmul %1 = linalg.generic { indexing_maps=[affine_map<(d0, d1) -> (d0, d1)>, ...], ...} ins(%0, ... : ...) outs(...) {...} ``` to make these operations fusable. But these preprocessing are run too early and doing a spooky-action-at-a-distance. Instead just move this logic into dispatch formation itself. Signed-off-by: MaheshRavishankar <[email protected]>
Signed-off-by: MaheshRavishankar <[email protected]>
b2e5527
to
a020bab
Compare
For cases like
some preprocessing patterns convert these to
to make these operations fusable. But these preprocessing are run too
early and doing a spooky-action-at-a-distance.
Instead just move this logic into dispatch formation itself.
Signed-off-by: MaheshRavishankar [email protected]