[Mlir-commits] [mlir] [NFC][Linalg] Introduce ConvMatchBuilder + refactor Conv matchers (PR #169704)
Abhishek Varma
llvmlistbot at llvm.org
Sun Nov 30 23:36:41 PST 2025
================
@@ -434,6 +430,91 @@ static bool convLayoutMatches(ArrayRef<ArrayRef<AffineExpr>> mapListExpected,
})));
}
+/// Enum of all kinds of Pooling Op's type.
+enum PoolingType {
+ NONE,
+ MAX_SIGNED,
+ MAX_UNSIGNED,
+ MIN_SIGNED,
+ MIN_UNSIGNED,
+ SUM
+};
+
+/// Helper class for building convolution op matchers with minimal boilerplate.
+/// Reduces repetitive code across Conv1D/2D/3D and Depthwise variants as well
+/// as Pooling ops.
----------------
Abhishek-Varma wrote:
>What do dilations and strides member variables represent? If op is a convolution then that will already contain strides and dilations, right?
Correct. So the matcher will infer dilations/strides from the affine map and populate these member variables. Explained this as part of the doc comment as well in https://github.com/llvm/llvm-project/pull/170080 now.
https://github.com/llvm/llvm-project/pull/169704
More information about the Mlir-commits
mailing list