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

Unification of layout and data types of Parameter and Result in MO #7630

Merged

Conversation

popovaan
Copy link
Contributor

@popovaan popovaan commented Sep 23, 2021

Description:

Ticket: 64968, 64969, 66836

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
  • 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

Additional validation:

  • Checked all models in DL Benchmark where Parameter type is changed from uint8 to float.
    All such models have Parameter(uint8) -> Convert(float32) pattern in original model.
  • Checked DL Benchmark for possible regression of conversion.
  • Checked TF BERT models converted with --disable_nhwc_to_nchw.
  • Check e2e-nightly on this branch

@popovaan popovaan changed the title Unification of layout and data types of Parameter and Result Unification of layout and data types of Parameter and Result in MO Sep 28, 2021
@popovaan popovaan marked this pull request as ready for review September 28, 2021 15:01
@popovaan popovaan requested review from a team, pavel-esir, mvafin, sadolini, rkazants and jane-intel and removed request for a team September 28, 2021 15:01
@popovaan popovaan requested a review from jane-intel September 30, 2021 08:53
model-optimizer/mo/utils/ir_engine/compare_graphs.py Outdated Show resolved Hide resolved
model-optimizer/mo/ops/op.py Outdated Show resolved Hide resolved
@popovaan popovaan requested a review from jane-intel September 30, 2021 18:10
Copy link
Contributor

@pavel-esir pavel-esir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general LGTM. The only thing unit-tests might be helpful. Approved in advance

@GlebKazantaev GlebKazantaev force-pushed the old_api_map_transposes_insertion branch from a3d36a8 to a974d40 Compare October 13, 2021 11:05
@GlebKazantaev GlebKazantaev self-assigned this Oct 13, 2021
@popovaan popovaan requested a review from a team October 13, 2021 15:59
@GlebKazantaev GlebKazantaev force-pushed the old_api_map_transposes_insertion branch 2 times, most recently from a9c2b7e to 3fe54e8 Compare October 13, 2021 16:13
@GlebKazantaev GlebKazantaev added this to the 2022.1 milestone Oct 13, 2021
@GlebKazantaev GlebKazantaev added the category: MO Model Optimizer label Oct 13, 2021
@GlebKazantaev GlebKazantaev force-pushed the old_api_map_transposes_insertion branch from 99c521b to 673214e Compare October 20, 2021 16:59
@GlebKazantaev GlebKazantaev enabled auto-merge (squash) October 26, 2021 14:12
@GlebKazantaev GlebKazantaev merged commit bf8f916 into openvinotoolkit:master Oct 27, 2021
a-noskov pushed a commit to a-noskov/openvino that referenced this pull request Oct 27, 2021
…penvinotoolkit#7630)

* Added transposes insertion for Parameter and Result.

* Separated into several transformations.

* Corrected runtime_info format.

* Fixed runtime info serialization.

* Code refactoring.

* Corrected checks.

* Added debug output.

* Added check.

* Fixed unit tests.

* Changed old api map format, removed debug output.

* Moved serialize to rt_info property, code corrections.

* Refactored RTInfo class.

* Small corrections.

* Small corrections.

* Removed redurant import.

* Added tests, added undefined default type.

* Code reformat.

* Fixed serialization unit tests.

* Added comment.

* Added comment.

* Small test correction.

* Changed default values of old_api_map to values from old API IR.

* np.array -> int64_array

* Update MO to use FE to read IR; Swith MO IR version to 11

* Preserve output node name when inserting Transpose

* Codestyle

* Fix layer tests

* Pylint fix

* Disable ref_graphs comparision in layer tests

* codestyle

* Updated MO IR reader.

* Moved version initialization to constructor of OldApiMap.

* Added shape infer after transpose insertion.

* Fixed Pylint

* Removed wrong attribute removal.

* Added transposes insertion for Parameter and Result.

* Separated into several transformations.

* Corrected runtime_info format.

* Fixed runtime info serialization.

* Code refactoring.

* Corrected checks.

* Added debug output.

* Added check.

* Fixed unit tests.

* Changed old api map format, removed debug output.

* Moved serialize to rt_info property, code corrections.

* Refactored RTInfo class.

* Small corrections.

* Small corrections.

* Removed redurant import.

* Added tests, added undefined default type.

* Code reformat.

* Fixed serialization unit tests.

* Added comment.

* Added comment.

* Small test correction.

* Changed default values of old_api_map to values from old API IR.

* np.array -> int64_array

* Update MO to use FE to read IR; Swith MO IR version to 11

* Preserve output node name when inserting Transpose

* Codestyle

* Fix layer tests

* Pylint fix

* Disable ref_graphs comparision in layer tests

* codestyle

* Updated MO IR reader.

* Moved version initialization to constructor of OldApiMap.

* Added shape infer after transpose insertion.

* Fixed Pylint

* Removed wrong attribute removal.

* Serialize fix.

Co-authored-by: Gleb Kazantaev <[email protected]>
akuporos pushed a commit to akuporos/openvino that referenced this pull request Oct 28, 2021
…penvinotoolkit#7630)

* Added transposes insertion for Parameter and Result.

* Separated into several transformations.

* Corrected runtime_info format.

* Fixed runtime info serialization.

* Code refactoring.

* Corrected checks.

* Added debug output.

* Added check.

* Fixed unit tests.

* Changed old api map format, removed debug output.

* Moved serialize to rt_info property, code corrections.

* Refactored RTInfo class.

* Small corrections.

* Small corrections.

* Removed redurant import.

* Added tests, added undefined default type.

* Code reformat.

* Fixed serialization unit tests.

* Added comment.

* Added comment.

* Small test correction.

* Changed default values of old_api_map to values from old API IR.

* np.array -> int64_array

* Update MO to use FE to read IR; Swith MO IR version to 11

* Preserve output node name when inserting Transpose

* Codestyle

* Fix layer tests

* Pylint fix

* Disable ref_graphs comparision in layer tests

* codestyle

* Updated MO IR reader.

* Moved version initialization to constructor of OldApiMap.

* Added shape infer after transpose insertion.

* Fixed Pylint

* Removed wrong attribute removal.

* Added transposes insertion for Parameter and Result.

* Separated into several transformations.

* Corrected runtime_info format.

* Fixed runtime info serialization.

* Code refactoring.

* Corrected checks.

* Added debug output.

* Added check.

* Fixed unit tests.

* Changed old api map format, removed debug output.

* Moved serialize to rt_info property, code corrections.

* Refactored RTInfo class.

* Small corrections.

* Small corrections.

* Removed redurant import.

* Added tests, added undefined default type.

* Code reformat.

* Fixed serialization unit tests.

* Added comment.

* Added comment.

* Small test correction.

* Changed default values of old_api_map to values from old API IR.

* np.array -> int64_array

* Update MO to use FE to read IR; Swith MO IR version to 11

* Preserve output node name when inserting Transpose

* Codestyle

* Fix layer tests

* Pylint fix

* Disable ref_graphs comparision in layer tests

* codestyle

* Updated MO IR reader.

* Moved version initialization to constructor of OldApiMap.

* Added shape infer after transpose insertion.

* Fixed Pylint

* Removed wrong attribute removal.

* Serialize fix.

Co-authored-by: Gleb Kazantaev <[email protected]>
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.

9 participants