diff --git a/src/finn/transformation/streamline/reorder.py b/src/finn/transformation/streamline/reorder.py index 1cee575f29cc1f7efe2bddfc0c0f56ae6d9f27b2..254f9ab0e6ed35bae77fa3ed2ed1b54789994e43 100644 --- a/src/finn/transformation/streamline/reorder.py +++ b/src/finn/transformation/streamline/reorder.py @@ -272,7 +272,12 @@ class MoveScalarMulPastConv(Transformation): class MoveScalarLinearPastEltwiseAdd(Transformation): - """Move scalar linear operations (mul, add) past elementwise operations.""" + """Move scalar linear operations (mul, add) past elementwise add operations where possible. Specifically, + matches and transforms the following patterns: + (x*C) + (y*C) -> (x + y) * C + (x+A) + (y+B) -> (x + y) + (A + B) + where x and y are dynamic inputs, A, B, C are constants. + """ def move_node(self, graph, n, prod0, prod1, node_ind): # found! move one of the muls to output, remove the other one