[Mlir-commits] [mlir] 112af87 - [mlir][tosa] Add parenthesis for the weight padding calculation (#134420)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Apr 7 09:43:50 PDT 2025
Author: Jerry-Ge
Date: 2025-04-07T09:43:46-07:00
New Revision: 112af8796451e19b43d7a0788039a27b08802974
URL: https://github.com/llvm/llvm-project/commit/112af8796451e19b43d7a0788039a27b08802974
DIFF: https://github.com/llvm/llvm-project/commit/112af8796451e19b43d7a0788039a27b08802974.diff
LOG: [mlir][tosa] Add parenthesis for the weight padding calculation (#134420)
Minor change.
Signed-off-by: Jerry Ge <jerry.ge at arm.com>
Added:
Modified:
mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
index 50d2202f68a87..ea6ac981b53cc 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
@@ -129,7 +129,7 @@ class TransposeConvStridedConverter
weightPadding[3] =
(weightHeight % stride[0]) ? (stride[0] - weightHeight % stride[0]) : 0;
weightPadding[5] =
- weightWidth % stride[1] ? stride[1] - weightWidth % stride[1] : 0;
+ (weightWidth % stride[1]) ? (stride[1] - weightWidth % stride[1]) : 0;
Value weightPaddingVal =
getTosaConstShape(rewriter, op->getLoc(), weightPadding);
More information about the Mlir-commits
mailing list