Commit Graph

861 Commits

Author SHA1 Message Date
Ilya Lavrenov
35a0706dff Replaced several cmake utilities with new ov_ prefix (#19819)
* Replaced several cmake utilities with new ov_ prefix

* Replaced several cmake utilities with new ov_ prefix
2023-09-14 16:22:50 +04:00
Przemyslaw Wysocki
b1b3343ffc [PyOV] Bump scipy to a secure version and bump OMZ (#19458)
* Bump omz and scipy

* Separate versions per python version

* Change scipy in pot
2023-09-14 13:41:27 +02:00
Georgy Krivoruchko
5eff59a2d0 [ONNX] Switched ONNX to 1.14.1 (#18359)
* Switched ONNX to 1.14

* Updated IR_VERSION in the tests

* Assigned an extended tests to issues

* Switched ONNX to 1.14.1

* Slightly relaxed requirements for ONNX 1.14.1 and updated conan.lock
2023-09-13 15:40:08 +04:00
Pratham Ingawale
9250d17e01 pytest:- extractor_test.py (#19487) 2023-09-12 22:23:09 +04:00
Maxim Vafin
a6bc78dd0f [PT FE] Separate tracing and scripting modes (#19676)
* [PT FE] Separate scripting and tracing in decoder

* Fix convert_model to accept decoder

* Some fixes

* Fix code style

* Fix preprocessor tests

* Fix tests

* Fix tests

* Fix more tests

* Fix ovc tests
2023-09-12 12:40:20 +04:00
Maciej Smyk
3677dda457 [DOCS] 23.0 to 23.1 link update for master (#19584)
* 2023.1 link fix

* 2023.1 link fix

* 2023.1 link fix

* 2023.1 link fix

* 2023.1 link fix
2023-09-04 15:40:02 +02:00
Nikita Malinin
a4b0fe51af [POT] Update for CI (#19067)
* Update references
2023-09-01 18:12:24 +02:00
Pavel Esir
b8226db465 [OVC] Fix output parsing (#19425)
* fix parsing output

* use always coma backspace to separate outputs ', '

* update docstring

* call parser only for ovc cli tool

* docstring correction

* separate docs for cli tool and convert_model; other minor changes

* drop redundant arg from cli_parser_test.py

* more solid test cases added

* remove redundant argv.framework from cli_parser_test.py

* shape correction in concat

* Apply suggestions from code review

fix: coma -> comma

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

* apply review suggestions

* remove extra ')'

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-09-01 11:20:22 +02:00
Pavel Esir
9a1726a419 [ovc] check if input is correct in split_inputs (#19350) 2023-08-30 17:13:43 +04:00
Liubov Talamanova
b790458da6 [POT] Fix bug in classification sample (#19490)
* Fix bug in classification sample

* fix readme
2023-08-30 13:18:44 +02:00
Pratham Ingawale
82afb47e36 generator functionality to pytest (#19402)
* trying with pytest

* update as per suggested

* pytest testing on compress_quantized_weights_test

* resolved warning of assert on tuple

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-08-29 03:01:49 +04:00
Maxim Vafin
e11e8ede1b [MO] Fix issue in nncf version verification (#19347)
* Return deleted nncf import

* Remove try-except, it hides exception

* Get version visout importing nncf module
2023-08-23 21:16:26 +02:00
Ekaterina Aidova
80b8b6fff1 [PT FE]: allow example input list with single tensor (#19308) 2023-08-23 12:08:39 +04:00
Pratham Ingawale
9a76daf94b generator to pytest (#19298)
* trying with pytest

* update as per suggested

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-08-22 17:42:56 +04:00
Roman Kazantsev
24ddf1b274 [TF FE] Use regular Convolution in case dynamic input channels (#19253)
* [TF FE] Use regular Convolution in case dynamic input channels

This solution is aligned with the legacy frontend but it has limitation.
This is a temporal solution until the core obtains ShapeOf evaluator.

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

* Remove unused variable from the test

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

* Fix unit-test

* Update mo unit-test

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-08-18 13:39:59 +04:00
Sergey Lyalin
f0300a36eb Efficient FP32 -> FP16 conversion for convert_precision, save_model, ovc and mo (#18988)
* WIP Postpone fp16 in CompressFloatConstantsImpl

* Apply suggestions from code review

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* WIP: Compression to FP16 in Serialize

* Prepared for efficient fp32 to fp16 conversion

* Update src/core/reference/src/runtime/reference/convert.cpp

* Called real slow reference implementations in the place where the optimized versions are supposed to be implemented

* Code style

* Fixed 0 values in the fast f64 to f16 compression

* Optimized convert_from_f32_to_f16_with_clamp

* Added optimized f32->f16 instance of change_constant_precision

* compression transformation Python test

* use tmp dir, minor corrections

* Update src/bindings/python/tests/test_transformations/test_compression.py

* Update src/bindings/python/tests/test_transformations/test_compression.py

* style fix

* define rt_info for postponed_fp16_compression

* remove redundant class

* fix temp dir for Win in test_compression.py

* update definitions in convert.hpp

* Update implementation in convert.cpp

* Update serialize.cpp

* Update compress_float_constants.cpp

* added macros for ARM/non_x86 in convert.cpp

* fix macros in convert.cpp

* change fixme placement in serialize.cpp

* style_fix

* Update src/core/reference/src/runtime/reference/convert.cpp

* style_fix

* Optimized count_out_of_f16_range

* Code style

* Revert unused

* Update src/core/src/pass/serialize.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* Update src/core/reference/src/runtime/reference/convert.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* use optimized convert_from_f32_to_f16_with_clamp for non postponed

* minor corrections

* Update src/common/transformations/src/transformations/common_optimizations/compress_float_constants.cpp

* Update compress_float_constants.cpp

* Switched mo and ovc to save_model instead of serialize to leverage performance improvements in fp32->fp16

* Applied minor code imporvements to address review feedback

* Minor changes in code

* Update tools/ovc/openvino/tools/ovc/main.py

* Apply suggestions from code review

* Fixed failed test in case when both usual xml compression and fp16 compression are applied simultaneously (disabled for now)

* Added description for CompressFloatConstantImpl postponed parameter

* Description of postponed parameter for CompressFloatConstants

* Reverted switching to save_model in mo as the compression can be applied not only via CLI and old code should be kept for Python path (not applicable for ovc)

* Removed remining committed test artefacts and reverted remaining changes in mo

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: dmitrygo <dmitry.gorokhov@intel.com>
Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com>
Co-authored-by: Pavel Esir <pavel.esir@intel.com>
Co-authored-by: Pavel Esir <pavel.esir@gmail.com>
2023-08-17 11:08:33 +00:00
Anastasiia Pnevskaia
3ef345095c Set CF=False. (#19223) 2023-08-17 11:22:26 +04:00
Anastasiia Pnevskaia
7a566313e5 Fixed 'output_model' logic in OVC. (#19171)
* Fixed output_model logic.

* Removed not needed code.

* Used os.path.basename, added comments.

* Removed loop.

* Test corrections.
2023-08-17 09:47:18 +04:00
Anastasiia Pnevskaia
3e23908983 Improvements and fixes in OVC convert_model (#19184)
* Added support of tuple in input, removed type syntax from OVC tool.

* Removed type syntax tests.

* Apply suggestions from code review

* Method annotation corrected.

* Type annotation corrected.

---------

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2023-08-17 09:45:30 +04:00
Zlobin Vladimir
b4f6148e0b benchmark_app: fix grayscale model and image (#19217)
C++ version doesn't have this problem.

Ticket 99702
2023-08-16 13:47:31 +00:00
Anastasiia Pnevskaia
cabb40638a Fix of confusing logs in convert_model(). (#19157)
* Added check that nncf was imported.

* Added check that nncf was imported in MO.

* Added check that nncf was imported in MO.

* Apply suggestions from code review

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>

* Removed not needed import.

* Pylint fix.

---------

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2023-08-16 13:53:22 +04:00
Sergey Lyalin
bf607a1238 Remove example_output for ovc and ovc.convert_model (#19079)
* Removed 'example_output' from ovc and ovc.convert_model, used output for this purpose

* Update tools/ovc/openvino/tools/ovc/convert.py

* Update tools/ovc/openvino/tools/ovc/convert_impl.py

* Reverted mo parts not affected by remove of example_output

* fix PDPD convert_model tests

---------

Co-authored-by: Xiuchuan Zhai <xiuchuan.zhai@intel.com>
2023-08-15 15:14:25 +04:00
Ilya Lavrenov
6067ab17ba Aligned target and files (libraries) names (#19161) 2023-08-13 11:31:44 +04:00
Anastasiia Pnevskaia
59872ee072 Removed InputCutInfo, disabled input cut in OVC. (#18927)
* Fixed output_model logic.

* Removed InputCutInfo, disabled input cut in ovc.

* Disabled output cut, added tests for setting shapes or types for not all inputs.

* Returned support of numpy type.

* Separated MO and OVC python API tests.

* Small corrections.

* Added output dir test, exceptions test.

* Tests fixed.

* Corrected extension param description.

* Corrected input description, minor code corrections.
2023-08-10 23:47:27 +04:00
Maxim Vafin
5f71679fb9 [PT FE] Use weight share switch in frontend (#18993)
* [PT FE] Use weight share switch in frontend

* Return static for function

* Update src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py

* Fix issue with quantized constants

* Add tests for shared
2023-08-10 19:28:38 +00:00
Anastasiia Pnevskaia
726abefbaa Update reminder message in MO and OVC. (#19132)
* Updated reminder.

* Updated reminder.
2023-08-10 19:14:13 +00:00
Stefania Hergane
24f8c4105e [EISW-89824] [master] Rename VPUX to NPU (#19004)
* Change `VPUX`/`VPU` occurrences to `NPU`

* Switch `HARDWARE_AWARE_IGNORED_PATTERNS` VPU to NPU

* Rename `MYRIAD plugin`

* Rename vpu_patterns to npu_patterns in tools/pot

* Rename vpu.json to npu.json in tools/pot

* Rename restrict_for_vpu to restrict_for_npu in tools/pot

* Change keembayOptimalBatchNum to npuOptimalBatchNum

---------

Co-authored-by: Dan <mircea-aurelian.dan@intel.com>
2023-08-10 00:20:07 +04:00
Maxim Vafin
c44df9907b [MO] Do not create example inputs based on input or input_shape (#18975) 2023-08-09 18:01:35 +02:00
Anastasiia Pnevskaia
a721c9f5ab Corrected category in OVC events. (#19064) 2023-08-09 11:36:47 +04:00
Anastasiia Pnevskaia
a064fa6c27 Fixed OVC input_model to work with pathlib.Path. (#18955) 2023-08-03 16:39:34 +04:00
Anastasiia Pnevskaia
0769af959e "static_shape" parameter fix. (#18843)
* Fixed static_shape param.

* Removed wrong change.

* Fixed unit test.

* Corrected mistakes in tests, switched on smart_reshape.

* Removed not used method.

* Corrected test.
2023-08-02 13:03:38 +04:00
Maxim Vafin
361367393b [MO] Raise exception for older nncf models (#18890)
* [PT FE] Call strip() for older nncf models

* Raise excception on older nncf models

* Update legacy mo too
2023-08-01 13:00:12 +00:00
Maxim Vafin
e3f19b59e7 Add opset12 operations to MO IR Reader (#18851) 2023-07-28 17:14:38 +00:00
Anastasiia Pnevskaia
c7cde6a102 Removed saved_model_tags from OVC, improved help. (#18785)
* Removed saved_model_tags, improved help.

* Fixed help, removed to string conversion of params.

* Help corrections.

* Small correction.

* Corrected wrong changes.

* Corrected wrong changes.

* Fixed arguments creating in cli parser.

* Renamed extensions parameter to extension.
2023-07-28 15:46:47 +04:00
Jan Iwaszkiewicz
583939b828 [PyOV] Aliases and namespace redesign (#18157)
* Remove inits, update main one

* Fix stacklevel

* Testing wrong solution

* Testing test test

* Fix test test test test

* mo modules mo problems

* Xfail test that check stdout/err?

* not so correct solution to circular imports

* Fix or not to fix

* CMake magic, co-authors: my best team

* Fix package imports

* Fix tools inits

* Fix ovc tf

* Fix Q000

* Fix F401

* Fix linters

* Add save_model

* Remove LayoutMap

* Move test_utils to 'internal modules'

* First testing

* Missing Type

* Expand main namespace

* Change some more tests

* Add OVAny to namespace

* Add Constant and Parameter to namespace

* More tests changes

* Fix inits

* Add layout_helpers to main namespace

* Revert CMake and linux.yml with ovc

* Update main inits

* Remove MO from tools inits

* changes to init files

* Fix tests

---------

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2023-07-28 11:52:21 +04:00
Tatyana Raguzova
609a7d7716 Fix issue with cleaning up after build wheels (#18774)
Co-authored-by: Artyom Anokhov <artyom.anokhov@intel.com>
2023-07-27 11:33:19 +02:00
Pavel Esir
98df87099a [MO] compress_to_fp16=True by default (2nd attempt) (#18652)
* [MO] compress_to_fp16=True by default (2dn attempt)

* fix unit-tests

* second round of fixin unit-tests

* set compress_to_fp16 default to True in ovc/cli_parser.py

* use save_model in mo_python_api_tests

* enforce compress_to_fp16=False in test_zero_copy

* selectively compress depending on the path user has chosen to generate IR

* corrected doc

* allow compress_to_fp16=False/True for ovc

* doc and unit-tests failing fix

* user save_model in ovc cli tool

* revert back serialize and compress_model but into main instead of moc_emit_ir

* cover more argument combinations for cli tool and convert_model
2023-07-27 12:32:50 +04:00
Surya Siddharth Pemmaraju
d42b53c070 Torchfx backend (#18244)
* Added Torchscript Backend

* First commit for backend with Torch FX Decoder

* Merging changes from Torch FX branch

* Torch FX initial fixes (Temporary)

* Fixed type/shape issues in Torch FX decoder

* Added translation for built-in getitem

* MaxPool update & Output shape fix (Torch FX)

* Torch FX graph outputs fix

* Torch FX support for sigmoid and slu_

* Torch FX graph module caching

* Torch Fx partitioner cache removed

* Torch FX initial getitem replacer added

* Index check for torch fx getitem replacer

* Debug print removed from partitioner

* Added environment variables for pytorch tracing mode and openvino device

* FX translation fix for getitem & getitem replacer removed

* Added checks for PyTorch tracing mode environment variable

* Adding compile mode for fallback

* Added more ops for resnet18

* Added a check for environment variable

* Generalized addmm to work with torchscript and torchfx

* Added the missing batch_norm.default translation

* fx_backend: include get_attr ops to the partitions

* AddeTODO note t to improvget_attr algorithm

* created function for adding get_attr nodes

* fx_backend: added aten.mul.Tensor, re-enabled aten.empty.memory_format

* fx_backend: Additional op support/improvement for Inception V3

* Added comment for fix 64-bit to 32-bit max int conversion

* fx_backend: Update for avg_poolnd to support 3 inputs

* Fixed erorr in decoder.py

* TorchFX caching fix

* Torch backend, op support for Stable Diff. & BERT

* Arranged ops in order and added torch tensor mapping

* Added support for more ops for super glue

* TorchFX: Initial permanent fallback

* TorchFX: New ops for improved TorchVision support

* TorchFX backend optimizations for partitioning and tmp fallback

* working operator updates for superglue

* Updates to operators for superglue

* Removed max.dim and stack

* Cleanup

* Cleanup

* Fixed a couple of syntax issues

* Fixed a couple of syntax issues

* Added missing method to TorchFX Decoder

* Added missing method to TorchFX Decoder

* Removed redundant code for transpose

* TorchFX: Initial StableDiffusion support

* PyTorch decoder ovtype to ctype fix for int64

* Added ops for distilbert

* Fixed few unnecessary include statements

* Seperated TorchFX and TorchScript decoders

* Modified import statements to reflect two decoders

* f64 fix for TorchFX

* Import fix for PyTorch backend modules

* TorchFX serialize graph for debugging (Temporary)

* Serialize and load back feature enabled for TorchFX

* Temporary optimization to remove Broadcast

* Temporary SoftmaxRehapeElimination pass is added

* TorchFX custom model cache directory

* PyTorch bitwise translation, conversion checks enabled

* Naming fix in make_list_construct

* TorchFX: Added comments to Softmax and Slice translations

* translate_chunk temporarily removed for TS backend

* Fixed linter issues

* Addressed clang formatting issues

* Fixed few more clang and linter issues

* Fixed tests to use ts_decoder

* Fixed naming convention issues

* Added missing import

* Added inlined_inputs to TorchScriptDecoder

* Added tests for torch fx backend

* Removed magic numbers in PyTorch decoder utils

* TorchFX decoder data type fix

* Added cast from size_t to int

* TorchFX output handling code cleanup

* TorchFX: Use detached input tensor

* Added missing cast from size_t to int

* Added static cast in group_norm

* Fixed casting issue in split

---------

Co-authored-by: ynimmaga <yamini.nimmagadda@intel.com>
Co-authored-by: Cavus Mustafa <mustafa.cavus@intel.com>
2023-07-26 16:23:42 +02:00
Anastasiia Pnevskaia
5aad9ee652 Used share_memory param in tf.Graph decoder. (#18747) 2023-07-25 11:16:17 +02:00
Ilya Lavrenov
de2675c381 Added cpack calls in python tools (#18754) 2023-07-24 19:55:07 +04:00
Anastasiia Pnevskaia
66094836d6 Corrected telemetry imports, increased telemetry version in requirements. (#18712) 2023-07-22 02:38:43 +04:00
Anastasiia Pnevskaia
8d5a0b1d53 OVC cleanup. (#18649)
* WIP: parameters cleanup

* Removed debug output, fixed CLI

* Fixed python objects conversion

* Finally renamed mmap to share_weights

* Fixed TF conversion from a file or a directory

* Fixed obvious errors in unit tests

* Deleted layouts from OVC. Fixed most of the fails in ovc unit tests (there are still failures)

* Clenaup other references to layouts and fixed --version

* Fixed case when two model files are passed in TF case

* Fixed multiple model parts passing in ovc command line

* Tests fixed, support of unnamed input in cli parser.

* Remove convert_model from runtime.

* Changed silent to verbose.

* Removed transform param.

* Removed example_input, share_weights from ovc cli tool.

* Remove wrong change.

* Test fix.

* Code corrections.

* Returned comment.

* WA to fix process hanging after extension loading.

* Removed not needed code.

* Added comment.

---------

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2023-07-20 20:11:28 +00:00
Ilya Lavrenov
1ce744a00f Fixed Debian package build (#18691) 2023-07-20 22:23:39 +04:00
Ilya Lavrenov
4df6ef3a26 Removed ie, ngraph and core_tools cpack components (#18636)
* Removed ie, ngraph cpack components

* Introduced new components
2023-07-20 17:46:16 +04:00
Ilya Lavrenov
b2d361fcca Fixed install paths for test MO FE (#18654) 2023-07-20 15:00:34 +04:00
Ekaterina Aidova
61504bbfc2 [PT FE]: support nested inputs in example_inputs and arg dicts with d… (#18492)
* [PT FE]: support nested inputs in example_inputs and arg dicts with different argtypes

* accept hande lists as inputs

* Update tools/ovc/openvino/tools/ovc/moc_frontend/pytorch_frontend_utils.py

* update tests and add comments in code

* fix for custom types in annotations and duplicate in mo

* Update tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py
2023-07-19 17:01:22 +02:00
Mircea-Aurelian Dan
5397e299fd [EISW-81712] Rename VPUX to VPU in openvino codebase (#17949)
* Change `VPUX` occurrences to `VPU`

* Switch `VPU` library name

* Change remaining references to `VPUX`
2023-07-19 15:55:24 +04:00
Ilya Lavrenov
04cb55c37d Moved BA from openvino-dev to openvino (#18571) 2023-07-19 14:36:47 +04:00
Mateusz Bencer
85ef310e65 Changed name of enable_mmap flag for MO/OVC + implemented missing passing flag for mo/moc_frontend/pipeline.py (#18618) 2023-07-18 15:30:34 +00:00
Anastasiia Pnevskaia
e67850a186 Use GA4 telemetry backend in MO and OVC. (#18584) 2023-07-18 11:50:04 +04:00