[Mlir-commits] [mlir] [mlir] Vectorize tensor.pad with low padding for unit dims (PR #133808)

Andrzej WarzyƄski llvmlistbot at llvm.org
Wed Apr 2 03:15:42 PDT 2025


================
@@ -2178,11 +2178,25 @@ vectorizePadOpPrecondition(tensor::PadOp padOp,
                                               inputVectorSizes)))
     return failure();
 
-  if (llvm::any_of(padOp.getLow(), [](Value v) {
-        std::optional<int64_t> res = getConstantIntValue(v);
-        return !res.has_value() || res.value() != 0;
+  // Low padding is currently unsupported for the general case as this
----------------
banach-space wrote:

[nit] Could you be a bit more specific? Perhaps it's me, but is it clear what "low padding" means? I guess that you meant "Padding with non-zero low pad values is not supported, unless the correspond result dim is 1"? 

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


More information about the Mlir-commits mailing list