Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlining transformations for Split and Concat nodes #1189

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

mdanilow
Copy link

New transformations in finn/transformation/streamline/reorder.py needed for yolov8 streamlining, some refactoring and generalization of existing transformations included.

  • The MoveLinearPastEltwiseAdd() is now generalized by a refactored MoveIdenticalOpPastJoinOp and was removed

  • MoveScalarLinearPastSplit() and MoveTransposePastSplit() transformations added

  • The MoveIdenticalOpPastJoinOp() transformation is more general and supports moving arbitrary number of identical operations past the join node (instead of just two). This base class checks only the op_types of producers to verify if they are identical. Its are_producers_identical() and move_node() methods should be overwritten by a child class for specific cases of producers and join op. Implemented child classes include: MoveTransposePastJoinAdd, MoveMulPastJoinAdd, MoveAddPastJoinAdd, MoveTransposePastJoinConcat, MoveAffinePastJoinConcat some needed only are_producers_identical() method to be overwritten.

  • test_move_identical_op_past_join_op.py and test_linear_past_eltwise.py tests are removed and test_move_identical_op_past_join_add.py, test_move_identical_op_past_join_concat.py, test_move_identical_op_past_split.py are added instead

Michal Danilowicz added 5 commits September 20, 2024 16:12
…eNHWC transformations are checking whether the node to be moved is a fork node, in which case the MoveOpPastFork is called. MoveOpPastFork uses deepcopies of the original node.
…Op refactored and derived from by MoveTransposePastJoinAdd, MoveMulPastJoinAdd, MoveAddPastJoinAdd, MoveTransposePastJoinConcat, MoveAffinePastJoinConcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant