Skip to content

Commit

Permalink
Merge pull request #107 from iksnagreb/fix/fold_constants
Browse files Browse the repository at this point in the history
Fix FoldConstants tranformation exiting early to redo shape annotations
  • Loading branch information
maltanar authored Dec 9, 2024
2 parents f3690c8 + ddc1018 commit 9b22db4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/qonnx/transformation/fold_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ def apply(self, model):
# remove old node
nodes_to_remove.append(n)
graph_modified = True
# Exit the loop here, after changing a single node. The
# ModelWrapper ensures to repeat this transformatin as long as
# there are suitable nodes available.
# See https://github.com/fastmachinelearning/qonnx/issues/104
break
for node in nodes_to_remove:
model.graph.node.remove(node)
if graph_modified:
Expand Down

0 comments on commit 9b22db4

Please sign in to comment.