Skip to content

Commit 705fccc

Browse files
Andrew Grebenisanfacebook-github-bot
authored andcommitted
Fix avg_pool2d replace ops pass
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. Differential Revision: D83873937
1 parent 1e4a8c3 commit 705fccc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/cadence/aot/replace_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ def call_operator(self, op, args, kwargs, meta):
16441644
ceil_mode = args[4] if len(args) >= 5 else False
16451645
count_include_pad = args[5] if len(args) >= 6 else True
16461646
divisor_override = args[6] if len(args) >= 7 else None
1647-
zero_point = torch.tensor(0, dtype=torch.int32)
1647+
zero_point = args[7] if len(args) >= 8 else None
16481648

16491649
# If the op is avg_pool1d, then we need to reshape the 3d input to a 4d
16501650
# tensor.

0 commit comments

Comments
 (0)