[Mlir-commits] [mlir] [mlir][Vector] Add a rewrite pattern for gather over a strided memref (PR #72991)
Andrzej Warzyński
llvmlistbot at llvm.org
Tue Nov 28 04:58:50 PST 2023
================
@@ -168,6 +244,6 @@ struct Gather1DToConditionalLoads : OpRewritePattern<vector::GatherOp> {
void mlir::vector::populateVectorGatherLoweringPatterns(
RewritePatternSet &patterns, PatternBenefit benefit) {
- patterns.add<FlattenGather, Gather1DToConditionalLoads>(patterns.getContext(),
- benefit);
+ patterns.add<FlattenGather, RemoveStrideFromGatherSource,
----------------
banach-space wrote:
ATM all patterns will match, but I believe that only [Gather1DToConditionalLoads](https://github.com/llvm/llvm-project/blob/205f53010d0da11a9c4ab7a4655edb4a2ded1b02/mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp#L102) is problematic here as it lowers to `vector.load` and:
* https://github.com/llvm/llvm-project/blob/205f53010d0da11a9c4ab7a4655edb4a2ded1b02/mlir/lib/Dialect/Vector/IR/VectorOps.cpp#L4544
(as in, that would be an unsupported `vector.load`). So, let me update `Gather1DToConditionalLoads`. Please check whether that makes sense to you 🙏🏻 .
https://github.com/llvm/llvm-project/pull/72991
More information about the Mlir-commits
mailing list