From d1491bdad5add936600ae39608a8aeb304be80e2 Mon Sep 17 00:00:00 2001 From: Andrew Grebenisan Date: Tue, 7 Oct 2025 10:58:46 -0700 Subject: [PATCH] Fix avg_pool2d replace ops pass (#14857) Summary: The original pass didn't fetch the user-provided zero point if it existed, it just assumed a hard-coded zero point. Fixed now. Reviewed By: ethansfng Differential Revision: D83873937 --- backends/cadence/aot/replace_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/cadence/aot/replace_ops.py b/backends/cadence/aot/replace_ops.py index 24390da5e16..7025159e443 100644 --- a/backends/cadence/aot/replace_ops.py +++ b/backends/cadence/aot/replace_ops.py @@ -1644,7 +1644,7 @@ def call_operator(self, op, args, kwargs, meta): ceil_mode = args[4] if len(args) >= 5 else False count_include_pad = args[5] if len(args) >= 6 else True divisor_override = args[6] if len(args) >= 7 else None - zero_point = torch.tensor(0, dtype=torch.int32) + zero_point = args[7] if len(args) >= 8 else None # If the op is avg_pool1d, then we need to reshape the 3d input to a 4d # tensor.