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

Andrzej WarzyƄski llvmlistbot at llvm.org
Wed Feb 14 13:48:54 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.
----------------
banach-space wrote:

Nothing :) This pre-condition will fail and the vectoriser won't do anything. And there are other pre-conditions too.

In terms of what's missing in the vectoriser - we'd need forward the corresponding vector sizes to `depthwiseConv`. Otherwise we'd be trying to create a vector with one dynamic shape. That's missing as I only added logic for channel dim. I am reluctant to extend that - we'd need to worry about the width dimension for the input, output and filter separately. I'm not sure whether that would be needed in practice.

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


More information about the Mlir-commits mailing list