-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Correct layout for Einsum inputs and output #6696
Merged
lazarevevgeny
merged 9 commits into
openvinotoolkit:master
from
rkazants:fix/rkazants/58534_einsum_adjust_layout
Jul 23, 2021
Merged
Correct layout for Einsum inputs and output #6696
lazarevevgeny
merged 9 commits into
openvinotoolkit:master
from
rkazants:fix/rkazants/58534_einsum_adjust_layout
Jul 23, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Roman Kazantsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
rkazants
requested review from
a team,
pavel-esir,
iimironov,
popovaan and
lazarevevgeny
and removed request for
a team
July 19, 2021 12:48
popovaan
approved these changes
Jul 21, 2021
…4_einsum_adjust_layout
iimironov
approved these changes
Jul 22, 2021
lazarevevgeny
suggested changes
Jul 22, 2021
Signed-off-by: Roman Kazantsev <[email protected]>
…4_einsum_adjust_layout
lazarevevgeny
approved these changes
Jul 23, 2021
pavel-esir
approved these changes
Jul 23, 2021
rnugmanx
pushed a commit
to rnugmanx/openvino
that referenced
this pull request
Aug 26, 2021
* Fix recovery of output subscript in Einsum implicit mode Signed-off-by: Roman Kazantsev <[email protected]> * Fix code style Signed-off-by: Roman Kazantsev <[email protected]> * Correct layout adjustment for Einsum inputs and output Signed-off-by: Roman Kazantsev <[email protected]> * Correct a comment in the unit-test Signed-off-by: Roman Kazantsev <[email protected]> * Setup correct transformation dependencies for LayoutChangeForEinsum Signed-off-by: Roman Kazantsev <[email protected]>
andrei-cv
pushed a commit
to andrei-cv/openvino
that referenced
this pull request
Aug 30, 2021
* Fix recovery of output subscript in Einsum implicit mode Signed-off-by: Roman Kazantsev <[email protected]> * Fix code style Signed-off-by: Roman Kazantsev <[email protected]> * Correct layout adjustment for Einsum inputs and output Signed-off-by: Roman Kazantsev <[email protected]> * Correct a comment in the unit-test Signed-off-by: Roman Kazantsev <[email protected]> * Setup correct transformation dependencies for LayoutChangeForEinsum Signed-off-by: Roman Kazantsev <[email protected]>
akuporos
pushed a commit
to akuporos/openvino
that referenced
this pull request
Sep 29, 2021
* Fix recovery of output subscript in Einsum implicit mode Signed-off-by: Roman Kazantsev <[email protected]> * Fix code style Signed-off-by: Roman Kazantsev <[email protected]> * Correct layout adjustment for Einsum inputs and output Signed-off-by: Roman Kazantsev <[email protected]> * Correct a comment in the unit-test Signed-off-by: Roman Kazantsev <[email protected]> * Setup correct transformation dependencies for LayoutChangeForEinsum Signed-off-by: Roman Kazantsev <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Root cause analysis: Layout adjustment for inputs and output of Einsum operation was incorrect for some cases. Firstly, this adjustment is not needed if a model is in NCHW layout originally (or
--disable_nhwc_to_nchw
option is invoked). Secondly, Einsum operation can be connected with MatMul operation that forces to mark some node operations to be executed in the original layout including Einsum operation. In this second case layout for inputs and output of Einsum operation is not needed.Solution: If one of both cases (
NCHW
is original layout and existence of MatMul in a model graph) is detected, do not insert Transpose operation and do not change Einsum equationTicket: 58534
Code:
Validation:
Documentation: