Refactoring FunctionsComparator - extract node comparison part#4175
Merged
ilyachur merged 7 commits intoopenvinotoolkit:masterfrom Feb 16, 2021
elszkowski:compare_function-compare_refactor_for_subgraph
Merged
Refactoring FunctionsComparator - extract node comparison part#4175ilyachur merged 7 commits intoopenvinotoolkit:masterfrom elszkowski:compare_function-compare_refactor_for_subgraph
ilyachur merged 7 commits intoopenvinotoolkit:masterfrom
elszkowski:compare_function-compare_refactor_for_subgraph
Conversation
elszkowski
commented
Feb 4, 2021
| const std::shared_ptr<ngraph::Function>& f1, const std::shared_ptr<ngraph::Function>& f2); | ||
|
|
||
| Result compare(ngraph::Node* node1, ngraph::Node* node2) { | ||
| std::stringstream errors; |
Author
There was a problem hiding this comment.
Passing stringstream to execution is required because for now we have less important errors gather in stringstream called err_log. If this policy (minor and major error) will remove src will be simpler.
| "Number of inputs is different: " + to_str(node1->inputs().size()) + " for " + | ||
| name(node1) + " and " + to_str(node2->inputs().size()) + " for " + name(node2)); | ||
| if (subgraph1 && subgraph2) { | ||
| auto result = recreate().compare(subgraph1->get_function(), subgraph2->get_function()); |
Author
There was a problem hiding this comment.
This will be switch to CompareNodesAttributes and on Function adapter soon.
| } | ||
| } | ||
|
|
||
| return Result::ok("Check if any minor error was log in to err_log"); |
Author
There was a problem hiding this comment.
Non obvious result. It came from minor and major error which might happen during whole Function traversing.
ilyachur
reviewed
Feb 4, 2021
inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp
Outdated
Show resolved
Hide resolved
ilyachur
reviewed
Feb 5, 2021
inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp
Show resolved
Hide resolved
1 task
Contributor
|
@ilyachur @GlebKazantaev @itikhono please have a look. I was told that this PR blocks progress on #4123. |
ilyachur
approved these changes
Feb 15, 2021
itikhono
approved these changes
Feb 15, 2021
inference-engine/tests/functional/inference_engine/transformations/compare_functions_test.cpp
Show resolved
Hide resolved
inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp
Show resolved
Hide resolved
jdanieck
approved these changes
Feb 15, 2021
This file contains hidden or 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
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.
This PR, Node comparison is extracted to separate method (
Comparator::compare(Node*,Node*)).Comparatoris here introduce to cover all comparing jobs and manage compared nodes queue.For comparing subgraph we have to create another nodes queue so we need call
Comparator::recreateto create new Comparator with the same set of flags (what should be check inside comparison).Related ticket number: 47693.