[Mlir-commits] [mlir] [MLIR] Allowing unsupported conv2d op to fail gracefully from vectorization (PR #130181)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Mar 7 09:34:52 PST 2025
================
@@ -1990,8 +1996,21 @@ static LogicalResult vectorizeLinalgOpPrecondition(
// TODO: isaConvolutionOpInterface that can also infer from generic
// features. But we will still need stride/dilation attributes that will be
// annoying to reverse-engineer...
- if (isa<ConvolutionOpInterface>(linalgOp.getOperation()))
+ if (isa<ConvolutionOpInterface>(linalgOp.getOperation())) {
+ // Create a dummy rewriter first, a rewriter is not required for
+ // validation
+ IRRewriter dummyBuilder(linalgOp.getContext());
+ // Check if we can successfully construct a 1d convolution generator.
+ // For example, if it is 2d+ convolution, return failure because we don't
+ // support it. To use this pass on a 2d+ convolution, it should have already
+ // been decomposed to 1d convolution via
+ // DecomposeConvolutionToLowerDimOpsPass.
----------------
banach-space wrote:
I couldn't find such Pass in-tree.
https://github.com/llvm/llvm-project/pull/130181
More information about the Mlir-commits
mailing list