Commit Graph

222 Commits

Author SHA1 Message Date
Ekaterina Aidova
179403ddc9 [PT FE]: improve integration into mo.convert_model (#16243) 2023-03-24 16:55:07 +01:00
Maxim Vafin
86c4489aca [PT FE] Add telemetry extension support (#16438)
* Initial telemetry introduction in PyTorch frontend

* Add test

* remove obsolete checks from test

* Move statistics gathering into TranslateSession

* Fix code style

* Fix codestyle
2023-03-24 10:11:12 +01:00
Maxim Vafin
abaf61d059 Improve detectron2 support (#16011)
* Improve op support for detectron mask rcnn

* Initial commit

* Fix for reading processed list

* Format code

* Cleanup

* cleanup

* Cleanup

* cleanup test

* Add comment

* Add rt_info

* fix type

* More fixes for detectron

* Fix build

* Add tests for if

* Revert changes in index

* Add comment

* Fix test

* Fix get_axes_range

* Add tests and fix if type alignment

* Fix code style

---------

Co-authored-by: Mateusz <mateusz.mikolajczyk@intel.com>
2023-03-23 22:30:03 +00:00
Przemyslaw Wysocki
52b27d82c5 Upgrade ONNX to 1.13, protobuf to 3.20.3 and relax tensorflow (#14773)
* Bump ONNX version

* Bump protobuf

* Add xfails and skips

* Add tickets

* Skip ONNX Serialization tests

* Compile ONNX with C++17

* Force cpp17 - 2

* Use MSVC check

* Update tensorflow

* Minor change

* Bump onnx to 1.13.1

* Bump protobuf to 3.20.3

* Debug test tf

* Xfail tests in comp

* Update comp tests

* Update tf reqs

* Remove deprecated ONNX function

* Align PDPD FE protobuf req with 2.4.1

* Satisfy dependency review

* Attempt to fix dependency review

* Revert pdpd protobuf

* Skip pdpd tests

* Fix MO-TF-PB test

* Skip TF test case

* Add ticket numbers, rewrite reqs

* Fix requirements

* Minor change

* Set TF to 2.12

* Remove wrapt and skip test
2023-03-24 00:43:01 +04:00
Roman Kazantsev
5cb20f8858 [TF FE] Refactor StridedSlice translator and add layer test to precommit (#16376)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-03-21 08:54:48 +04:00
Ekaterina Aidova
71167df234 [PT FE]: enable dtype in softmax and constant filling, extend logical ops support (#16276) 2023-03-20 14:12:12 +00:00
Ekaterina Aidova
f39684a7f8 [PT FE]: support mixed precision in floor divide (#16362)
* [PT FE]: support mixed precision in floor divide

* Update floordiv.cpp
2023-03-20 11:00:26 +01:00
Mateusz Mikolajczyk
134ebb8889 [PT FE] Add aten::new_empty (#16312)
* Add new_empty

* Remove duplicated code for new_empty
2023-03-20 10:03:33 +01:00
Roman Kazantsev
3f06a9b6fb [TF FE] Test MatrixDiag translator in the pre-commit (#16377)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-03-20 12:20:13 +04:00
Georgy Krivoruchko
36c18e29a8 [TF FE] Added Tensorflow CTCLoss layer test (#13644)
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-03-15 08:18:29 +00:00
Daria Ilina
e4f44b19fd Mark all failed ONNX layer tests as skip (#16188)
* Mark all failed ONNX layer tests as XFail

* Add additional xfailed marks

* Add one more failed tests into XFail

* Add conditions for CPU/GPU failures

* Revert "Add conditions for CPU/GPU failures"

This reverts commit 790524c59c.

* Add failures separation for CPU/GPU

* Replace all xfail with skip
2023-03-15 12:22:32 +06:00
Roman Kazantsev
dcc8a36d88 [TF FE] Test Switch and Merge support by TF FE (#16255) 2023-03-14 00:50:47 +04:00
Roman Kazantsev
3b71286f1d [TF FE] Test low-level While support by TF FE (#16257) 2023-03-14 00:50:22 +04:00
Maxim Vafin
ec8a4abf6d Support more complicated cases of list concatenation (#16139)
* Support more complicated cases of list concatenation

* Fix codestyle

* Add tests
2023-03-10 07:51:10 +01:00
Mateusz Mikolajczyk
31489931cf [PT FE] Fix failing translation of aten::index_put_ (#16140)
* Initial commit

* Fix for reading processed list

* Format code

* Cleanup

* cleanup

* Cleanup

* cleanup test

* Add comment

* Add rt_info

* fix type

* Update src/frontends/pytorch/src/transforms/aten_index_put_replacer.cpp

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

---------

Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-03-09 20:14:58 +00:00
Ekaterina Aidova
6514b7600a [PT FE]: add translation for aten::cumsum (#16092)
* [PT FE]: add translation for aten::cumsum

* handle out and prim::dtype
2023-03-08 11:07:29 +01:00
Mateusz Mikolajczyk
b907bfab3b [PT FE] Fix for prim::Constant tensor with int/float values (#16029)
* Fix constant

* Change

* Remove duplicated code

* Add tests
2023-03-07 20:54:18 +00:00
Mateusz Mikolajczyk
6358974c1a [PT FE] Add prim::PythonOp (#15714)
* Add PythonOp

* Fix deprecation & cleanup

* Apply suggestions from code review

* Fix dtype

* Apply suggestions from code review

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

* Update to new tensor names handling

* Fix negation

* Apply changes from code review

* Remove unnecesary imports

* Update src/frontends/pytorch/src/op/pythonop.cpp

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-03-07 17:20:13 +01:00
Maxim Vafin
82584543ba [PT FE] Support set/get element type, shape and value in PyTorch FE InputModel (#16100)
* Support setting and getting element type, shape and value in PyTorch FE InputModel

* Fix code style

* Fix code style

* Fix rsub layer test

* Fix py style

* Apply review feedback

* Fix code style

* Fix initial values of input and output flags in Place
2023-03-07 15:45:29 +01:00
Piotr Krzemiński
0860db0dc3 [PT FE] Add aten::ArgSort & aten::Sort (#15769)
* [PT FE] Add aten::argsort implementation & tests

* [PT FE] Fix formatting

* [PT FE] Fix incorrect node type for Gather

* [PT FE] Fix Reshape missing argument

* [PT FE] Simplify syntax, fix int/int64 conversion error

* [PT FE] Fix argsort incorrectly sorting negative dimension, fix tests

* [PT FE] Revert modify test class

* [PT FE] Fix formatting of argsort

* [PT FE] Fix define macro style

* [PT FE] Add missing EOF

* [PT FE] Add stable==false check, add support for different constructor calls

* [PT FE] Add aten::sort implementation & tests

* [PT FE] Apply style changes, add XFail test for stable sorting

* Update sort.cpp

* Update sort.cpp

* [PT FE] Apply style changes from aten::sort t PR

* Update test_argsort.py

* [PT FE] Apply suggested modifications

* Update test_argsort.py

* [PT FE] Apply review suggestions, add tests and extract sort method to utils

* [PT FE] Use utils sort function to implement argsort

* [PT FE] Fix input size check 4->5

* [PT FE] Implement improved tests

* [PT FE] Implement improved tests

* [PT FE] Add xfail to not yet supported tests

* [PT FE] Merge 2 implementations of sort and argsort into a single file

* [PT FE] Remove redundant sort_elements from utils

* [PT FE] Add num_inputs_check

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-03-05 20:12:32 +01:00
Ekaterina Aidova
a1cde2e790 [PT FE]: fix padding vaqlue dtype (#16087) 2023-03-04 11:08:56 +00:00
Ekaterina Aidova
0edbc5ca60 [PT FE]: fix arange dtype if it is not provided (#16084) 2023-03-04 10:17:09 +01:00
Anastasiia Pnevskaia
9efdb38b96 convert_model() legacy extensions fix (#15742)
* Fixed legacy extensions passing to MO tool.

* Added tests.

* Corrected test.

* Add debug print.

* Moved tests to layer tests.

* Added comment.

* Moved legacy ext tests to separate file. Fixed tmp .pb file cleaning.

* Small correction.

* Run MO Python API tests directory in CI.

* Small fix.

* Fix for case of splitted output.

* Corrected imports.

* Corrected imports.

* Added run of legacy extensions tests from subprocess.
2023-03-03 09:59:30 +04:00
Anastasiia Pnevskaia
6185114bc4 Clearing of CustomReplacementRegistry.registry in convert_model() (#15893)
* Clearing of CustomReplacementRegistry.registry.

* Added test.
2023-03-02 14:49:45 +04:00
Mateusz Mikolajczyk
112c763256 [PT FE] Add prim::device and prim::type, improvements to aten::to, aten::eq, aten::ne (#15881)
* Add device, improve to and equal

* Rename and remove unused import

* Apply fixes from code review

* Fix decoder.py

* Load prim::device using prim::Constant

* Remove throwing exceptions

* Apply suggestions from code review

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-03-01 09:46:55 +01:00
Maxim Vafin
87e714eb5c Add support for concatenation in Loop (#15899)
* Add support for concatenation in Loop

* Apply suggestions from code review

* Fix win build

* Fix issues with propagation shapes and types in Loop

* Fix einsum

* Set type and shape of count in frontend
2023-02-28 21:31:33 +01:00
Roman Kazantsev
68b7b8e69b [TF FE] Mark-up xfailed layer tests on GPU in nightly (#15981)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-27 21:14:21 +00:00
Roman Kazantsev
5317b909f7 [TF FE] Test Nested While in the pre-commit (#15955)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-26 11:28:51 +00:00
Ekaterina Aidova
5c6ef54127 [PT FE]: support aten::index (#15544)
* [PT FE]: support aten::index

* bool indexing testing

* more tests, fix nonzero case

* apply code review
2023-02-24 14:33:00 +01:00
Roman Kazantsev
ad4bd6f752 [TF FE] Simplify FakrQuantWithMinMaxVars translator and add layer test (#15927)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-24 12:13:46 +00:00
Ruslan Nugmanov
091ba1f5ee Adds layer tests for binary and reduce tflite operations (#15791)
* adds binary and reduce layer tests

* adds binary with activations layer tests for tfl ops

* 1.moves helper functions and lists to utils file
2.adds axis as test parameter for reduce test
3.adds reluNto1 activation

* skips tanh and signbit activations

* Update tests/layer_tests/common/utils/tflite_utils.py

* Fused activations supported: RELU_N1_TO_1, SIGN_BIT

---------

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
2023-02-24 14:46:29 +04:00
Roman Kazantsev
8a56234445 [TF FE] Refactor identity operations and layer test (#15904)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-23 21:22:31 +01:00
Anastasiia Pnevskaia
1e24c51abb Turn on onnx fallthrough in convert_model() (#15651)
* Turn on ONNX_FALLTHROUGH in torch.onnx.export().

* Removed wrong change.

* Added test.
2023-02-23 13:22:30 +04:00
Leonard Sikorski
bc663878eb [PT FE] Add torchvision::roi_align operator with layer test (#15821) 2023-02-23 09:26:17 +01:00
Ekaterina Aidova
288a750bc6 [PT FE]: support aten::einsum (#15844) 2023-02-23 11:39:28 +04:00
Maxim Vafin
a9efe5bd8d [PT FE] Extend upsample support (#15826)
* [PT FE] Extend upsample suport

* Update tests/layer_tests/pytorch_tests/test_upsample.py

Co-authored-by: Ekaterina Aidova <ekaterina.aidova@intel.com>

---------

Co-authored-by: Ekaterina Aidova <ekaterina.aidova@intel.com>
2023-02-23 11:34:29 +04:00
Pavel Esir
15973fd2da enable --compress_to_fp16=True by default in MO (#15488)
* enable --compress_to_fp16 by default in MO

* corrected docs, added warning if user did't specify --compress_to_fp16 explicitly

* fix failing MO unit-tests

* do not wipe out data_type if user defined it explicitly by cli argument

* updated warning message and docs

* corrected phrasing

* corrected phrasing in FP16_Compression.md

* set compress_to_fp16=False for convert tests

* leftover: set compress_to_fp16=False for convert tests

* minor correction

* print info message in main.py, som minor changes

* typos fix

* fix losing information whether arguments set by user or got from defaults

* returned back default values instead of None

* more selective correcting of test_mo_convert_pytorch.py; added test for cases when compression is enabled/disabled or left by default

* fix test_mo_convert_pytorch.py
2023-02-21 13:07:43 +01:00
Maxim Vafin
ce3ac296ae [PT FE] Fix aten::len for empty lists (#15820)
* [PT FE] Fix aten::len for empty lists

* Fix code style
2023-02-20 21:34:04 +00:00
Leonard Sikorski
5d3cd81fd1 Add aten::narrow operator with layer test (#15788) 2023-02-20 15:47:25 +01:00
Roman Kazantsev
bc8d0ec71e [TF FE] Refactor ReverseSequence and add layer test (#15807)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-20 12:26:19 +00:00
Roman Kazantsev
b75a3b3465 [TF FE] Implement layer test for GatherNd translator (#15813)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-20 12:58:52 +01:00
Roman Kazantsev
699a1d1708 [TF FE] Refactor Gather operations and add layer tests (#15808)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-20 11:02:42 +04:00
Roman Kazantsev
7d13bc6861 [TF FE] Remove NormalizeL2 translator and refactor layer test (#15760)
It turned out that NormalizeL2 is absent in tf.raw_ops api
and always presented in the decomposed form.

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-17 14:37:42 +04:00
Roman Kazantsev
bd0dfbcd7a [TF FE] Refactor OneHot translator and add layer test (#15763)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-17 13:54:40 +04:00
Ekaterina Aidova
225f9b3801 [PT FE]: fix aten::embedding realization for integer-like indicies an… (#15721)
* [PT FE]: fix aten::embedding realization for integer-like indicies and add tests

* more comments

* Update src/frontends/pytorch/src/op/embedding.cpp

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-02-17 08:09:46 +00:00
Leonard Sikorski
fab35896cb [PT FE ] Add aten::index_put_ operator with layer test (#15668) 2023-02-16 08:28:46 +01:00
Roman Kazantsev
cabe75da1c [TF FE] Refactor LogSoftmax translator and layer test (#15724)
* [TF FE] Refactor LogSoftmax translator and layer test

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

* Work around for the legacy frontend

* Update src/frontends/tensorflow_common/src/op/log_softmax.cpp

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-15 20:36:46 +00:00
Ekaterina Aidova
f8aae85183 [PT FE]: add more list construct transformations (#15614) 2023-02-15 16:39:27 +00:00
Roman Kazantsev
c6f7d7c98a [TF FE] Refactor IdentityN translator and add layer test (#15727)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-02-15 15:18:18 +01:00
Ekaterina Aidova
13eca30081 [PT FE]: support aten::gelu with tanh approximate and tests (#15715) 2023-02-15 15:11:37 +01:00