Commit Graph

580 Commits

Author SHA1 Message Date
Maxim Vafin
caedb6a6b4 [PT FE] Print better exception message (#18015)
* [PT FE] Print better exception message

* Sort ops and fix code style

* Apply feedback

* Remove obsolete variable

* Rearrange newlines

* Apply feedback, add messages in transformations

* Fix style

* Add exceptions in cat and getitem replacers

* Add test

* Fix test regex
2023-06-15 12:04:01 +04:00
Ekaterina Aidova
d3461074ea [PT FE]: support aten::t and inplace tril/triu (#18040) 2023-06-14 15:08:45 +04:00
Ekaterina Aidova
838d792d96 [PT FE]: fix unflatten for list construct sizes (#18039) 2023-06-14 11:28:19 +04:00
Anastasiia Pnevskaia
77711be786 tf.Graph decoder. (#16355)
* tf.Graph decoder.

* Fix conflicts.

* Fixed det_input_node()

* Added support of non-frozen models.

* Cleaned code.

* Small fix.

* Small corrections.

* Error fixes.

* Code style.

* Code style.

* Code style.

* Small correction.

* Fixed float32 attributes.

* Small correction.

* Fixed tests.

* Fixed errors.

* Added statefull partitioned call test.

* Import fix.

* Code corrections.

* BOM test fixed.

* Corrected check, added comment.

* Added checks.

* Supported TF Fraph Iterator in load_by_model().

* Clang format.

* Small correction.

* Fixed example_input logic, added tests.

* Added comment.

* Small correction.

* Corrected example_input description.

* Moved load_by_model test to MO Python API tests.

* Minor corrections.

* Code corrections.

* Small correction.

* Clang format.

* Fixed tests.

* Import change.

* Moved GraphIterator to common FE.

* Tests refactoring, minor fixes.

* Small test correction.

* Removed not needed change.

* Removed commented code.

* Removed not needed change.

* Unit tests fix.

* Temporarily added debug output.

* Test fix.

* Applied comments.

* Fixed test.
2023-06-13 16:04:26 +04:00
jszczepa
af9204488d Fuzzer import model (#17865)
* Fuzzer - import_model

* Fix after review part 1

* Replace c-like cast to static_cast operator

* Replace c-like cast with reinterpret_cast
2023-06-13 13:41:30 +02:00
Maxim Vafin
48dec1000e [PT FE] Support inplace operations on aliases of tensors (#17856)
* Support operations on aliases of tensors

* Add tests

* Fix issue with convnd

* Fix code style

* Fix issue with tensor index of mutated tensor

* Fix if types alignment

* Fix issues in keypoint detectron2

* Fix issue with masks in detectron2

* Fix acuracy issue in mobilevitv2 models

* Remove unused includes

* Return upsample case in lictconstruct replacer

* Fix types, apply review feedback

* Apply feedback

* Revert change of not using shared_from_this for getitem

* Fix issue in prim::device transformation

* Fix layer tests

* Apply review feedback

* Fix issue with not existing alias to tensor
2023-06-13 13:30:48 +02:00
Evgenya Stepyreva
dd02a0f440 [TFLite] Custom attribute reading and While operation support (#17932)
* Custom attribute reading and While operation support

* Rearanges FLATBUFFERS_LOCALE_INDEPENDENT setting

* Style

* Make flatbuffers code as version independent as possible

* Comments addressed
2023-06-12 14:42:18 +04:00
Piotr Krzemiński
0d9109acf3 [PT FE] Add aten::_shape_as_tensor (#17804)
* [PT FE] Add aten::_shape_as_tensor impl

* Update shape_as_tensor.cpp

* [PT FE] Fix headers, add explicit type, comment out shape detection

* [PT FE] Reverse example comments
2023-06-05 10:59:12 +02:00
Piotr Krzemiński
3d8a620ac3 [PT FE] Add aten::_native_multi_head_attention (#17550)
* [PT FE] Add implementation of MHA

* [PT FE] Add tests, add scaled dot product attention

* [PT FE] Fix missing transpose for Q,K,V & output Attention

* [PT FE] Formatting errors

* [PT FE] Fix testing class with nn.Linear

* [PT FE] Fix incorrect key franspose in dot product attention computation

* [PT FE] Fix incorrect matmul due to lack of transpose

* [PT FE] Enable support for all boolean masks

* [PT FE] Fix returned weights

* [PT FE] Remove debugging artifacts

* [PT FE] Remove unused nodes, optimize transpose nodes' usage, add comments to floating masks

* [PT FE] Further reduce node usage, return None instead of 0 for return_weights=false

* [PT FE] Allow for dynamic num_num_head, embed_dim

* [PT FE] Improve error comment, remove unnecessary Unsqueeze

* [PT FE] Clang format

* Update tests/layer_tests/pytorch_tests/test_native_multi_head_attention.py

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

* [PT FE] Add masks comments, improve mask broadcasting

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-06-05 10:55:03 +02:00
Piotr Krzemiński
482c030408 [PT FE] Add aten::LogSoftmax (#17629)
* [PT FE] Add aten::LogSoftmax implementation & tests

* Update log_softmax.cpp

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

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

* [PT FE] Add recommended comment, replace get_input_tensor with new implementation

* [PT FE] Align to f32 if no dtype provided

* [PT FE] Revert type align

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-06-01 12:04:27 +00:00
Mateusz Mikolajczyk
e45068bd64 [PT FE] Fix aten::squeeze translation + add tests for aten::slice (#17584)
* Fix squeeze compatibility

* Fix issue in remainder causing model to fail

* Add tests for slice

* Modify remainder to support int + add type tests

* Apply requested changes

* Add comment
2023-05-31 22:26:39 +02:00
OK
f2017e8c2e Validation: Test AUTO plugin timetests (#17508)
* Validation: Test AUTO plugin

* config

* Add debug logs against AUTO

* Iteration

* iteration

* iteration

* iteration

* iter

* iteration

* iteration

* iteration

* iteration

---------

Co-authored-by: Daria Ilina <daria.ilina@intel.com>
2023-05-31 15:38:57 +02:00
Ekaterina Aidova
fb4efe7203 [PT FE]: support flip operation (#17705)
* [PT FE]: support flip operation

* more tests
2023-05-31 12:07:24 +02:00
Ekaterina Aidova
2d7db5e3d3 [PT FE]: support aten::cdist and aten::pairwise_distance (#17718)
* [PT FE]: support aten::cdist and aten::pairwise_distance

* p and eps non-const
2023-05-31 12:07:12 +02:00
Mateusz Tabaka
6f7e9cd786 Update docs for frontend extensions (#16752)
* Update docs for frontend extensions

* Apply suggestions from code review

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

* fix order in openvino_framework_map

* no discard return value

* add note of openvino_contrib repo

* update example for PT

* note

* add paragraph of named inputs and outputs

Signed-off-by: Mateusz Tabaka <mateusz.tabaka@intel.com>

* title underline too short

* review comments

* remove m_ prefix from CustomOp attr names

---------

Signed-off-by: Mateusz Tabaka <mateusz.tabaka@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-05-30 12:53:59 +04:00
Mateusz Mikolajczyk
a1a753bb03 [PT FE] Add translation for aten::__range_length and aten::__derive_index (#17618)
* Add operators and tests

* Fix op kind

* Merge tests

* Fix freeze issue as separate bug

* Fix indent

* Fix print placement

* Fix dtype
2023-05-29 13:34:08 +00:00
Ruslan Nugmanov
28d2e77a92 TFLite layer tests second part (#17688)
* tfl - removes redundant params

* tfl - batch matmul

* tfl - expand_dims

* tfl - squeeze

* tfl - hardswish

* tfl - batch matmul

* tfl - padv2

* tfl - fixes for dynamic shapes

* tfl - where

* tfl - zeros_like

* tfl - zeros_like

* tfl - precommit fix

* tfl - shape and xfail for expand dims
2023-05-29 15:50:34 +04:00
Ekaterina Aidova
3300543eac [PT FE]: support frobenius norm and fix aten::norm (#17701)
* [PT FE]: support frobenius norm and fix aten::norm

* fix code style
2023-05-29 11:14:16 +04:00
Mateusz Mikolajczyk
6501d963fc Add aten::item (#17730) 2023-05-26 18:05:24 +02:00
Ekaterina Aidova
b2aaa10ef6 [PT FE]: support aten::unflatten (#17736)
* [PT FE]: support aten::unflatten

* Update src/frontends/pytorch/src/utils.cpp

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

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-05-26 15:27:05 +00:00
Ekaterina Aidova
307b666d99 [PT FE]: support boolean data type in sum operation (#17715) 2023-05-26 15:44:50 +04:00
Przemyslaw Wysocki
60d55729aa Bump (#17686) 2023-05-24 00:53:03 +04:00
dependabot[bot]
e2cb6dafe1 Bump pytest-html from 1.19.0 to 3.2.0 in /tests (#16624)
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 1.19.0 to 3.2.0.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-html/compare/v1.19.0...v3.2.0)

---
updated-dependencies:
- dependency-name: pytest-html
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-05-23 11:22:59 +00:00
dependabot[bot]
added5c44e Bump attrs from 22.2.0 to 23.1.0 in /tests (#17649)
Bumps [attrs](https://github.com/python-attrs/attrs) from 22.2.0 to 23.1.0.
- [Release notes](https://github.com/python-attrs/attrs/releases)
- [Changelog](https://github.com/python-attrs/attrs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/python-attrs/attrs/compare/22.2.0...23.1.0)

---
updated-dependencies:
- dependency-name: attrs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 09:52:28 +00:00
Maxim Vafin
fe1ac700f0 [PT FE] Fix issues in multiple operations (#17418)
* Fix issues in aten::chunk and aten::split_with_sizes replacers

* Fix code style

* Fix compute issue

* Fix code style

* Support 1 chunk

* Fix issues in meshgrid, sqrt, rsqrt and exp operations

* Use Interpolate-11

* Fix unary ops

* Add tests for unary ops

* Fix unary ops tests

* Add changes in utils

* Fix mo test

* Remove extra line

* Fix mo tests for int
2023-05-22 10:35:34 +02:00
Mateusz Mikolajczyk
9b52a77531 [PT FE] Fix aten::conv2d conversion issues related to bias (#17228)
* Allow for conversion

* Check for const

* Apply requested changes

* Improve tests
2023-05-22 09:59:02 +02:00
dependabot[bot]
4ccc6e3034 Update pytest requirement from <7.3,>=5.0 to >=5.0,<7.4 in /tests (#17641)
Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/5.0.0...7.3.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 10:19:00 +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
dependabot[bot]
f2e71cbd0a Update fastjsonschema requirement from ~=2.15.1 to ~=2.16.3 in /tests (#16623)
Updates the requirements on [fastjsonschema](https://github.com/horejsek/python-fastjsonschema) to permit the latest version.
- [Release notes](https://github.com/horejsek/python-fastjsonschema/releases)
- [Changelog](https://github.com/horejsek/python-fastjsonschema/blob/master/CHANGELOG.txt)
- [Commits](https://github.com/horejsek/python-fastjsonschema/compare/v2.15.1...v2.16.3)

---
updated-dependencies:
- dependency-name: fastjsonschema
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-05-20 00:15:36 +04:00
Ekaterina Aidova
dcd034fb4d [PT FE]: support aten::argmax and aten::argmin (#17489) 2023-05-19 15:55:36 +00:00
dependabot[bot]
50957cdddf Bump pytest-timeout from 2.0.1 to 2.1.0 in /tests (#16750)
Bumps [pytest-timeout](https://github.com/pytest-dev/pytest-timeout) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/pytest-dev/pytest-timeout/releases)
- [Commits](https://github.com/pytest-dev/pytest-timeout/compare/2.0.1...2.1.0)

---
updated-dependencies:
- dependency-name: pytest-timeout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-05-19 13:30:37 +00:00
Ilya Lavrenov
84db7d0ee6 Build using conanfile.txt (#17580)
* Build using conanfile.txt

* Update .ci/azure/linux_arm64.yml

* Several improvements

* Removed conanfile.py

* Try to use activate / deactivate

* Fixed clang-format code style

* Supported TBB version from Conan

* Added more NOMINMAX

* Fixed static build

* More improvements for static build

* Add usage of static snappy in case of static build

* More fixes

* Small fixes

* Final fixes
2023-05-19 14:01:39 +04:00
Surya Siddharth Pemmaraju
e14d1b2a07 Torchscript backend (#17132)
* Added torch script backend

* Added ts_backend to pytorch layer tests

* Added use_ts_backend fixture to the test suite to activate the
torchscript backend

* Fixed failing test_dict layer test

* Added USE_TS_BACKEND as an env variable

* Removed use_ts_backend fixture

* Added more tests for ts backend

* Added more information in the comments about usage

* Removed convolution3d test from precommit_ts_backend

* Added some torchscript backend tests to ci

* Removed tests from CI as torch.compile doesn't support 3.11 currently

* Fixed linter issues

* Addressed PR comments and linter issues
2023-05-17 14:58:38 +02:00
Maxim Vafin
db58355fad Remove posibility to export to onnx (#17442)
* Remove posibility to export to onnx

* Add OOB pytorch convert_model test
2023-05-17 13:39:35 +02:00
Anastasia Kuporosova
75fa11c80f [PyOV] Remove deprecated (#17512)
* [PyOV] Remove deprecated

* remove deprecated api

* remove tests

* update pot
2023-05-16 21:48:39 +02:00
Ruslan Nugmanov
aa932d341a Layer test tflite (#17410)
* tfl argvalue test

* tfl add_n test

* tfl batch to space and space to batch

* tfl batch to space and space to batch

* tfl broadcast

* tfl avgpool

* tfl concat

* tfl conv2d and depthtospace

* tfl depthwise_conv2d

* tfl broadcast_args

* tfl fill

* tfl floordiv

* tfl fully_connected

* tfl fully_connected

* tfl gather

* tfl gather_nd

* tfl l2_normalization

* tfl matrix_diag

* tfl maxpool2d

* tfl mirror_pad

* tfl one_hot

* tfl pack

* tfl pad

* tfl range

* tfl relu

* tfl reshape

* tfl resize_bilinear

* tfl resize

* tfl reverse

* tfl tfft2d

* tfl scatter_nd

* tfl rfft2d fix

* tfl segment_sum

* tfl select

* tfl select_v2

* tfl slice

* tfl space_to_depth

* tfl split

* tfl split_v

* tfl strided_slice

* tfl tile

* tfl topk_v2

* tfl transpose

* tfl transpose_conv

* tfl fix conv tests

* tfl unique + refactoring

* tfl unpack

* refactoring

* tfl review - reformat params

* tfl review - fixes

* tfl review - fixes

* tfl review - xfails

* tfl review - remove redundant tickets

* tfl review - xfail for pad
2023-05-15 15:03:09 +04:00
Ekaterina Aidova
66e1af18b5 [Pt FE]: aten::embedding_bag (#17098)
* [Pt FE]: aten::embedding_bag

* Update src/frontends/pytorch/src/op_table.cpp

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

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-05-10 09:44:08 +02:00
Maxim Vafin
48604e9092 Support sizes input as list to upsample ops (#17350) 2023-05-07 19:23:51 +02:00
Roman Kazantsev
b6098fed90 [TF FE] Provide single tensor names for inputs and outputs in SavedModel (#17370)
* [TF FE] Provide single tensor names for inputs and outputs in SavedModel

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

* Fix build issue

* Xfail some cases due to internal problems in TF

* Xfail other layer test

* Extend documentation for function to adjust tensor names

* Use old path of tf2 layer testing for legacy frontend

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-05-06 05:37:47 +01:00
Maxim Vafin
c1933fcaf0 [PT FE] Support default strides for avg and max pooling (#17337)
* Support default strides for avg and max pooling

* Fix code style

* Remove changes from other ticket
2023-05-04 09:27:10 +02:00
Maxim Vafin
1d59dab362 [PT FE] Improve exception when decoder cannot trace or script the model (#17338)
* [PT FE] Improve exception when decoder cannot trace or script the model

* Add exception in convert_model

* Add test
2023-05-04 07:58:40 +02:00
Piotr Krzemiński
1c286e4636 [PT FE] Add aten::all implementation (#16901)
* [PT FE] aten::all implementation with tests

* [PT FE] Add non-dynamic type check

* [PT FE] Update tests, temporarily turn off uint8 tests

* [PT FE] Fix dtype for uint8

* [PT FE] Apply suggested optimizations

---------

Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
2023-05-02 21:12:12 +02:00
Maxim Vafin
89d3eaa67f Fix issue with Pow when both inputs are scalars (#17305)
* Fix issue with Pow when both inputs are scalars

* Fix code style
2023-05-02 16:49:42 +02:00
Roman Kazantsev
14e146b7c8 [TF FE] Extend pre-commit for SpaceToBatch after CPU crash (#17278)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-05-01 17:29:50 +04:00
Piotr Krzemiński
b7311d8907 [PT FE] Fix aten::chunk for dynamic shapes (#16902)
* [PT FE] Add replacer for chunk+getitem

* [PT FE] Fix missing replaced nodes, fix incorrent chunk size calculation

* [PT FE] Fix incorrect item shape, reduce tests count

* [PT FE] Convert back with frontend

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-05-01 09:32:10 +00:00
Maxim Vafin
1d443c6da6 Fix problems with pytorch models passed to convert_model (#17255)
* Do eval() only for torch Module

* Add test

* Support decoder in convert_model

* Enable tests
2023-04-27 18:33:46 +04:00
Anastasiia Pnevskaia
59e28f8d0d Disabled tests. (#17231) 2023-04-27 13:39:58 +04:00
Maxim Vafin
10392644e3 [PT FE] Enable stable sort layer tests (#17229)
* [PT FE] Enable stable sort layer tests

* Remove unused code
2023-04-26 18:24:38 +02:00
Ekaterina Aidova
82ff7e17c9 use input parameter for building example_inputs (#17207)
* use input parameter for building example_inputs

* Update tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py
2023-04-26 17:58:06 +04:00
Nikolay Shchegolev
c8ac7c9b82 [CPU] Infer_request crashes for SpaceToBatch operation. (#16974)
* [CPU] Infer_request crashes for SpaceToBatch operation.

* Fixes as per comments.

* Fixes as per comments 2.
2023-04-26 17:39:54 +04:00