Commit Graph

618 Commits

Author SHA1 Message Date
Ekaterina Aidova
016eb43741 [PT FE]: fix issues with squeeze producing dynamic rank (#18748)
* [PT FE]: fix issues with squeeze producing dynamic rank

* Update test_squeeze.py

* Update test_squeeze.py

* Update test_slice.py

* Apply suggestions from code review
2023-07-24 20:10:20 +04:00
Maxim Vafin
bc734dfaaa [PT FE] Enable quantized conv and linear tests (#18723) 2023-07-24 13:33:11 +02:00
Maxim Vafin
f96f021920 [PT FE] Add helper for regular ops on quantized values (#18692)
* Add helper for regular ops

* Update op_table.cpp

* Support ops with more then 1 output

* Uncheck ops that return integer/boolean type
2023-07-22 16:47:44 +02:00
Piotr Krzemiński
e076ed4726 [PT FE] Quantized Add, Add_ReLU, Mul, Hardswish (#18510)
* Support GetAttr with packed params

* Apply suggestions from code review

* [PT FE] Add quantized types as normal types to decoder

* [PT FE] Add decoder dequantize, add dtypes to quantize

* [PT FE] Add dequantize example

* [PT FE] Implement replacer for quantized nodes

* [PT FE] Register replacer for quantize/dequantize

* [PT FE] Remove unwanted junk from previous version

* [PT FE] Fix building mistakes for frontend

* [PT FE] Clang fix

* [PT FE] Ease of use upgrade to quantize funcs

* [PT FE] Clang format

* [PT FE] Introduce new version of quantize/dequantize

* [PT FE] Remove unwanted files from new version

* [PT FE] Fix style

* [PT FE] Add QuantizedPtNode replacer, fix accuracy error

* [PT FE] Quantized add

* [PT FE] Add improved version of quantize/dequantize with shared_ptrs

* [PT FE] Quantized Add Relu

* [PT FE] Fix utils shared ptr reference error

* [PT FE] Quantized Hardswish & tests

* [PT FE] Add quantized_add_relu test

* [PT FE] Quantize now takes correct input for operations

* [PT FE] Add dtype to tests

* [PT FE] Increase matrix size in the tests to cover more edge cases

* [PT FE] Upgrade quantize method

* [PT FE] Add BFS for dequantize, add quantize_per_channel

* [PT FE] Add missing replacer to frontend, improve tests

* [PT FE] Rename replacer -> remover, remove unwanted header files

* [PT FE] Change function declarations to return ov::Output instead of shared ptr

* [PT FE] Add missing context mark node

* [PT FE] Remove unknown modifications to ie_c_api

* [PT FE] Remove fp16 support, turn off int32 tests

* [PT FE] Clang format

* [PT FE] Fix quantize_per_tensor

* [PT FE] Minor fixes from review

* [PT FE] Remove dequantize, remove helpers, replacer now removes nodes instead

* [PT FE] Rename Replacer to Remover for dequantize nodes

* [PT FE] Clang format

* [PT FE] Move comments to header files, minor import fixes

* [PT FE] Enable add, add_relu, mul, hardswish with newest quantize ops

* [PT FE] Fix clang format

* [PT FE] Fix dtype issue

* [PT FE] Reenable hardswish tests

* [PT FE] Fix building error for quantized ops

* [PT FE] Tests now use rand instead of randn

* [PT FE] Remove int32 support from tests

* [PT FE] Fix quantize_per_channel tests

* Apply suggestions from code review

Removing sporadic tests from precommit

* Apply suggestions from code review

* [PT FE] Mark qint32 with skip, remove precommit flag due to sporadic errors

* [PT FE] Introduce quantized test for PytorchTestClass

* [PT FE] Add missing tensor size in the errors count computation

* Update pytorch_layer_test_class.py

* [PT FE] Apply suggestions from review - remove contexts, log100 for errors, add precommit flags

* Apply suggestions from code review

* [PT FE] Fix quantize per channel test after merge

* Update tests/layer_tests/pytorch_tests/pytorch_layer_test_class.py

* Update pytorch_layer_test_class.py

* Update test_quantize.py

* Apply suggestions from code review

* [PT FE] Fix quantized mul by changing default quantization dtype

* Update pytorch_layer_test_class.py

* Update tests/layer_tests/pytorch_tests/pytorch_layer_test_class.py

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

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

* Update tests/layer_tests/pytorch_tests/test_quantized_mul.py

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-07-21 10:27:35 +00:00
Maxim Vafin
12b1df5db3 Disable sporadically failing tests (#18694) 2023-07-20 21:34:43 +00: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
Mateusz Mikolajczyk
bc261424ef [PT FE] Add quantized::conv2d and quantized::conv2d_relu (#18651)
* Add quantized conv2d

* Fix schema

* Remove mark_output

* Remove tests from pre-commit
2023-07-20 15:35:11 +00:00
Mateusz Mikolajczyk
b315880cc3 [PT FE] Add quantized::linear (#18570)
* Support GetAttr with packed params

* Apply suggestions from code review

* [PT FE] Add quantized types as normal types to decoder

* [PT FE] Add decoder dequantize, add dtypes to quantize

* [PT FE] Add dequantize example

* [PT FE] Implement replacer for quantized nodes

* [PT FE] Register replacer for quantize/dequantize

* [PT FE] Remove unwanted junk from previous version

* [PT FE] Fix building mistakes for frontend

* [PT FE] Clang fix

* [PT FE] Ease of use upgrade to quantize funcs

* [PT FE] Clang format

* [PT FE] Introduce new version of quantize/dequantize

* [PT FE] Remove unwanted files from new version

* [PT FE] Fix style

* [PT FE] Add QuantizedPtNode replacer, fix accuracy error

* [PT FE] Add improved version of quantize/dequantize with shared_ptrs

* [PT FE] Fix utils shared ptr reference error

* [PT FE] Quantize now takes correct input for operations

* [PT FE] Upgrade quantize method

* [PT FE] Add BFS for dequantize, add quantize_per_channel

* [PT FE] Add missing replacer to frontend, improve tests

* [PT FE] Rename replacer -> remover, remove unwanted header files

* [PT FE] Change function declarations to return ov::Output instead of shared ptr

* [PT FE] Add missing context mark node

* [PT FE] Remove unknown modifications to ie_c_api

* [PT FE] Remove fp16 support, turn off int32 tests

* [PT FE] Clang format

* [PT FE] Fix quantize_per_tensor

* [PT FE] Minor fixes from review

* [PT FE] Remove dequantize, remove helpers, replacer now removes nodes instead

* [PT FE] Rename Replacer to Remover for dequantize nodes

* [PT FE] Clang format

* [PT FE] Move comments to header files, minor import fixes

* [PT FE] Fix clang format

* [PT FE] Fix dtype issue

* [PT FE] Fix quantize_per_channel tests

* Add quantized::linear

* Update quantized_linear.cpp

* add contructors

* Improve tests

* Add requested checks

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
Co-authored-by: Roboreptile <piotr.krzeminski@intel.com>
2023-07-20 11:25:56 +02:00
Piotr Krzemiński
6d8dcb059d [PT FE] Fix conversion for aten::quantize_per_channel (#18646)
* Support GetAttr with packed params

* Apply suggestions from code review

* [PT FE] Add quantized types as normal types to decoder

* [PT FE] Add decoder dequantize, add dtypes to quantize

* [PT FE] Add dequantize example

* [PT FE] Implement replacer for quantized nodes

* [PT FE] Register replacer for quantize/dequantize

* [PT FE] Remove unwanted junk from previous version

* [PT FE] Fix building mistakes for frontend

* [PT FE] Clang fix

* [PT FE] Ease of use upgrade to quantize funcs

* [PT FE] Clang format

* [PT FE] Introduce new version of quantize/dequantize

* [PT FE] Remove unwanted files from new version

* [PT FE] Fix style

* [PT FE] Add QuantizedPtNode replacer, fix accuracy error

* [PT FE] Add improved version of quantize/dequantize with shared_ptrs

* [PT FE] Fix utils shared ptr reference error

* [PT FE] Quantize now takes correct input for operations

* [PT FE] Upgrade quantize method

* [PT FE] Add BFS for dequantize, add quantize_per_channel

* [PT FE] Add missing replacer to frontend, improve tests

* [PT FE] Rename replacer -> remover, remove unwanted header files

* [PT FE] Change function declarations to return ov::Output instead of shared ptr

* [PT FE] Add missing context mark node

* [PT FE] Remove unknown modifications to ie_c_api

* [PT FE] Remove fp16 support, turn off int32 tests

* [PT FE] Clang format

* [PT FE] Fix quantize_per_tensor

* [PT FE] Minor fixes from review

* [PT FE] Remove dequantize, remove helpers, replacer now removes nodes instead

* [PT FE] Rename Replacer to Remover for dequantize nodes

* [PT FE] Clang format

* [PT FE] Move comments to header files, minor import fixes

* [PT FE] Fix clang format

* [PT FE] Fix dtype issue

* [PT FE] Fix quantize_per_channel tests

* Apply suggestions from code review

Removing sporadic tests from precommit

* Apply suggestions from code review

* [PT FE] Fix conversion errors for aten::quantize_per_channel

* [PT FE] Mark axis 2 as xfail

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-07-20 10:49:20 +02: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
Ekaterina Aidova
c867c23bb6 [PT FE]: support upsamle2d bilinear and bicubic with antialias (#18617) 2023-07-19 09:36:11 +04:00
Anastasiia Pnevskaia
cd6ffd7620 Removed redundant copy of Tensor in TF Const translator (#18299)
* Removed copy of consts in translator, added test.

* Fixed memory loss for tf.Const.

* Added test, minor corrections.

* Update src/bindings/python/src/openvino/frontend/tensorflow/node_decoder.py

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

* Test corrections.

* Added comment.

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-17 11:41:33 +00:00
Piotr Krzemiński
d7984f3ec2 [PT FE] Add aten::quantize_per_tensor, aten::quantize_per_channel, aten::dequantize (#18266)
* Support GetAttr with packed params

* Apply suggestions from code review

* [PT FE] Add quantized types as normal types to decoder

* [PT FE] Add decoder dequantize, add dtypes to quantize

* [PT FE] Add dequantize example

* [PT FE] Implement replacer for quantized nodes

* [PT FE] Register replacer for quantize/dequantize

* [PT FE] Remove unwanted junk from previous version

* [PT FE] Fix building mistakes for frontend

* [PT FE] Clang fix

* [PT FE] Ease of use upgrade to quantize funcs

* [PT FE] Clang format

* [PT FE] Introduce new version of quantize/dequantize

* [PT FE] Remove unwanted files from new version

* [PT FE] Fix style

* [PT FE] Add QuantizedPtNode replacer, fix accuracy error

* [PT FE] Add improved version of quantize/dequantize with shared_ptrs

* [PT FE] Fix utils shared ptr reference error

* [PT FE] Quantize now takes correct input for operations

* [PT FE] Upgrade quantize method

* [PT FE] Add BFS for dequantize, add quantize_per_channel

* [PT FE] Add missing replacer to frontend, improve tests

* [PT FE] Rename replacer -> remover, remove unwanted header files

* [PT FE] Change function declarations to return ov::Output instead of shared ptr

* [PT FE] Add missing context mark node

* [PT FE] Remove unknown modifications to ie_c_api

* [PT FE] Remove fp16 support, turn off int32 tests

* [PT FE] Clang format

* [PT FE] Fix quantize_per_tensor

* [PT FE] Minor fixes from review

* [PT FE] Remove dequantize, remove helpers, replacer now removes nodes instead

* [PT FE] Rename Replacer to Remover for dequantize nodes

* [PT FE] Clang format

* [PT FE] Move comments to header files, minor import fixes

* [PT FE] Fix clang format

* [PT FE] Fix dtype issue

* [PT FE] Fix quantize_per_channel tests

* Apply suggestions from code review

Removing sporadic tests from precommit

* Apply suggestions from code review

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-07-17 02:30:02 +02:00
Anastasiia Pnevskaia
6af1bb307c String tensors in tf.Graph decoder (#18461)
* String consts in TF Decoder.

* Fixed test.

* Small corrections.

* Added test, minor corrections.

* Test correction, removed decoding.

* Removed wrong changes.

* Removed not needed code.
2023-07-14 17:58:07 +04:00
Roman Kazantsev
826f345daf [TF FE] Support TF1 Control Flow: Switch, Merge (#18378)
* [TF FE] Support Switch and Merge to fuse into If operation

It introduces support of TF1 control flow with Switch and Merge nodes.

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

* Add script for test model generation

* Fix code-style

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

* Fix build issue

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

* Fix build issue with types

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

* Apply code-review feedback: optimizations in utils

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

* Fix build issue

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

* Apply code-review remarks and cover more cases

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

* Remove commented code

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

* Remove unused vars

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

* Update MO unit-tests wit Switch-Merge case

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

* Fix build issue: remove unused variable

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

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-07-14 15:56:34 +02:00
Maxim Vafin
73ed804134 Fix typo in align types function (#18474) 2023-07-14 13:02:02 +02:00
Ekaterina Aidova
4c49040ce6 [PT FE]: multiple fixes for models from optimum testing scope (#18501)
* [PT FE]: multiple fixes for models from optimum testing scope

* Update src/frontends/pytorch/src/op_table.cpp
2023-07-14 10:37:53 +04:00
Maxim Vafin
1d9be8c76e Do not freeze models with compressed constants (#18505)
* Do not freeze models with compressed constants

* Add test
2023-07-14 08:30:35 +02:00
Maxim Vafin
acb14d5d6b [PT FE] Support bfloat16 constants (#18534)
* [PT FE] Support bfloat16 constants

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

* Add tests for tracing
2023-07-14 08:29:55 +02:00
Andrey Kashchikhin
a5782e0906 [CI] Introduce Windows pipeline in GitHub Actions (#18487)
* introduce win pipeline

* save only on master

* skip test_if for pytorch tests

* skip pytorch layer tests

* skip one test, execute python tests
2023-07-13 14:03:33 +04:00
Mateusz Mikolajczyk
82c65c25da [PT FE] Add aten::scatter and inplace for aten::sub translation (#18341)
* Add sub inplace

* Add scatter implementation

* Remove debug var

* Add tests for empty index

* Add reduce support

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-07-11 11:00:50 +02:00
Andrey Kashchikhin
c738899408 [CI] Introduce Linux pipeline in GitHub Actions (#18355)
* skip validation, always include cmake

* rm unconditional inclusion of zlib

* always include zlib

* correct path for builtin_extensions

* find builtin extensions recursively

* include test_utils always

* add logs for build_samples

* skip tests with dir accessing

* remove platform specification for samples build

* do not pkgconfig on win, use cmake generic on linux for samples

* rm make

* fix num_threads

* use bare numbers

* skip failing

* skip test_lrn_basic

* find zlib

* print error of downloading

* add linux pipeline

* do not save cache from PRs; add skipif only in GHA

* rm caching

* evaluate against a string

* do not include test_utils to the install dir
2023-07-11 11:54:33 +04:00
Pavel Esir
1cb4595727 [MO] add support for scalar shapes into cli_parser.py (#18312)
* add support for scalar shapes into cli_parser.py

* add test-case with scalar shapes for convert_model

* reordered inputs in test-case with scalar shapes for convert_model

* minor clarifications

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-08 17:27:07 +00:00
Pavel Esir
af9a8cbbd7 fix GitHub Actions failing tests (#18357)
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-08 18:21:59 +02:00
Mateusz Mikolajczyk
63071b21d4 [PT FE] Add translation for aten::fake_quantize_per_tensor_affine and aten::fake_quantize_per_channel_affine (#18176) 2023-07-07 09:05:23 +00:00
Sergey Lyalin
dfba702c74 Decompose/flatten tuple inputs (#18092)
* prim::TupleUnpack and prim::ListUnpack removing transformation in PT FE to flatten input list and tuples

* Enabled tuples and lists as items in example_inputs

* Applied code style

* Added tests for tuples as inputs and extended test infrastructure to support it

* Negligible performance optimizations

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

* Fixed duplicated names of test classes

* Added description for tuple flattening transformation

* Removed any support for list flattening on inputs; fixed layer tests

* Fixed style

* Fixed order of new Parameters and Results while flattening tuples

* Fixed style

* Better diagnostics when not all prim::TupleUnpack ops after Parameters are decomposed

* Small fix in diagnostics message

---------

Co-authored-by: Ekaterina Aidova <ekaterina.aidova@intel.com>
Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Alina Kladieva <alina.kladieva@intel.com>
2023-07-06 11:05:26 +04:00
Anastasiia Pnevskaia
5838685bd5 Removed exception for BytesIO objects in convert_model() (#18318)
* Removed exception for BytesIO objects, added test.

* Small correction.

* Corrected imports.

* Apply suggestions from code review

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

* Removed wrong comment.

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-03 18:04:35 +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
dependabot[bot]
f405ee2b9d Update pytest requirement from <7.4,>=5.0 to >=5.0,<7.5 in /tests (#18233)
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.4.0)

---
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>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-06-30 12:36:26 +04:00
Ekaterina Aidova
df0bd18ed2 [PT FE]: fix constant folding for dequantization (#18190)
* [PT FE]: fix constant folding for dequantization

* add test
2023-06-23 06:41:32 +02:00
dependabot[bot]
25573279e7 Bump paddlepaddle from 2.4.2 to 2.5.0 in /tests (#18166)
Bumps [paddlepaddle](https://github.com/paddlepaddle/paddle) from 2.4.2 to 2.5.0.
- [Release notes](https://github.com/paddlepaddle/paddle/releases)
- [Changelog](https://github.com/PaddlePaddle/Paddle/blob/develop/RELEASE.md)
- [Commits](https://github.com/paddlepaddle/paddle/compare/v2.4.2...v2.5.0)

---
updated-dependencies:
- dependency-name: paddlepaddle
  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>
2023-06-21 16:29:18 +04:00
Ekaterina Aidova
a8a366de08 [PT FE]: use example input for dtype and rank detection (#18083)
* [PT FE]: use example input for dtype and rank detection, support unordered input dict

* Apply suggestions from code review

* restore old behaviour for old torch versions

* move info addition after parsing
2023-06-20 17:31:30 +04:00
Przemyslaw Wysocki
b63e8433b0 Update labeler and numpy (#18136) 2023-06-19 14:21:10 +00:00
dependabot[bot]
e54bd6ab1b Update numpy requirement in /tests (#18134)
Updates the requirements on [numpy](https://github.com/numpy/numpy) to permit the latest version.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](https://github.com/numpy/numpy/compare/v1.16.6...v1.25.0)

---
updated-dependencies:
- dependency-name: numpy
  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-06-19 14:46:06 +04:00
Santhosh Mamidisetti
0b708b5eff updated py_checks.yml , workflow to be triggered (#17956)
* updated py_checks , trying to trigger workflow

* trail trigger

* undone changes

* changes after PR

* corrected flake for logger , constants .py

* fixed flake8 test on modified files

* fixed flake8 test on modified files

* fixed logger.py to trigger workflow

* Update .github/workflows/py_checks.yml

Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>

* Update .github/workflows/py_checks.yml

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>

---------

Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>
Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
2023-06-16 14:02:43 +04:00
Mateusz Mikolajczyk
42c93a70d4 [PT FE] Add aten::fft_rfftn and aten::fft_irfft complex replacers (#17999)
* Add transformations for rfftn and irfftn

* Formatting & reduce tests

* Improvements

* rm unused namespace

* Apply suggestions from review

* Fix format

* Add tests for dynamic type

* Add error messages
2023-06-16 11:35:30 +02:00
Maxim Vafin
10ace822ef [PT FE] Do not freeze for quantized models (#18082)
* Do not freeze for quantized models

* Update tests/layer_tests/pytorch_tests/pytorch_layer_test_class.py

* Fix getitem
2023-06-15 19:41:06 +02:00
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