[Mlir-commits] [mlir] [Linalg] Add basic infra to add matchers for linalg.*conv*/*pool* ops (PR #163724)

Andrzej Warzyński llvmlistbot at llvm.org
Thu Oct 23 08:16:24 PDT 2025


================
@@ -316,7 +386,9 @@ FailureOr<LinalgOp> mlir::linalg::specializeGenericOp(RewriterBase &rewriter,
   if (isaContractionOpInterface(genericOp)) {
     return specializeLinalgContractions(rewriter, genericOp);
   }
-  return failure();
+
+  // Convolution - e.g. *conv/pooling*
+  return inferAndSpecializeToConvolutionOp(rewriter, genericOp);
----------------
banach-space wrote:

To align with the code above, I am suggesting a slight change to the logic and naming:
```suggestion
  // Convolution - e.g. *conv/pooling*
  if (isaConvolutionOpInterface(genericOp)) {
    return specializeLinalgConvolutions(rewriter, genericOp);
    
    return failure();
```

>From what I can tell, it's a tiny change that will keep things consistent. But perhaps I am missing something 🤔 

https://github.com/llvm/llvm-project/pull/163724


More information about the Mlir-commits mailing list