[Mlir-commits] [mlir] [MLIR] Allowing unsupported conv2d op to fail gracefully from vectorization (PR #130181)
Diego Caballero
llvmlistbot at llvm.org
Fri Mar 7 14:50:58 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());
----------------
dcaballe wrote:
It's a bit weird that we need an IRRewriter to check the vectorization preconditions of a convolution. We may want to decouple the preconditions from the vectorization itself to the extent possible.
This function is also growing too much so it'd be good to create a dedicated `vectorizeConvolutionPrecondition`.
https://github.com/llvm/llvm-project/pull/130181
More information about the Mlir-commits
mailing list