[Mlir-commits] [mlir] [mlir][linalg] Enable masked vectorisation for depthwise convolutions (PR #81625)

Cullen Rhodes llvmlistbot at llvm.org
Wed Mar 6 05:50:55 PST 2024


================
@@ -3371,7 +3465,17 @@ vectorizeConvolution(RewriterBase &rewriter, LinalgOp op,
   res = e.generateNcwPooling();
   if (succeeded(res))
     return res;
-  return e.generateDilatedConv(flatten1DDepthwiseConv);
+
+  uint64_t vecChDimSize = ShapedType::kDynamic;
+  bool vecChDimScalableFlag = false;
+  if (!inputVecSizes.empty()) {
+    // Only use the input vector size corresponding to the channel dim. Other
+    // vector dims will be inferred from the Ops.
+    vecChDimSize = inputVecSizes[2];
+    vecChDimScalableFlag = inputScalableVecDims[2];
----------------
c-rhodes wrote:

is it safe to assume this is the channel dim? This function looks pretty generic whereas this is specific to `depthwise_conv_1d_nwc_wc`

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


More information about the Mlir-commits mailing list