[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
    
    
  
================
@@ -3929,9 +3957,11 @@ static FailureOr<Operation *> vectorizeConvolution(
   if (!inputVecSizes.empty()) {
     // Only use the input vector size corresponding to the channel dim. Other
     // vector dims will be inferred from the Ops.
-    assert((isa<linalg::DepthwiseConv1DNwcWcOp>(*op) ||
-            isa<linalg::DepthwiseConv1DNcwCwOp>(*op)) &&
-           "Not a 1D depthwise conv!");
----------------
banach-space wrote:
The assert is to make sure we are not attempting to vectorize something that's not a depthwise conv (as the comment above suggests, at this point it ought to be depthwise conv). I would leave it here.
Instead, let's check the pre-condition re dimensionality at the very top of this method.
https://github.com/llvm/llvm-project/pull/130181
    
    
More information about the Mlir-commits
mailing list