Commit Graph

141 Commits

Author SHA1 Message Date
Pavel Esir
16a5962698 [MO] pad fusing fix (#10453)
* pad fusing fix

* added unit-tests for pad fusing fix

* fixed port reconnecting

* Update tools/mo/openvino/tools/mo/middle/passes/fusing/mark_unfused_nodes.py

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
2022-03-31 14:07:07 +03:00
Anton Chetverikov
5d719cbc7b [MO] Remove _output_shape nodes attribute while loading TF meta graph (#11078)
* Remove _output_shape attribute while loading meta_graph

* Update tools/mo/openvino/tools/mo/front/tf/loader.py

Simplify code

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>

* Add comment about the problem

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
2022-03-29 21:27:00 +03:00
Ilya Lavrenov
fb99fd1d2f Try to remove MO install rules (#11208)
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2022-03-29 19:24:30 +03:00
Anastasia Popova
45a21bf902 Fixed setting of input name for case of multiple outputs from Parameter. (#11019)
* Fixed setting of input name for case of multiple outputs from Parameter.

* Small correction.
2022-03-25 12:11:07 +03:00
Nikita Malinin
b50079143f Update IRReader with the ResultRenaming flag (#10988) 2022-03-23 13:16:40 +03:00
Alexey Lebedev
3de9189d50 [core][python] ov::serialize (#10945)
* add ov::serialize

* create python binding

* update python tools

* use ov::serialize in benchmark app

* remove serialize from python offline_transformations

* fix import

* revert pot

* update docs

* apply review comments

* add const

* make bin path optional

* Add docs

* add compare test
2022-03-23 11:44:00 +03:00
Alexander Sesorov
fb7249d496 [bandit] Add nosec for subprocess (#10941) 2022-03-22 12:56:54 +03:00
Maxim Vafin
c8f4f9b7db [MO] Fix swish value infer (#10802) 2022-03-18 14:56:37 +03:00
Roman Kazantsev
6ec8e53183 Update Model Optimizer User Guide (#10759)
* Remove install prerequisites steps, order FWs, and move pre-processing details

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update Introduction: examples of MO CLIs, references to parameters description pages

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update Setting Input Shape section

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update Optimizing Preprocessing Computation page

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Revert location of Additional_Optimizations.md

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Describe layout and FP16 support in MO

* Fix docs issue

* Apply feedback

* Apply review feedback

* Clean-up Resources

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Mention FP16 compression in MO Introduction

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply the first portion of feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply the second portion of feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply review feedback

* Apply review feedback

* Apply the third portion of feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply suggestions from code review

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Apply feedback for FP16 compression documentation

* Apply review for FP16 page

* Apply suggestions from code review

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/MO_DG/prepare_model/Additional_Optimizations.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Apply feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Address feedback about tutorials, input_shape option

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Rework Setting Input Shapes section

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update "See also" list

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Correct conversion documents for each FW

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Refactor TensorFlow converting document and expand Embedding Preprocessing document

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix a link to POT

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply suggestions from code review

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>
Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2022-03-14 13:08:58 +03:00
Roman Kazantsev
0c20e7a3ca [MO] Remove IR frontend from available frontend list in MO (#10798)
* [MO] Remove IR frontend from available frontend list in MO

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix issue - forget to pass FEM

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix issue for TF with new FE and default legacy

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-03-04 20:50:02 +03:00
Mateusz Bencer
fd18632d89 Update --extenions MO doc (#10763) 2022-03-04 07:24:52 +03:00
Mateusz Bencer
d1630c9ac1 Fix problem with segfault during using extension feature via Python (#10650) 2022-03-03 11:22:42 +01:00
Anastasia Popova
3f941e3c5f Corrected layout parsing error message. (#10651)
* Corrected error message.

* Corrected message.

* Small correction

* Corrected error message for source and target layout.
2022-03-01 16:03:09 +03:00
Roman Kazantsev
6c78715749 [MO] Clean up Model Optimizer options, help, and documentation (#10653)
* [MO] Clean-up MO cmd-line options

Remove the following Model Optimizer deprecated options that are no longer used for several releases: disable_fusing, disable_gfusing, generate_deprecated_IR_V7,
legacy_ir_generation, keep_shape_ops, move_to_preprocess
Deprecate through CLI the following options for which functionality triggered from POT or automatically: disable_weights_compression, disable_nhwc_to_nchw,
disable_resnet_optimization, finegrain_fusing.
Correct and extend description of each MO option to be printed during model conversion.

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Correct documentation about input shapes

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Perform final corrections in documentation

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Remove legacy_ir_generation overall

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Clean-up tests from deprecated options

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Recover disable_fusing option as deprecated

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix keys for static_shape and extensions

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Remove extension key that does not work

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback: remove disable_gfusing, correct docs

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Recover disable_fusing option for unit-tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback for documentation

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback about parameters use_legacy_frontend and use_new_frontend

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* DO minor fixes for indentation of MO logs

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Revert log.error for fallback message

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Revert disable_weights_compression parameter for tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-03-01 10:57:24 +03:00
Andrei Kochin
4b29eed013 Update MO requirements to allow TF1.15 if already installed (#10673)
* Update MO requirements to allow TF1.15 if already installed

* Removing pyhton version check as redundant

* Updating requirements.txt as well
2022-02-28 18:55:44 +03:00
Roman Kazantsev
bc0a84a1c1 [MO] Print information about new API 2.0 (#10567)
* [MO] Print information about new API 2.0

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-02-22 16:54:20 +03:00
Maxim Vafin
435584bb91 Support dynamic Broadcast and new pattern for TI condition (#9735)
* Support dynamic Broadcast and new pattern for TI condition

* Apply review feedback

* Fix broadcast if statement
2022-02-22 16:46:48 +03:00
Pavel Esir
3d223ebc2a [MO] update error message when reverse infer was not successful (#10576)
* update error message when reverse infer was not successful

* corrected message when there are several undefined Parameters
2022-02-22 13:51:10 +03:00
Ivan Tikhonov
e89c7ed8e5 Describe MakeStateful transformation in MO help (#10536)
* Update --transform help for MakeStateful transformation

* add quotes
2022-02-21 09:55:26 +03:00
Pavel Esir
fb6359586d fix ConvertGroupedStridedSlice.py for XLNet (#10496) 2022-02-18 22:40:28 +03:00
Svetlana Dolinina
d2177cf177 remove old protobuf eggs (#10473) 2022-02-18 18:12:23 +03:00
Roman Kazantsev
20266dd0c3 [MO] Upgrade TensorFlow version dependency due to SNYK hits (#10487)
* [MO] Upgrade TensorFlow version dependency due to SNYK hits

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Still use 2.5.0 TensorFlow for Python 3.6 and older

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-02-18 12:29:58 +03:00
Anton Chetverikov
e444715c8d [MO] Restore inputs order in IR Reader (#10403)
* Restore inputs order in IR Reader

* Add saving of outputs order
2022-02-17 13:07:34 +03:00
Pavel Esir
121d59aa80 [MO] move importlib-metadata into setup.py (#10319)
* handle 'and' marker in requirements

* Revert "handle 'and' marker in requirements"

This reverts commit 952bb949ca.

* moved importlib-metadata from requirements.txt into setup.py
2022-02-15 15:01:27 +03:00
Anastasia Kazantaeva
ccc38d22a8 Upgrade MO message for 2022.1 (#10315) 2022-02-15 13:10:45 +03:00
Bartek Szmelczynski
2b03d5fe66 [MO args][ONNX FE]fix cutting graph with input, output or both (#9698)
* fix cutting graph with input, output or both

* fix collisions

* add regex

* revert changes to regex, fix decond_name_with_port function

* fix collisions

* optimize try_get_node function

* swap bool with enum

* revert accidental import

* optimize the code

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* remove redundant check

* fix wrong nodes returns

* fix decode_with_port_name implementation, add comments

* reduce code duplicates

* remove redundant imports

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>
2022-02-15 10:55:40 +03:00
Anton Chetverikov
84ee38d89e [MO] Move redundant checks in ScatterUpdate operation shape infer (#10306)
* Add extender for ScatterUpdate operation

* Remove scatterupdate extender

* Remove redundant checks in Scatter shape inference function

* Move checks to ScatterElementsUpdate operations

* mava checks to appropriate place
2022-02-15 04:55:38 +03:00
Pavel Esir
d1477b8569 fixed setting 'out_ports_count' in ir_reader (#10265) 2022-02-14 16:01:22 +03:00
Daniil Lyakhov
56be1a5438 Change User Transformations applying order in MO (#10241)
* Fix user transformation order in mo

* Move user transformation behind FP16 compression

* Move user transformation call before fp16 compression
2022-02-14 15:06:09 +03:00
Anastasia Popova
ac2e639ff8 Added telemetry to modules names list. (#10295) 2022-02-13 10:28:17 +03:00
Pavel Esir
653ed4a34c [MO] use revision hashes to compare IE & MO versions (#10230)
* fixed version comparison: for comparsion extracted hashes are used

* shortened 7 -> 11 to match the current version fromat from nightly

* corrected regex, added comparing by minimal hash len
2022-02-12 00:13:48 +03:00
Tomasz Dołbniak
c186449735 Do not process null nodes in JSON analysis (#10269) 2022-02-11 08:42:25 +01:00
Anton Chetverikov
50dffb80bb Add missed DeformableConvolution to back transformations (#10255) 2022-02-10 17:20:11 +03:00
Anton Chetverikov
9af8d9339c [MO] Avoid maskedconstant to array conversion (#10233)
* Avoid maskedconstant to array conversion

* remove redundant input

* Add link to github issue
2022-02-10 16:24:05 +03:00
Tomasz Dołbniak
aedd902cd8 Use double quotes in JSON analysis (#10237) 2022-02-09 20:41:49 +03:00
Pavel Esir
654b025a26 [MO] set explicitly argument dtype to int for np.split (#9988)
* forced split argument dtype to int

* added unit-test

* fixed typo in split_test.py

* set explicitly np.int64 instead of np.int

* use split_length's dtype
2022-02-09 12:16:33 +03:00
Anton Chetverikov
25ca17e789 [MO IR Reader] Update *Sequence backend_attrs (#10041)
* Update LSTMSequence backend_attrs

* Add missed attribute clip

* Update backend_attrs for all *sequence operations

* Add extender for GRUSequence

* Add GRUSequence to custom ops list

* use has_and_set instead if direct acces to attributes
2022-02-09 12:13:23 +03:00
Maxim Vafin
52374a4b8b Write runtime version and how IR was genarated (legacy path or not) (#10196) 2022-02-09 11:41:49 +03:00
Maxim Vafin
1970baeb1c Apply RIC for dynamic dimension in legacy MO (#10130)
* Apply RIC for dynamic dimension in legacy MO and fail if RIC wasn't applied to any input

* Fix moc tests
2022-02-08 22:17:19 +03:00
Anton Chetverikov
f9eaaa9ff6 [MO] Sqrt operation implementation (#9950)
* Add sqrt extender

* Update check to not use default infer in infer was set before

* Update comment

* Fix comment

* Remove Sqrt extender

* Remove unnecessary changes

* Add MO implementation of SQRT operation
2022-02-08 11:41:13 +03:00
Yegor Kruglov
9d3028a9f7 [MO] Pip installation message for not satisfied dependencies (#9952)
* changed message for not satisfied package

* changed warning message
2022-02-07 22:19:02 +03:00
Yegor Kruglov
bde1d5edb0 added condition for optional outputs (#10097) 2022-02-07 18:24:28 +03:00
Pavel Esir
3d6e90b8f9 concat['override_output_shape'] = True in StridedSliceNormalizer.py (#10045) 2022-02-07 13:24:56 +03:00
Mikhail Nosov
9f9df184c4 Added compatibility check of layout with partial shape (#10144)
* Added compatibility check of layout with partial shape

E.g. layout "NC" in not compatible with PartialShape{1,3,224,224}

Check is added:
- For parameter set_layout
- For parameter set_partial_shape
- For result set_layout
- Checked also compatibility for all results after 'validate_and_infer_types'

* Fix incorrect tests

* Fix of more incorrect tests

* Removed couple of obsoleted error-handling tests - these are catched now on earlier stages

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2022-02-07 11:17:28 +03:00
Anastasia Popova
12a310636d Fixed input cut for case when port is not specified. (#10134) 2022-02-04 19:03:12 +03:00
Roman Kazantsev
64aabc74d1 Check the selected frontend to correspond use_new/legacy_frontend options (#10084)
* Check the selected frontend to correspond use_new/legacy_frontend options

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix a default case when no frontend is found

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-02-03 20:34:07 +03:00
Ilya Lavrenov
f2f281e60b Renamed ov_runtime => openvino, ov_ => openvino_ prefix (#10069)
* Renamed ov_runtime => openvino, ov_ => openvino_ prefix

* Coverage fix

* More fixes

* Fixed MO tests with custom FE
2022-02-03 20:03:41 +03:00
Anastasia Popova
86faa25724 Fix of output tensor names for mask-rcnn* models (#10042)
* Added op names to tensor names for MaskRCNN replacement transformation. Fixed output layout for MaskRCNN.

* Applied commentes left from PR with tensor names fix.

* Added tests for remove_tensor_names().

* Added checks in emitter.

* Removed debug output.

* Small fix.

* Small fix.
2022-02-03 19:44:47 +03:00
Anastasia Popova
ca45bf430a Fixed tensor names set in InputCut and AutomlEfficientDet transformation. (#9998)
* Fixed tensor names setting in InputCut, fixed tensor names losing in AutomlEfficientDet.

* Changed op name adding to tensor names in InputCut for output port case only.
2022-02-03 15:55:16 +03:00
Svetlana Dolinina
5e8f997262 Fix bug in AddReshapeTransposeAroundConvPool for Kaldi LSTM networks (#9885)
* change order of transformations to work correctly with Convolutions in Kaldi LSTM networks

* removed unneeded changes and add unit tests

* remove comment

* remove changes from memory_offset_adjustment, move all fixes inside add_reshape_transpose_around_conv_pool to avoid new bugs

* removed test for deleted changes

* replace -1 by None
2022-02-01 17:06:49 +03:00