[Integrate] Drop LLVM revert of "Remove matmul_transpose variants"#21344
Conversation
|
Awesome @hanhanW, thanks! All errors seem to be about this particular problem: I have fixed an issue with the Can you cherry pick again on the latest commit of that PR and see if the issues go away? |
|
@kuhar this is what you meant on the llvm pr, I guess. |
|
Thanks! I'll also rebase to the main branch, which has fresh LLVM commits. |
d68c020 to
32640f8
Compare
|
I have rebase my pr on a recent branch, so should be easy to cherry pick. |
32640f8 to
28c2301
Compare
7120f2a to
42d2e6e
Compare
6aa0f5f to
061c693
Compare
538cad9 to
ef13595
Compare
ef13595 to
a825464
Compare
a825464 to
8e3828a
Compare
20b06b2 to
b060031
Compare
|
This needs to be rebased |
…#147961)"" Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Abhishek Varma <abhvarma@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
…71716e88bd4af8f22c Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
b060031 to
efe5104
Compare
Done |
| Operation *op = bmmOp.getOperation(); | ||
| if (!IREE::LinalgExt::isPureBatchMatmul(op)) { |
There was a problem hiding this comment.
I think this can just be !IREE::LinalgExt::isPureBatchMatmul(bmmOp)/
| Operation *op = matmulOp.getOperation(); | ||
| if (!IREE::LinalgExt::isPureMatmul(op)) { |
| bool isPureMatmul(Operation *op) { | ||
| return dyn_cast_or_null<linalg::MatmulOp>(op) && | ||
| linalg::MatmulOp::isDefaultIndexingMaps(op->getAttr("indexing_maps")); | ||
| } |
There was a problem hiding this comment.
I'd do it this way, which avoids magic string.
auto matmulOp = dyn_cast_or_null<linalg::MatmulOp>(op);
return matmulOp && linalg::MatmulOp::isDefaultIndexingMaps(matmulOp.getIndexingMaps());There was a problem hiding this comment.
I think we don't need to check maps for this file, because it is a test for matching. We should just check match_status.
| bool isPureBatchMatmul(Operation *op) { | ||
| return dyn_cast_or_null<linalg::BatchMatmulOp>(op) && | ||
| linalg::BatchMatmulOp::isDefaultIndexingMaps( | ||
| op->getAttr("indexing_maps")); | ||
| } |
There was a problem hiding this comment.
It needs to be updated as well. Sorry I forgot to point this out
There was a problem hiding this comment.
We can do it in a follow-up, because I really want to drop the revert first. Functionality-wise, it is okay.
The better implementation in my mind is that we bail out if the op is not a pure matmul/batch_matmul or with transpose variants.
Then we look at the indexing maps to create transpose op + matmul/batch_matmul ops.
There was a problem hiding this comment.
Oh, I misread the code. never mind.
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
9e28846 to
6f33b05
Compare
|
I just realized that I can't approve the PR because I created the PR. More eyes are better, @kuhar can you review and stamp? |
Issue: #21349