Commit Graph

44 Commits

Author SHA1 Message Date
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
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
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
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
Ekaterina Aidova
f8aae85183 [PT FE]: add more list construct transformations (#15614) 2023-02-15 16:39:27 +00:00
Ekaterina Aidova
13eca30081 [PT FE]: support aten::gelu with tanh approximate and tests (#15715) 2023-02-15 15:11:37 +01:00
Ekaterina Aidova
ba6b2609af [PT FE]: update masked_fill support for multiple precisions (#15722) 2023-02-15 15:32:06 +04:00
Ekaterina Aidova
55d667ce32 [PT FE] aten::to extend op support for device tracing case (#15712) 2023-02-15 09:04:09 +01:00
Ekaterina Aidova
5ead83f315 [PT FE]: fix sporaidic failure in pytorch layer tests (#15713) 2023-02-14 21:35:35 +04:00
Maxim Vafin
5cc1c2c5e5 Add support for aten::_set_item (#15643)
* Add support for aten::_set_item

* Update loop.cpp

* Update tests/layer_tests/pytorch_tests/test_set_item.py

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

* Update test_set_item.py

* Apply code review comments

* Fix code style

* Update tests/layer_tests/pytorch_tests/test_set_item.py

---------

Co-authored-by: Ekaterina Aidova <ekaterina.aidova@intel.com>
2023-02-14 14:11:51 +01:00
Ekaterina Aidova
609dee0abc [PT FE]: support aten:Bool, add tests for aten::add_ (#15590) 2023-02-13 23:29:43 +01:00
Maxim Vafin
00f8d2b992 Add support for concating lists in aten::add (#15587) 2023-02-10 16:41:27 +00:00
Maxim Vafin
d992c6b9c7 [PT FE] Fix aten::flatten, add more tests (#15576)
* Fix flatten, add more tests

* Apply review feedback

* Fix code style
2023-02-10 14:23:27 +01:00
Leonard Sikorski
92788b1838 [PT FE] Add aten::empty operator with layer test (#15490) 2023-02-09 08:24:08 +01:00
Ekaterina Aidova
ac1e885324 [PT FE]: add tests for rsub and handle mixed precision (#15555)
* [PT FE]: add tests for rsub and handle mixed precision

* update tests
2023-02-08 19:55:43 +04:00
Maxim Vafin
6a9608b075 [PT FE] Fix GroupConvolution weights reshape (#15560)
* Fix GroupConvolution weigts

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

* Update convnd.cpp
2023-02-08 14:11:35 +01:00
Ekaterina Aidova
cd340301d8 [PT FE]: support prim::min, prim::ListConstruct as output and fix aten::getitem for prim::ListConstruct (#15470) 2023-02-02 22:36:07 +00:00
Bartek Szmelczynski
566fae2b01 Add aten stack transformation (#15311)
* add support for aten::stack

* add new lines

* updated aten stack transformation

* add comments to the code

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
2023-02-02 20:15:28 +01:00
Maxim Vafin
92649105ed Add eltwise types resolving. Support big int constants. (#15415)
* Add eltwise types resolving. Support big int constants.

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

* Small fix

* Fix some cases

* Add tests for add in different types

* Add tests for mul

* Add tests for sub and div

* Small fixes

* Return list handling (needed for empty lists)

* Add test for empty list

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

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

* Use refs instead of ptrs

* Apply suggestions from code review

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

* Apply code review suggestions

* Fix code style

* Add more eltwise ops

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-02-02 02:15:33 +01:00
Mateusz Mikolajczyk
a769cfe7e8 [PT FE]: Add aten::view transformations (#15339) 2023-02-01 12:14:17 +01:00
Leonard Sikorski
cab559b478 [PT FE] Add aten::repeat_interleave operator (#15274) 2023-02-01 11:45:04 +01:00
Ekaterina Aidova
d57862edee [PT FE]: support transformation for case aten::size + aten::__getitem__ (#15368) 2023-01-31 19:08:13 +01:00
Leonard Sikorski
1dd84e2074 [PT FE] Add aten::unfold operator with layer test (#15316) 2023-01-31 18:29:32 +01:00
Leonard Sikorski
f66f31a3b0 Add leyer test for aten::sub operator (#15406) 2023-01-31 19:50:05 +04:00
Ekaterina Aidova
a12de8183c [PT FE]: handle prim::ListConstruct + aten::pad case (#15288) 2023-01-31 14:08:22 +00:00
Ekaterina Aidova
758a0dea56 [PT FE]: support grid sampler (#15243) 2023-01-31 14:04:37 +04:00
Ekaterina Aidova
b2ce43a172 [PT FE]: support aten::instance_norm (#15213) 2023-01-31 08:51:02 +00:00
Mateusz Mikolajczyk
ba5ddf2e49 [PT FE]: Add aten::meshgrid + prim::ListUnpack transformation (#15195)
* Add meshgrid listunpack transformation

* Add case when indexing is not specified

* Fix typos

* Fix problem with 1 input execution & missing runtime_info

* Fix issue with meshgrid placed in loop body

* Add tests to precommit

* Apply sugestions from review

* Fix input 0

* Improve indexing attribute read
2023-01-28 10:08:25 +03:00
Leonard Sikorski
949b9623a4 [PT FE] Add aten::__and__ operator with layer test (#15365)
* Layer test for aten::__add__ operator

* Not working version of aten::__and__

* Simplified implementation of ante::__and__ operator

* Fix file format
2023-01-28 10:06:06 +03:00
Bartek Szmelczynski
ce4c082cb2 add aten::topk (#15221)
* add aten::topk

* remove commented lines

* remove white space

* move include to invidual ops

* swithc include statements

* fix style

* trim test cases
2023-01-27 09:34:55 +01:00
Ekaterina Aidova
3f5d7ad7a0 [PT FE]: support aten::var_mean and aten::remainder (#15193)
* [PT FE]: support aten::var_mean and aten::remainder

* upd headers

* fix gather version
2023-01-26 14:30:42 +00:00
Maxim Vafin
84a4e3bbf4 Try to fix sporadic sum layer test fail (#15304) 2023-01-26 16:08:30 +04:00
Ekaterina Aidova
6475165833 [PT FE]: supports eye, tril, triu, tensor.fill_ and implicit scalars (#15187) 2023-01-25 21:04:56 +03:00
Maxim Vafin
994b227b86 Remove None at outputs of the model, improve types handling in frontend (#15258)
* Remove None at outputs of the model, improve types handling in frontend

* Fix py code style

* Add torch dependency in pybind tests

* Fix tests if fe is disabled and add backward type cpnversion

* Move decoder tests to layer tests

* Fix codestyle

* Add comment

* Move tests to separate folder

* Update .ci/azure/linux.yml
2023-01-25 13:28:47 +03:00
Bartek Szmelczynski
3bbaa16d90 Add aten mul tests (#15223)
* add tests for aten::mul

* add mul tests to precommit

* add test cases, remove parametrization

* add reason to xfails
2023-01-25 10:01:46 +01:00
Ekaterina Aidova
2ec116f592 [PT FE]: support conv transpose (#15191)
* [PT FE]: support conv transpose

* apply comments
2023-01-22 07:03:54 +00:00
Bartek Szmelczynski
0fce8d29f8 add tests for aten::eq (#15222)
* add tests for aten::eq

* Update tests/layer_tests/pytorch_tests/test_eq.py

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

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-01-21 21:07:47 +03:00
Ekaterina Aidova
18bfa727bd [PT FE]: support aten::glu and aten::sigmoid_ (#15185)
* [PT FE]: support aten::glu and aten::sigmoid_

* upd headers

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

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

* return back opset

* Update op_table.cpp

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-01-21 21:05:20 +03:00
Ekaterina Aidova
595d447f2e [PT FE]: support aten::log, aten::log2 (#15184) 2023-01-20 20:42:49 +00:00
Maxim Vafin
53e699eaba Add PyTorch Frontend (#15069)
* WIP

* update input validation

* upsample_nearest2d and upsample_bilinear2d support

* support leaky_relu add test for inplace relu

* update tests, add handler for ListConstruct

* Do not create extra outputs in main body

* add positive case with non-default value

* update testing

* update test, handle non constant size and scale

* remove ie_device

* add aten::group_norm support

* refactoring

* Enable aten::reshape_as operator and add layer test

* more tests

* Fix typo in test

* Resolve conflicts

* fix code style

* expand init version

* expand_as and tests

* add transposed convolutions support

* add tests

* initial support pad

* add circular

* update for differenced in rang

* cleanup

* refactor

* more tests

* apply review comments

* Add split+listunpack transformation

* Add split+getitem transformation

* Add test cases

* fix typo

* Minor fixes

* Apply suggestions from code review

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

* Apply suggestions from code review

* Small fix

* Support converting models without freezing

* support BoolTensor and masked_fill

* add support aten::rsqrt and test for sqrt

* add cumsum and type_as

* support clamp

* support more matrix operations

* add tests

* Add aten::adaptive_avg_pool3d and layer test

* Change to rank

* fix code style in utils.hpp

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

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

* fix code style

* add tests

* add xfail

* remove unnecessary broadcast

* Changes required by style formater

* aten::_convolution_mode

* Changes requested by a reviewer

* remove code duplication

* add aten::unbind transformation

* full, zeros and ones

* Support getattr list and unrolling nested ifs

* Remove line change

* Enable back freezing in layer tests

* Add aten::norm operator and layer test

* Small fix in layer test

* add aten::roll

* add empty line

* Typo fix

* fix style

* fix style v2

* add pytorch frontend to wheel

* Support all types of numeric norms

* add check for dynamic shapes

* remove random change

* merge statements

* add min and max ops support

* aten::max and aten::min

* move axes range creation to utils

* add transformation for tuple results, update tests

* fix copyright

* aten::var

* add test and translation for numel

* ignore aten::clone

* Add layer test for aten::add operator

* Fix typo

* Remove redundant import

* Add parameter name in forward method

* fix code style

* apply review comments

* Add size+slice+listunpack transform

* Add append listunpack transformation

* Register transformation

* aten::where

* update realization

* Fix issue with getitem

* Fix getitem

* Add layer test for aten::view operator

* Add tests for listunpack

* add test for aten::div

* fix style

* update aten::adaptive_max_pool2d

* fix style

* add aten::floor_divide

* aten::addmm support alpha and beta with different dtype

* nonzero

* Change test name

* update test cases to include other dtypes

* aten::arange

* prim::max transformation for ListConstruct

* rename op

* generalize conv2d implementation for conv1d and conv3d

* aten::unsqueeze_ and tests for aten::unsqueeze (#70)

* add aten::le, aten::ge and tests for other tensor comparision ops (#74)

* add support trigonometry ops (#73)

* support aten::upsample_bicubic2d, aten::ceil, aten::floor (#72)

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

* extend and add tests for avg_pool and max_pool

* extend tests and constant filling ops

* fix as_tensor and full ops

* aten::repeat

* fix code style

* aten::im2col (#61)

* aten::im2col

* remove debug prints, add number of elements check

* fix failed tests

* move helper function

* use split

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

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

* fix code style

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

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

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

* fix code style

* revert removeinf floordiv, add floor_divide file

* Fix merge issue

* reduce code duplication

* refactor

* Add len operator with layer test

* update clamp to support mixed precision and add support torch.long for constants

* aten::selu

* add trunc mode to div

* add else statement

* Add test case to layer test

* Fix submodules (#88)

* update test file

* fix namings

* execute in fp64 and convert back to initial precision

* Revert set_output_size to master. Small fix in If validate

* Fix build and code style

* fix failed tests

* Add torchvision::nms operator and layer test

* Change requested by a reviewer

* Remove div test

* convert constants to input type

* Mark some cases in div tests as xfail (#93)

* Small refactoring (#94)

* Small refactoring

* Fix type

* Fix python codestyle

* Incremental fix code style (#95)

* Fix style (#96)

* Fix copyright

* Fix code style

* Branch clean up (#97)

* Optimize includes and force opset10 (#98)

* Optimize includes

* Force opset10 in pt fe

* Fix codestyle (#99)

* Fix style

* Fix clang codestyle

* Fix cerr with debug log

* Update src/bindings/python/src/pyopenvino/frontend/pytorch/decoder.cpp

* Add pytorch dependency only if pytorch frontend is enabled

* Update src/bindings/python/src/pyopenvino/CMakeLists.txt

* Add layer tests to precommit (#100)

* Add layer tests to precommit

* Remove accidentally added files

* Apply code style on layer tests

* batch norm tests and fixes

* move default weight and bias to else block

* reduce code duplication

* Changes requested by a reviewer

* Changes requested by a reviewer

* Remove dependency from pytorch in pyopenvino (#102)

* Remove dependency from pytorch when fe is disabled

* Change docstring

* Remove pytorch FE dependency from pyopenvino

* Apply codestyle (#107)

* Apply codestyle

* Remove commented line

* Apply suggestions from code review

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

* Fix mock FE test (#108)

* Fix mock PE test (#111)

* Revert changes in StridedSlice (#114)

* Small refactoring (#116)

* Small refactoring

* Fix codestyle

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Fix cmake copyright define (#117)

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

* Apply suggestions from code review

* Update build configs (#120)

* FIx build configs

* Update type cast in full.cpp

* Apply review feedback (#121)

* Apply suggestions from code review

* Apply suggestions from code review

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

* Fix issue after master merge (#122)

* Fix issue after master merge

* Fix build

Co-authored-by: eaidova <ekaterina.aidova@intel.com>
Co-authored-by: bszmelcz <bartosz.szmelczynski@intel.com>
Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
Co-authored-by: sikorsl1 <leonard.sikorski@intel.com>
Co-authored-by: Leonard Sikorski <l.sikorski123@gmail.com>
Co-authored-by: Mateusz <mateusz.mikolajczyk@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-01-18 18:16:57 +04:00