Skip to content
Open
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
16 changes: 9 additions & 7 deletions backends/arm/_passes/propagate_view_copy_permute_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,18 @@ def call(self, graph_module: torch.fx.GraphModule) -> PassResult:
continue
if self._propagate(node):
iteration_modified = True
break

if iteration_modified:
modified = True
graph_module = self._retrace(graph_module)
result = self.fuse_horizontal(graph_module)
graph_module = result.graph_module
iteration_modified |= result.modified
result = self.fuse_vertical(graph_module)
graph_module = result.graph_module
iteration_modified |= result.modified
continue

result = self.fuse_horizontal(graph_module)
graph_module = result.graph_module
iteration_modified |= result.modified
result = self.fuse_vertical(graph_module)
graph_module = result.graph_module
iteration_modified |= result.modified

modified |= iteration_modified
if not iteration_modified:
Expand Down
Loading