[Mlir-commits] [mlir] [NFC][Linalg] Add `matchConvolutionOpOfType` API and make `isaConvolutionOpOfType` API a wrapper (PR #174722)
Han-Chung Wang
llvmlistbot at llvm.org
Wed Jan 14 09:25:02 PST 2026
================
@@ -267,11 +267,11 @@ specializeToConvOp(RewriterBase &rewriter, GenericOp genericOp,
/// Converts linalg.generic to named linalg.*conv/pooling* where possible.
static FailureOr<LinalgOp> specializeLinalgConvolutions(RewriterBase &rewriter,
GenericOp genericOp) {
- SmallVector<int64_t> dilations, strides;
#define CONV_OP_SPECIALIZER(ConvOpTy) \
- if (isaConvolutionOpOfType<ConvOpTy>(genericOp, &dilations, &strides)) \
- return specializeToConvOp<ConvOpTy>(rewriter, genericOp, dilations, \
- strides); \
+ if (std::optional<DilationsAndStrides> convParams = \
+ matchConvolutionOpOfType<ConvOpTy>(genericOp)) \
----------------
hanhanW wrote:
This should use isaConvolutionOpOfType, IMO. I missed it, sorry about that.
https://github.com/llvm/llvm-project/pull/174722
More information about the Mlir-commits
mailing list