[Mlir-commits] [mlir] [mlir][vector] Avoid setting padding by default to `0` in `vector.transfer_read` prefer `ub.poisson` (PR #146088)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Jun 27 08:22:55 PDT 2025
================
@@ -3487,15 +3491,18 @@ struct Conv1DGenerator
SmallVector<Value> resPadding(resShape.size(), zero);
// Read the whole lhs, rhs and res in one shot (with zero padding).
- Value lhs = rewriter.create<vector::TransferReadOp>(loc, lhsType, lhsShaped,
- lhsPadding);
+ Value lhs = rewriter.create<vector::TransferReadOp>(
+ loc, lhsType, lhsShaped, lhsPadding,
+ arith::getZeroConstant(rewriter, loc, lhsEltType));
----------------
banach-space wrote:
[nit] Here and in other places. The other arguments have self-descriptive names, but `getZeroConstant` looks like some "magic" value without a comment.
```suggestion
/*padding=*/arith::getZeroConstant(rewriter, loc, lhsEltType));
```
https://github.com/llvm/llvm-project/pull/146088
More information about the Mlir-commits
mailing list