[Mlir-commits] [mlir] [mlir[tosa] Switch zero point of avgpool2d to input variable type (PR #128983)

Jack Frankland llvmlistbot at llvm.org
Thu Feb 27 06:42:12 PST 2025


================
@@ -97,6 +97,14 @@ def Tosa_AvgPool2dOp : Tosa_InferShapedTypeOp<"avg_pool2d"> {
   ];
 
   let builders = [Tosa_AvgPool2dOpQuantInfoBuilder];
+
+  let extraClassDeclaration = [{
+    LogicalResult getInputZeroPoint(int64_t &zp);
+    LogicalResult getOutputZeroPoint(int64_t &zp);
----------------
FranklandJack wrote:

Could we return a `FailureOr<int64_t>` here to avoid the out parameter?: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/LogicalResult.h#L76

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


More information about the Mlir-commits mailing list