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

Fuse mul transformation fix #5518

Merged
merged 8 commits into from
May 7, 2021

Conversation

popovaan
Copy link
Contributor

@popovaan popovaan commented May 5, 2021

Root cause analysis:
_fuse_add transformation finds MatMul node and a Mul node that goes after it, than removes Mul node and inserts a new Mul node before the MatMul using set_source() method. set_source() copies attributes from the data node of old connection to the new data node and it leads to appearance of two data nodes with the same name.

After the constant folding and graph cleanup the operation that goes to the new data node is deleted as const producer and the new Const op is created with the name obtained from data node which leads to the error, that graph contains two nodes with the same name.

Solution: If we use set_destination() in _fuse_add old data node is reused in previous op -> new Mul connection and attributes are not copied to new Mul-> MatMul connection.

Ticket: 54845

Code:

  • Comments
  • Code style (PEP8)
  • Transformation generates reshape-able IR
  • Transformation preserves original framework node names

Validation:

  • Unit tests
  • Framework operation tests - N/A
  • Transformation tests - N/A
  • Model Optimizer IR Reader check

Documentation:

  • Supported frameworks operations list - N/A
  • Guide on how to convert the public model - N/A
  • User guide update - N/A

@popovaan popovaan requested a review from a team May 5, 2021 15:00
@openvino-pushbot openvino-pushbot added the category: MO Model Optimizer label May 5, 2021
@popovaan popovaan marked this pull request as draft May 6, 2021 05:48
@popovaan popovaan changed the title Fuse add transformation fix Fuse mul transformation fix May 7, 2021
@popovaan popovaan marked this pull request as ready for review May 7, 2021 08:13
@popovaan popovaan requested review from a team, pavel-esir, iimironov and rkazants and removed request for a team May 7, 2021 08:15
@lazarevevgeny lazarevevgeny merged commit 84b94c9 into openvinotoolkit:master May 7, 2021
jane-intel pushed a commit that referenced this pull request May 26, 2021
evgenytalanin-intel pushed a commit that referenced this pull request May 26, 2021
AlexeyLebedev1 pushed a commit to AlexeyLebedev1/openvino that referenced this pull request May 27, 2021
yekruglov pushed a commit to yekruglov/openvino that referenced this pull request Jun 7, 2021
rnugmanx pushed a commit to rnugmanx/openvino that referenced this pull request Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: MO Model Optimizer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants