Skip to content

Commit baca2d0

Browse files
3l1facebook-github-bot
authored andcommitted
Fix conv2d bias INT48 type hint removed by fusing placeholder nods (#15257)
Summary: Fix conv2d bias INT48 type hint removed by fusing placeholder nods bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks Reviewed By: Ninja91, digantdesai Differential Revision: D84948170
1 parent 788ef2f commit baca2d0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

backends/arm/_passes/fuse_equal_placeholders_pass.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ def call(self, graph_module: torch.fx.GraphModule) -> PassResult:
8484
common_persistent,
8585
)
8686

87+
# TBD: Find a principled way to merge node.meta across all fused node
88+
# For now, i specifically transfer over the TosaSpecialDtype.meta_key() of the rep_node
89+
if TosaSpecialDtype.meta_key() in rep_node.meta:
90+
common_node.meta[TosaSpecialDtype.meta_key()] = rep_node.meta[
91+
TosaSpecialDtype.meta_key()
92+
]
93+
8794
# Replace uses and delete duplicates
8895
for node, _ in nodes_tensors:
8996
node.replace_all_uses_with(common_node)

backends/arm/test/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def define_arm_tests():
1818
"ops/test_addmm.py",
1919
"ops/test_avg_pool2d.py",
2020
"ops/test_cat.py",
21+
"ops/test_conv2d.py",
2122
"ops/test_linear.py",
2223
"ops/test_mul.py",
2324
"ops/test_permute.py",

0 commit comments

Comments
 (0)