Commit Graph

41 Commits

Author SHA1 Message Date
Katarzyna Mitrus
daa2c9ded0
[MO][Opset13] NMSRotated-13 support in MO IR Reader (#20354)
* nms_rotated mo ir read init

* Fix type infer and clean up

* Update tests

* Update tests

* update package BOM file

* Update type_infer

* Avoid files collision in tests

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-10-25 12:04:17 +00:00
Katarzyna Mitrus
33a97740b2
[MO][Opset13] Multinomial-13 support in MO IR Reader (#20446)
* Add Multinomial-13 to MO

* Add Multinomial tests for MO IR reader

* Move convert_type check

* Imports clean up

* Update pacgage BOM file

* Avoid files collision in tests
2023-10-17 17:50:42 +02:00
Anastasiia Pnevskaia
dd45925802
OVC tool leftovers (#18410)
* Made MO cli parser independent from OVC, added OVC Pylint test, minor fixes.

* Small corrections.

* PyLint fixes.

* Added init files.

* PyLint fixes.

* Small correction.

* Removed OVC dependency from MO.

* Fixed MO unit tests.

* PyLint fixes.

* Unit tests fix.

* Returned MO unit tests.

* PyLint configs.

* Small correction.

* Moved offline_transformations to back.

* Moved offline_transformations to back.
2023-07-12 18:18:22 +04:00
Anastasiia Pnevskaia
5d399faa64
convert_model() in openvino.runtime. (#18080)
* Used pip wheel to build OpenVINO wheel

* Added convert_model() to openvino.runtime.

* Removed duplication of InputCutInfo, LayoutMap

* Switched Model Conversion API tests to convert_model from openvino.runtime.

* Small correction.

* Format correction.

* Small correction.

* Removed duplication of moc frontend files.

* Small correction.

* Removed duplication of cli_parser, offline_transformations.

* Code corrections.

* Removed code duplications.

* Removed code duplications.

* Updated codeowners.

* Switched layer tests to convert_model().

* Improvements

* Small correction.

* Caffe parser path fix.

* Added python api properly into deb / rpm packages

* Moved implementation to ovc tool.

* Moved implementation to ovc tool.

* Small correction.

* Use cmake -E variant from cmake 3.13

* Namespace fixes.

* Minor fixes.

* Pylint fixes.

* Fixed BOM file.

* Small corrections.

* Minor corrections.

* Minor fix.

* Error fixes.

* Added telemetry requirement.

* Improvements to fix CI

* Some refactoring

* Don't use developer package for scripts projects

* Added exception in case when MO is not imported.

* Removed exception from init.

* Removed changes from cmake.

* Added unit ovc tests, fixed minor errors.

* Added ovc unit tests to azure.

* Corrected imports.

* Fixed path to tests.

* Added missed files.

* Corrected github labels.

* Removed benchmark app from dev package.

* Small fix.

* Small corrections.

* Comment fixed.

* Removed changes from setup.py

* Removed not needed change.

* Removed duplicating unit tests.

* Removed wrong change.

* Removed not needed change.

* Apply suggestions from code review

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Added ovc tool test, corrected imports.

* Added legacy TF config test.

* Removed not needed files.

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-06-30 18:26:14 +04:00
Xiuchuan Zhai
0b72998631
[MO][PDPD] Convert Paddle models from memory (#17005)
* support convert_model in paddle runtime

* add convert runtime paddle test

* fix a pylint error

* fix ci error

* skip test_mo_convert_paddle.py # Ticket: 95904

* auto remove tmp file

* add docs for PDFE

* enable paddle mo test in ci

* fix docs

* fix docs

* fix the docs
2023-05-20 18:13:21 +04:00
Maxim Vafin
d423491bcb
Fix Scatter value infer for fully dynamic value (#17165)
* Fix issue with dynamic Scatter in MO IR Reader

* Only normalize for 1D tensors

* Add test
2023-04-25 16:38:49 +04:00
Anastasiia Pnevskaia
50a6c88ea3
Fix of crashes of convert_model() when executed for different frameworks (#16968)
* Fix of class conflicts in different frameworks.

* Remove commented code.

* Moved FakeQuantWithMinMaxVars to common part.

* Fixed BOM package test.

* Removed not needed code.

* Removed not needed code.
2023-04-21 19:29:38 +04:00
Roman Kazantsev
4ba0ac5476
[MO][TF FE] Support delayed batch setting (#16937)
* [TF FE] Support delayed batch setting

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

* Cover BOM list

* Add unit-tests for batch setting with layout

* Apply code-review: check batch size

* Apply code-review: default index for any dimension

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-04-14 22:35:43 +00:00
Maxim Vafin
23c90aecea
Add support for opset10 and opset11 in MO IR Reader (#16742)
* Add support for opset10 and opset11 in MO IR Reader

* Fix unique

* Refactor tests

* Fix Unique shape infer

* Update tests

* Apply suggestions from code review

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Apply review feedback

* Fix BOM tests

* Update tools/mo/unit_tests/mo/utils/ir_reader/ops_test.py

* Improve error log

* Fix test fails when using pytest

* Add changes forgotten in last commit

* Fix error message

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-04-12 11:35:52 +04:00
Anastasiia Pnevskaia
4098434233
Parameter list and descriptions for mo.convert_model() method in docstring (#16459)
* Added convert_model() params docs.

* Added auto-generating of most cli params.

* Added auto-generating of cli params.

* Small correction.

* Removed wrong change.

* Corrected default values.

* Fixed errors, added tests.

* Small correction.

* Corrected params descriptions, moved cli specific params to separate file.

* Moved params specifics to utils/help.py.
2023-04-05 14:48:13 +04:00
Maxim Vafin
feb448cc89
Fix MO IR Reader for Eye op (#15996)
* Fix MO IR Reader for Eye op

* Fix eye value infer

* Remove debug output

* Add test for eye value infer

* Fix bom tests

* Fix alphabetical order
2023-03-07 20:30:14 +04:00
Ekaterina Aidova
38943434b6
[MO][PT FE] POC Integrate PT FE into MO convert_model (#15197)
* [WIP]: poc: integrate pt fe to mo.convert_model

* temporaly resolve names using signature inspection

* fix logic

* move to moc frontend

* add rank and data type setting

* add input signature

* apply comments

* move after convert processing

* support work without example_input, provide parameters description

* ignore extensions on fe side

* upd tests

* more tests

* add notes about extensions support and removing onnx path

* remove debug prints

* refactoring

* update BOM
2023-02-15 08:19:15 +01:00
Ilya Churaev
0c9abf43a9
Updated copyright headers (#15124)
* Updated copyright headers

* Revert "Fixed linker warnings in docs snippets on Windows (#15119)"

This reverts commit 372699ec49.
2023-01-16 11:02:17 +04:00
Maxim Vafin
fce4641a25
Preserve input constant in Squeeze and Unsqueeze shape infer (#14432)
* Preserve input constant when Squeeze and Unsqueeze shape infer is sone in MO IR Reader

* Fix bom test

* Add tests

* Fix value

* Fix test

* Apply suggestions from code review

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-12-16 15:08:28 +04:00
Pavel Esir
34f16bf749
[MO] turn on bom_tests (#13721)
* turn on bom_tests

* fixed root directories to search

* leftovers fix

* removed requirements from package_BOM.txt; corrected error messages to install via pip

* removed extract_release_version.py from package_BOM.txt, added requirements files to skip

* removed redundant commented line

* mentioned CustomLayersMapping.xml.example in docs

Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
2022-11-15 12:38:59 +04:00
Anastasia Popova
940844e71f
mo.convert() method. (#11347)
* convert() method added.

* Moved conversion to convert() method.

* Fixed commits.

* Output dir fix.

* Added objects support for extesions param.

* Added support for transformations_config extension objects.

* Input to str unit tests.

* Added tests, added comments.

* Updated BOM.

* Removed commented code.

* Fixed extension passing.

* Small corrections.

* Fixed for python 3.6.

* Small fix.

* Moved dir creating to ov.serialize(), removed mo.serialize(), small fixes.

* Small fix.

* Small correction.

* Removed coping of params, moved convert implemetation to separate module.

* Import fixes.

* Moved hiding of exceptions to main().

* Updated comment.

* Fixed unit tests.

* Comment changed.

* Fixed dir creating.

* Tests fixed.

* Small fixes.

* Test fix.

* Added meta data generation, removed printing of execution time for silent mode.

* Import fix.

* Conflict fix.

* Fixed error.

* Fix for custom config.

* Added version, data_type params to help.

* Added mo.convert() full-functional tests.

* Small corrections.

* Comment correction.

* Moved convert to openvino package, moved LayotMap and InputCutInfo to openvino.convert.

* Added help param.

* Wrong change removed.

* Small fix.

* Removed unnecessary comments.

* Removed .xml extension check from append_ir_info.

* Added missed file.

* Fixed error.

* Fix for bool value in InputCutInfo.

* Moved InputCutInfo, LayoutMap to openvino.tools.mo.

* Moved InputCutInfo, LayoutMap to openvino.tools.mo.

* Moved check and read_model to emit_ir.

* Small correction.

* Added comment.

* Added unit_tests with convert().

* Small corrections.

* Removed convert alias from openvino.

* Fixed conflicting unit tests.

* Removed unnecessary warnings.

* Params check fix.

* Small correction.

* Added paths checks.

* Added negative tests for to_str methods, fixed errors.

* Added tuples support in input parameter.

* Moved reminders to update OV and use API 2.0 to main().

* Returned .mapping file generating.

* Added positional input_model param.

* Added test for unnamed input_model.

* Optimize imports.

* Added more informative error for brackets syntax in --input.

* Conflict fix.

* Conflict fix.
2022-09-23 17:29:00 +04:00
Leonard Sikorski
91546336bc
[MO][Kaldi] RestrictedAttention component support in MO (#12582) 2022-08-22 09:10:20 +02:00
Maxim Vafin
000f5d8049
Use new reprocessing for legacy MO (#11302) 2022-08-19 15:33:30 +04:00
Mateusz Bencer
d7ce8289ac
[MO] Fix SSliceComplex transformation (#12537) 2022-08-19 12:14:10 +02:00
Evgenya Stepyreva
00d34c5f1d
Remove Interpolate Transposes as it does nothing (#12205) 2022-07-25 19:26:55 +00:00
Przemyslaw Wysocki
603b56ec7f
[MO] Fix output shape bug in GatherNDDecomposition (#12110) 2022-07-15 15:37:57 +02:00
Katarzyna Mitrus
fb09555b6d
[Eye-9] Extend MO with Eye-9 op (#11555) 2022-06-02 11:29:55 +02:00
Jan Iwaszkiewicz
320531def0
[MO] SoftSign operator extractors (#11726) 2022-05-25 11:44:26 +02:00
Mateusz Bencer
a859024d76
MO support of RDFT and IRDFT (#11690) 2022-05-21 13:14:23 +02:00
Alexander Sesorov
fb7249d496
[bandit] Add nosec for subprocess (#10941) 2022-03-22 12:56:54 +03:00
Svetlana Dolinina
d2177cf177
remove old protobuf eggs (#10473) 2022-02-18 18:12:23 +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
Pavel Esir
9bb7697b2f
[MO] fix simplified MO import for PyCharm Debug (#9866)
* fix simplified MO import for PyCharm Debug

* package_BOM update
2022-02-01 13:14:48 +03:00
Pavel Esir
73e9eb4c61
[MO] add reinterp_shape for StridedSlice (#9622)
* added reinterp_shape for StridedSlice

* package_BOM update

* corrected unit-tests

* returned removed tests
2022-01-31 22:17:15 +03:00
Yegor Kruglov
bc70b2b68b
[ MO ] Support MXNet operation arange_like (#8939)
* arange_like_op

* added comments

* added unittests

* added step attr, changed axis condition, updated tests

* added op description

* fix nodes renaming

* sorted imports

* added case with repeat > 1

* finished arange_like, removed unit test

* small fix in gather infer function

* gather fix

* fix doc

* added unittests

* correct renames

* removed ConvertLike from div_sqrt_dim

* used ReduceProd instead reshape-shapeof

* added keep_dims attr to reduce_prod node
2022-01-27 12:44:12 +03:00
Eugeny Volosenkov
439e3b26aa
Model Optimizer incorrectly convert per-channel Quantize/Dequantize operatros to FakeQuantize (#8321)
* add q_dq_resolver

* prepare FQ for offline transfornations

* fix quantize_dequantize_linear_resolver.py

* fix tools/mo/openvino/tools/mo/middle/dequantize_linear_resolver.py

* enable compress_quantized_weights.py

* fix sub case

* delete force_clean_up

* add isolated attribute

* add test for quantize_dequantize_linear_resolver

* fix comments

* apply comments

* aplying comments

* applying comments

* applying comments

* Replace q_dq_resolver using pattern

* clean imports

* fix imports

* fix pattern

* delete refernce to unit tests
2022-01-25 15:35:43 +03:00
Mateusz Bencer
70ccd0e91f
Handle special cases during fallback (#9651) 2022-01-20 23:34:24 +01:00
Alexey Suhov
a79830cb55
Update year to 2022 in copyright notice (#9755) 2022-01-19 01:07:49 +03:00
Mateusz Bencer
5fe228bc14
Intorduce json model analysis feature on the new path (#9618) 2022-01-18 11:18:19 +01:00
Svetlana Dolinina
71b7c7000a
Changed permutes mechanics for Kaldi (#5744)
* changed permutes

* fixed permutes

* fixed kernel

* fix transpose after convolution

* fix for convnet

* insert transposes for all convolutions and poolings

* refactor transformations;
added unit tests;
removed old transformations for addinf permutes/reshapes

* fixed constant types

* fixes after merge

* fixed bug for rm_cnn4a: added correct time_dim for the first convolution

* added fix for timeheightconvolution: in this case we have correct time set in convolution kernel already

* minor review fixes: renamed transformation and file

* rename in test

* rename in test

* sort imports + couplt changes in comments

* review fixes: refactoring

* replaced recursive implementation by nx.topological_sort;
fixed comments

* minor fixes: comment + preserving node names
2022-01-18 12:10:51 +03:00
Yegor Kruglov
9b129b7c1a
[MO] Support MXNet Operations: batch_dot, LayerNorm, div_sqrt_dim (#7641)
* Add new operation support

* Update range_like replacer

* Move layer normalizer to middle

* Update bom file

* Update bom

* removed ArangeLike op

* updated bom

* added tests

* Updated docs

* comments relolving

* resolve documentation merge conflict

* arange_like op

* Revert "arange_like op"

This reverts commit a30f5bbb48.

* fixes in div_sqrt_dim

* comments resolving

* updated tests

* added batch_dot and layer_norm descriptions

* updated batch_dot comment

* updated comment

* move extractors to mxnet folder

* added replacer for batch_dot

* Revert "added replacer for batch_dot"

This reverts commit 8c0e52f7dc.

* return fully connected normalization

* fix typo

* updated fully connected normalization for mxnet

* changed assert message

* fixed gamma and beta shape incompatibility problem

* fixed imports, updated unittest

* resolve comments

Co-authored-by: iimironov <iliya.mironov@intel.com>
2022-01-18 11:12:30 +03:00
Roman Kazantsev
a53a4da3a2
[MO, Frontends] Implement ChangePlaceholderType as Offline Transformation (#8245)
* [Common FrontEnd] Implement ChangePlaceholderType transformation with OldApiMap

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

* Add ChangePlaceholderType pass into frontend normalize

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

* Add a comment about the transformation

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

* Fix build issue

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

* Apply code review comments: remove ngraph namespace rountine, etc.

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

* Remove use of extra Node object in set_old_api_map call

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

* Create separate pass for legacy nGraph transformations for MO with new frontend

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

* Fix build for ieFuncTests

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

* Fix build issue with namespace conflicts

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

* Revert "Fix build issue with namespace conflicts"

This reverts commit 50a189f4e5.

* Move legacy transformations to ngraph namespace

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

* Fix build issue with unresolved MOCLegacyTransformation

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

* Adjust code to new OldApiMap API

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

* Resolve merge conflicts

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

* Fix build issue

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

* Do not set legacy type for parameter in case user defined type

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-01-13 15:29:51 +03:00
Eugeny Volosenkov
00da13b058
Support TF ScatterND and CenterNet (#9257)
* add ScatterND for tf

* Fix ApplyPermutation

* fix description of TFScatterNDDecomposition

* fix permutation

* fix package_POM

* fix pom file

* fix BOM file

* fix bom file

* Added layer tests for TF ScatterND

* fix comments

* fix bom file

* Add additional tests

* Add additional tests

* Added ConvertLike to ScatterND decomposition
2022-01-12 23:15:45 +03:00
Maxim Vafin
3f35e2a321
Enable new FP16 and support mixed precision by MO (#8514)
* Enable new FP16 format and support mixed precision

* Apply review comments

* Fix issue with fp64 in FakeQuantWithMinMaxVars.py

* Enabme decompression converts fusing for CPU plugin

* Apply review feedback

* Fix code style

* Fix issue with np.full and apply review feedback

* Apply review feedback

* Fix HardSigmoid onnx extractor

* Replace np.arrays that were skipped with mo_array

* Fix compress_quantized_weights_test.py

* Fix import issues

* Apply review feedback and fix type of fusing linops in MO

* Apply review feedback

* Fix types for Mean/Scales and MXNET zeros

* Add RandomUniform_8 to ConvertPrecision

* Fix merge issue

* Fix consts names collision in GPU plugin
2021-12-24 14:00:37 +03:00
Yegor Kruglov
bd2880812f
FifoQueueDequeue replacer (#8891)
* added_replacer

* updated comments

* move cut to fifo_replacer

* extend shape serializer for parametr node

* warning message and docstrings

* docs update

* doc fix
2021-12-24 11:38:21 +03:00
Pavel Esir
980904c9ec
[MO] Align MO namespaces (#7708)
* Moved and merged mo/ and extensions/ into openvino/tools/mo

* edited imports

* edited docs to use mo script from entry_point

* edited MO transformations list loading and setup.py

* changed full path -> 'mo' entry point in docs (leftovers)

* corrected package_BOM

* updated resolving --transformation_config in cli_parser.py

* pkgutil-style __init__.py, added summarize_graph into entry points

* updated DOCs for the new --transformations_config

* fix select

* updated install instructions, fixed setup.py for windows and python_version < 3.8

* fixed typo in requirements.txt

* resolved conflicts

* removed creating custom __init__.py from setup.py

* corrected folder with caffe proto

* corrected loading user defined extensions

* fix openvino.tools.mo import in serialize.py

* corrected layer tests for new namespace

* fix in get_testdata.py

* moved model-optimizer into tools/

* renamed import in POT

* corrected mo.yml

* correct CMakeLists.txt for the newest tools/mo

* corrected find_ie_version.py

* docs and openvino-dev setup.py update for the newest tools/mo

* miscellaneous leftovers and fixes

* corrected CI files, pybind11_add_module in CMakeLists.txt and use of tools/mo path instead of tools/model_optimizer

* add_subdirectory pybind11 for tools/mo

* POT path fix

* updated setupvars.sh setupvars.bat

* Revert "updated setupvars.sh setupvars.bat"

This reverts commit c011142340.

* removed model-optimizer env variables from setupvars

* updated CMakeLists.txt to pack MO properly with tests component

* corrected left imports, corrected loading requirements for layer tests

* mo doc typo correction

* minor corrections in docs; removed summarize_graph from entry_points

* get_started_windows.md, MonoDepth_how_to.md corrections, mo path corrections
2021-12-08 08:53:53 +03:00