Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backends/arm/_passes/fuse_equal_placeholders_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ def call(self, graph_module: torch.fx.GraphModule) -> PassResult:
common_persistent,
)

# TBD: Find a principled way to merge node.meta across all fused node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is a problem for 'non-standard' meta keys.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to write a conv2d test which fails without this change, just to safeguard.

# For now, i specifically transfer over the TosaSpecialDtype.meta_key() of the rep_node
if TosaSpecialDtype.meta_key() in rep_node.meta:
common_node.meta[TosaSpecialDtype.meta_key()] = rep_node.meta[
TosaSpecialDtype.meta_key()
]

# Replace uses and delete duplicates
for node, _ in nodes_tensors:
node.replace_all_uses_with(common_node)
Expand Down
1 change: 1 addition & 0 deletions backends/arm/test/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def define_arm_tests():
"ops/test_addmm.py",
"ops/test_avg_pool2d.py",
"ops/test_cat.py",
"ops/test_conv2d.py",
"ops/test_linear.py",
"ops/test_mul.py",
"ops/test_permute.py",
Expand Down
Loading