This patch adds support for masked vector.gather ops using the
vector.mask representation. It includes the implementation of the
MaskableOpInterface, Linalg vectorizer support and lowering to LLVM.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp | ||
---|---|---|
628 | I'll need https://reviews.llvm.org/D142634 to be able to add a test to Linalg vectorizer but I can do that when that diff lands. I've tested this end to end for now. |
Looks good to me. Would be better to have a test to at least make sure it doesn't crash or emit wrong code until everything is ready
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp | ||
---|---|---|
628 | What happens if we try to vectorize a gather right now? Do we skip vectorization? Could be a negative test for now? |
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp | ||
---|---|---|
628 | We generate vector.gather ops when we vectorize some tensor.extract ops but that is temporarily disabled by default due to performance reason. We have a flag to enable it but that flag is missing in the transform dialect op masked_vectorize so I can write a test but it won't be vectorized if we don't have a way to enable the flag from the transform dialect op. We need https://reviews.llvm.org/D142634. I can write a test where we don't vectorize and then add the flag as part of https://reviews.llvm.org/D142634. Let me do that |
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp | ||
---|---|---|
628 | Actually the test is already in https://reviews.llvm.org/D142634 :) so we can land this. |
I'll need https://reviews.llvm.org/D142634 to be able to add a test to Linalg vectorizer but I can do that when that diff lands. I've tested this end to end for now.
(FYI, @awarzynski)