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

Andrzej WarzyƄski llvmlistbot at llvm.org
Wed Feb 14 13:12:13 PST 2024


================
@@ -1609,6 +1610,19 @@ static LogicalResult reductionPreconditions(LinalgOp op) {
 }
 
 static LogicalResult vectorizeDynamicLinalgOpPrecondition(linalg::LinalgOp op) {
+  // Support dynamic shapes in 1D depthwise convolution, but only in the
+  // _channel_ dimension. That's exclusively to support scalable vectorisation.
+  if (auto conv = dyn_cast<linalg::DepthwiseConv1DNwcWcOp>(op.getOperation())) {
+    auto lhsShaped = op.getDpsInputOperand(0)->get();
----------------
banach-space wrote:

Just sticking with convention used for convs in this file: https://github.com/llvm/llvm-project/blob/55a7ff8c1ac23a78f9701d357d292e6a0bdfdb4f/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp#L2662-L2664

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


More information about the Mlir-commits mailing list