Commit Graph

314 Commits

Author SHA1 Message Date
Tomasz Dołbniak 60d5d57ece
ScatterElementsUpdate downgrade transformation (#18306) 2023-06-30 13:18:24 +02:00
Tomasz Dołbniak a4a7344732
The code (#18270) 2023-06-29 09:46:38 +02:00
Ivan Tikhonov eb43f40ca1
Revert "Enable ResolveNamesCollisions transformation in MOC (#18052)" (#18218)
This reverts commit 9630766e03.
2023-06-24 01:06:12 +04:00
Mateusz Bencer 92fbf96300
Cache const-folded value for the same input connected to MultiSubGraphOp during PushConstantToSubgraph (#18067) 2023-06-23 17:45:55 +02:00
Ivan Tikhonov 9630766e03
Enable ResolveNamesCollisions transformation in MOC (#18052)
* ResolveNamesCollisions transformation refactoring; enable it in MOC

* fix the description

* call ResolveNamesCollisions transformation in the frontends; resolve review comments

* Resolve review comments
2023-06-23 11:56:26 +04:00
Oleg Pipikin 48b47e754f
Rename ngraph with ov in common_test_utils (#17905)
* Rename ngraph with ov in common_test_utils

* Fix comments

* Delete opset includes from commonTestUtils

* Fix CI and code style

* Apply comments

* Fix CI and apply comments
2023-06-23 09:51:47 +02:00
Mateusz Tabaka 37c538d6bd
Reject negative pads in SpaceToBatchFusion (#18028) 2023-06-20 10:02:56 +02:00
Georgiy Manuilov 957ab9b831
Add missing header for std::tolower (#18118) 2023-06-17 00:25:13 +04:00
Ivan Tikhonov 6f14a43ea6
TSForwardBase class and a transformation to reset `no_sinking` attribute (#17913)
* Added TSForwardBase class and a new transformation to reset no_sinking attribute

* Refactoring

* fix an issue with legacy_output_names

* resolve review comments

* Resolve review comments
2023-06-16 20:43:26 +04:00
Pavel Esir aa32ff1df3
keep Const + DecompressionConvert for CPU (#15930)
* keep Const+DecompressionConvert pattern for CPU

* temporary disabled failing unit-tests

* disable CF by modifying bounds evaluate as well; minor corrections

* added TODOs with ticket numbers

* join const+decompression markings

* minimized convert_precision.cpp changes

* minor corrections

* refactor fp16 transformations: moved into separate fp16_compression folder

* style-fix

* minor fixes

* do not disable evaluate and CF in shape path

* safer disabling of Const conversion

* style-fix and minor corrections

* restore original placement of ConvertPrecision
2023-06-15 13:07:22 +04:00
Mateusz Tabaka 93689cc417
Don't constantfold weights in MatMulConstTransposesExtraction transformation (#17917)
get_constant_from_source for Transpose node calls evaluate method
twice which is unnecessary in this case.

Ticket: CVS-105967
2023-06-11 09:49:21 +02:00
Ivan Tikhonov 74100670ac
Delete the deprecated LowLatency (version1) transformation (#17965)
* Delete the deprecated LowLatency (version1) transformation

* detele LowLatency refs from the docs
2023-06-10 12:24:43 +04:00
Wang Kai 7b86b427cb
fixing some typos (#17980) 2023-06-10 01:13:31 +04:00
Mateusz Tabaka 67f7808fc4
AlignEltwiseInputRanks - fix when output rank is less than constant rank (#17895)
Fixes an issue when AlignEltwiseInputRanks is applied on FakeQuantize with
scalar as a first input and input/output low/high being Shape{1} constants.
In such case FakeQuantize output is still a scalar, so the difference
between output rank and input/output low/high rank is negative.

Ticket: CVS-112454
2023-06-09 20:31:20 +04:00
Zlobin Vladimir 86e46e5e35
Work around deprecation error (#17888)
For some reason my MSVC gives the following error:
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\utility(176,5): error C4996: 'ngraph::SlicePlan::SlicePlan': T
he nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openv
ino.ai/latest/openvino_2_0_transition_guide.html [C:\Users\vzlobin\r\openvino\build\src\common\transformations\inference_engine_transformations_obj.vcxproj
]
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xmemory(680,47): message : see reference to function 'std::pai
r<std::shared_ptr<ov::op::v1::StridedSlice>,ngraph::SlicePlan>::pair(std::pair<std::shared_ptr<ov::op::v1::StridedSlice>,ngraph::SlicePlan> &&)' [C:\Users\
vzlobin\r\openvino\build\src\common\transformations\inference_engine_transformations_obj.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\utility(175,5): error C4996: 'ngraph::SlicePlan::SlicePlan': T
he nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openv
ino.ai/latest/openvino_2_0_transition_guide.html [C:\Users\vzlobin\r\openvino\build\src\common\transformations\inference_engine_transformations_obj.vcxproj
]
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xmemory(680,47): message : see reference to function 'std::pai
r<std::shared_ptr<ov::op::v1::StridedSlice>,ngraph::SlicePlan>::pair(const std::pair<std::shared_ptr<ov::op::v1::StridedSlice>,ngraph::SlicePlan> &)' [C:\U
sers\vzlobin\r\openvino\build\src\common\transformations\inference_engine_transformations_obj.vcxproj]
2023-06-05 20:31:05 +04:00
Ilya Churaev ea04f8217d
Mark as deprecated nGraph API (#17647)
* Mark as deprecated nGraph API

* Fixed code style

* Added IN_OV_LIBRARY define

* Suppress warnings for log

* Suppress warning

* Updated nGraph headers

* Fixed build for macOS

* Fixed lpt and snippets

* Fixed build all on macOS

* Suppress some warnings

* Fixed some new warnings

* Fixed new warnings

* Try to fix some warnings

* More warnings

* Soome change

* Suppress more warnings

* Suppress warnings for transformations

* Suppress warnings for LPT

* One more fix

* Suppress more warnings

* Try to fix opset error

* Remove opset constructor

* Cannot fix opset warning

* Suppress warnings for offline transfromations

* Fixed some warnings for Windows

* Fixed code style

* Suppress some warnings for onnx FE

* Revert "Suppress some warnings for onnx FE"

This reverts commit 75d23b64fc.

* Revert "Fixed code style"

This reverts commit c6eba63116.

* Revert "Fixed some warnings for Windows"

This reverts commit 23d7ed88b6.

* Revert "Suppress warnings for offline transfromations"

This reverts commit 0b9f6317bf.

* Revert "Cannot fix opset warning"

This reverts commit 19ea658639.

* Revert "Remove opset constructor"

This reverts commit 06afb1bc20.

* Revert "Suppress warnings for LPT"

This reverts commit 58b1c0f5a0.

* Revert "Suppress warnings for transformations"

This reverts commit f8bb9814a1.

* Revert "Suppress more warnings"

This reverts commit f9f0da9acb.

* Revert "Soome change"

This reverts commit e545d4984e.

* Remove deprecation for ngraph::OpSet and FactoryRegistry
2023-06-01 12:44:28 +04:00
Ivan Tikhonov fa428a12e6
Fix TransposeSinking transformation for Gather op (#17540)
* fix TransposeSinking for Gather op

* add test

* fix copyright

* Resolve review comments
2023-05-24 10:34:32 +04:00
Bo Liu 703e5421ca
extend PaddlePaddle elementwise broadcast type support (#17102)
* enable PaddlePaddle elementwise broadcast

* fix CI fail issue

* Apply suggestions from code review

* fix CI fail issue

* only B to A broadcast is supported for PDPD

* fix GPU plugin testcase fail issue

* keep PDPD broadcast_merge cpu plugin implement align with ov core

* add type prop test case for pdpd broadcast dst shape smaller than src shape
2023-05-23 14:25:56 +04:00
Mateusz Tabaka 48f207f961
GRUCellFusion - fix handling bias in rz order (#17651)
Currently GRUCellFusion treats bias as if it's always in zr order,
which sometimes is not the case. So whenever GRUCellFusion detects rz order,
it should also split bias into r and z and concat the halves into zr.

Ticket: CVS-97025
2023-05-22 20:29:05 +04:00
Maxim Vafin 41de4ba638
Add transformation to convert adaptive pool to reduce (#17488)
* Add transformation to convert adaptive pool to reduce

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

* Add tests and apply feedback

* Simplify if branches

* Add to common pipeline

* Remove 3d AdaptivePool with out_shape 1

* Skip test instead of remove

---------

Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
2023-05-19 13:21:19 +02:00
Pavel Durandin 524a291c2b
[GPU] Fix convert reduce to reshape (#17529) 2023-05-16 11:31:11 +04:00
Evgeny Kotov 03256adf79
add Concat to CanPropagateForwardThrough (#17463) 2023-05-11 17:27:23 +02:00
Pawel Raasz f3fa1a5f96
Review prior box and clustered class for shape inference aspects (#17382)
* Review PriorBox op for shape inference aspects:
- check interval shape and label propagation
- check preserve interval values and labels on inputs
- add template shape_infer function
- add/update test for dynamic and static shape inference

* Update PriorBox evaluate to use ov::Tensor
- remove ngraph namespace form PriorBox where possible

* Review PriorBoxClustered for shape infer aspects
- check interval dimension and label propagation
- check preserve partial values and labels on inputs
- add template implementation of shape_infer
- add/update test for static and dynamic shapes

* Use correct shape for PriorBox transformation test

* PriorBoxClustered evaluate use ov::Tensor
Remove ngraph namespace from op where possible

* Fix compilation issues
2023-05-08 10:40:07 +04:00
Ivan Tikhonov 52f32ae437
Fix the names copying in TransposeSinking backward transformations (#17283)
* Fix tensor names copying in TS transformations

* added a check that sinking is available for all consumers in TS backward transformations

* codestyle

* Apply review comments, add result sorting by tensor names in graph comparator

* delete debug code

* fix RemoveConsumers method implementation

* fix snippet tests

* use reference instead of raw pointer

* add new transformation tests

* fix transformation tests
2023-05-03 14:59:05 +04:00
Maxim Vafin 82dbca998a
Do not fuse Pad with negative pads (#17239)
* Do not fuse Pad with negative pad values

* Update src/common/transformations/tests/common_optimizations/pad_fusion.cpp

* Update src/common/transformations/tests/common_optimizations/pad_fusion.cpp
2023-05-02 10:49:53 +02:00
Ilya Lavrenov 7743e175b7
Warn if OpenVINO symbols require new CXX ABI (#16080)
* Warn if OpenVINO symbols require new CXX ABI

* Fixed warnings / errors on Windows
2023-04-29 01:17:52 +01:00
Ivan Tikhonov 40bf400b18
Add FakeQuantize op support in TS transformations (#17243)
* Add FQ op support in TS transformations

* codestyle

* Mark FQ as supported op in the TS ops list
2023-04-27 15:09:07 +04:00
Ivan Tikhonov 80519162ae
Reduce the binary size of transformation lib (#17220)
* Replace opset with op version for TransposeSinking and SmartReshape transformations to reduce binary size

* replace opset with op version in some op_conversions transformations

* codestyle
2023-04-26 19:03:36 +04:00
Mateusz Tabaka dfaa4e7bd6
Add ConvertSubtractWithConstant to MOCTransformations (#17058)
* Add ConvertSubtractWithConstant to MOCTransformations

Ticket: CVS-62419

* fix test_mo_import_from_memory tests

* move test file

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-04-26 11:37:42 +04:00
Mateusz Tabaka da4316845f
ConvMulFusion - handle ConvolutionBackpropData with 3 inputs (#17145)
* ConvMulFusion - handle ConvolutionBackpropData with 3 inputs

Ticket: 98769

* add using

* use compare functions
2023-04-26 11:37:31 +04:00
Gorokhov Dmitriy edec7bb897
[CORE] Disable fp32->fp16 optimized constant conversion impl (#17189) 2023-04-25 15:50:24 +00:00
Evgenya Stepyreva cd4c012f08
LogicalNot: convert precision (#17061)
* CVS-108362 LogicalNot: convert precision

* Test
2023-04-25 12:43:44 +00:00
Evgenya Stepyreva b452dab8f0
TypeRelaxed<>::clone_with_new_inputs thread safety fix (#16881)
* TypeRelaxed<>::clone_with_new_inputs thread safety fix

* Style

* Make TypeRelaxed<BaseOp>::clone_with_new_inputs copy node the same way as copy ctor of ov::Node

* Removed mutex field from intel_cpu::GraphContext

* Removed all about has_type_relaxed_ops field from the snippets subgraph

* Clonning test
2023-04-25 00:51:18 +04:00
Vladimir Paramuzov faba5fb71e
[Transformations] Add threshold for const comparison in Gelu fusion pass to fuse with fp16 precision (#17042) 2023-04-24 14:37:31 +04:00
Pavel Esir 6ff0cad127
Fix mixed precision inference for quantized IRs (#16785)
* disable mixed precision inference for quantized IRs

* typo fix

* improved solution, disable mixed precision in quantized IRs selectively only for float nodes

* minor typos correction

* added unit-tests

* renamed rt_info

* updated list of nodes for which FQ is propagated; updated unit-tests

* fix failing build
2023-04-24 13:13:04 +04:00
Vladislav Golubev 31efdfd00d
[Transformations] BroadcastTransition transformation (#16861) 2023-04-21 11:35:04 +04:00
Mateusz Tabaka 7338257e00
Fix transformations tests on 32 bit build (#17043)
Ticket: 104593
2023-04-19 11:28:00 +00:00
Ilya Churaev 566ef01a3f
Remove constructors for ov Exceptions (#16938)
* Remove constructors for ov Exceptions

* Fixed linux build

* Fixed ONNX Frontend

* Fixed paddle

* Fixed exceptions in tests

* Deprecate constructors for ov::Exception

* Suppress some warnings

* Merge several exceptions

* Some small changes

* Suppress more warnings

* More warnings

* mode warnings

* Suppress more warnings

* More warnings
2023-04-18 21:02:26 +04:00
Pavel Esir d70d8509c3
[FP16][IE] exclude MVN and NormalizeL2 from precision sensitive marking (#16953)
* exclude MVN from mixed infer

* fix align_mixed_fp32_fp16_types_test.cpp

* fix unit-tests for convert_precision.cpp

* code style fix
2023-04-18 16:20:49 +09:00
Ivan Tikhonov 930441b223
TransposeSinking: Gather and ReverseSequence (#16532)
* Resolve the performance issues in TransposeSinking transformation

* codestyle

* fix warning as error, fix tests failures

* fix ts for Concat and Reduce

* Fix TransposeReduceBackward

* fix the issue in TransposeFuse transformation

* fix TransposeReduce transformations

* Fix TransposeReduction, fix TransposeSinkingSplit, add unsqueeze support

* delete debug print

* Add additional validations

* fix node validation

* Fix validate for split, revert changes for concat, add BatchToSpace/SpaceToBatch

* Add SpaceToBatch/BatchToSpace

* fix TS for Interpolate + codestyle

* fix gna build

* Support TS for Interpolate, VariadicSplit, IsInf, IsNan, IsFinite + refactoring

* add the missed line

* add include

* TransposeSinking tests refactoring: part1

* TransposeSinking tests refactoring: part2

* Add limited support for StridedSlice op

* codestye

* TransposeReduction: skip the case when 2nd input for Squeeze is not provided

* Transpose sinking tests refactoring: part 3. + Revert changes in MOC.

* fix build

* codestyle

* Add tests for TS backward transformations, update TransposeSinkingFuse transformation, delete StridedSlice transformation prototype + tests refactoring

* fix unary tests

* Fix warning as error on Windows

* Add new tests for Unsqueeze/Squeeze; refactoring; remove debug code

* TransposeSinking: add support for Slice op

* Add descriptions to the transformations, add additional checks

* fix a warning

* TransposeSinking Rafactoring part2: move the transformations to a separate folder, align namespaces

* TransposeSinking refactoring: class names, namespaces

* codestyle

* resolve merge conflicts

* codestyle

* TSReduction refactoring, move Unsqueeze/Squeeze transformations to separate files, added limited support for Reshape op + tests

* fix minor mistakes

* fix warnings

* Added TSSlice transformation to TSGeneral, created TransposeSinkingGeneral alias in ov::pass namespace

* refactoring

* codestyle

* fix TSSqueeze/TSUnsqueeze transformations

* delete debug serialize

* remove TransposeSinking from MOC

* fix TSSqueeze/TSUnsqueeze transformations in case of Reshape op

* delete debug code

* fix unit tests, revert changes for TSSlice transformation

* TransposeSinking: Add gather support

* TransposeSinking: add support for Gather, ReverseSequence ops; Fix TSReduction, TSSqueeze, TSUnsqueeze transformations

* fix new constants shape

* fix TSReduction, TSSqueeze, TSUnsqueeze transformations; codestyle

* fix TSGather

* Fix TSGather transformation, add tests

* Updated TSGather transformation, updated the tests

* fix TSGather, codestyle

* Add missing files for TS testing

* fix TS for ReverseSequence op; codestyle

* revert local changes

* fix warnings

* delete const folding passes

* disable constant folding for shapeOf subgraph only

* correct thirdparty versions

* codestyle
2023-04-17 16:38:48 +00:00
Tomasz Jankowski 129670ab1e
[Transformations] Fix Parameter name override while removing Select node (#16934)
Details:
Applies valid node replacement method which avoids Parameter name override

Tickets: 101209

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-04-14 18:36:25 +02:00
Tomasz Dołbniak fb49228fec
Pillow modes in the preprocessor's resize mechanism (#16601) 2023-04-12 15:30:42 +02:00
Mateusz Tabaka bdd79fe931
CompressQuantizeWeights - use f32 precision when computing scale and zero point (#16794)
Ticket: 101825
2023-04-12 12:42:39 +02:00
Ivan Tikhonov 132dceb146
Delete redandant node copies in TSSqueeze, TSUnsqueeze and TSReduction transformations (#16753)
* Delete redandant node copies in TSSqueeze, TSUnsqueeze and TSReduction transformations, add new tests

* codestyle

* codestyle
2023-04-12 11:30:48 +04:00
Mateusz Tabaka 4fbd094cba
BroadcastConstRangeReplacement - skip unsqueeze if Broadcast input is 1D (#16851)
Ticket: 106636
2023-04-11 17:59:03 +02:00
Vladislav Golubev 296c2d6603
[Transforamtions] NonZero horizontal fusion: review leftovers (#16639)
* Review comments applied

* codestyle

* review comments applied
2023-04-11 15:42:43 +04:00
Evgenya Stepyreva bc7a121a20
Removes legacy transformations from CNNNetworkNGraphImpl::reshape (#15853)
* Removes legacy transformations from CNNNetworkNGraphImpl::reshape

* Removes legacy transformations from CNNNetworkNGraphImpl::reshape

* 6 more models propagate shape more precise

* Removes legacy includes

* Fix invalidation

* Test change

* win fix

* Ilyas suggestion

* Unary ops -- removed shape relying on the output of the op, used shapes from the input tensor instead

* Code clean up

* Equal: bounds evaluation

* Equal: bounds evaluation

* Restrict TypeRelaxed from partial_value propagation

* TypeRelaxed: propagate lower/upper bounds

* Remove debug prints

* fix build

* GPU shape inference problem fixed

* Generate Proposals: better dynamic shape propagation

* Style
2023-04-10 12:36:56 +02:00
Ivan Tikhonov 72952bdc45
Disable ConstantFolding for ShapeOf subgraph in TS transformation (#16765)
* Disable ConstantFolding for ShapeOf expressions in TS transformation

* update ModelWithEmptyTensorListAndPushBack: add ShapeOf subgraph
2023-04-07 14:50:59 +04:00
Vladimir Paramuzov 6d82f36050
Enable nop elimination for f16 type (#16749) 2023-04-07 09:18:27 +04:00
Ivan Tikhonov 4812879318
Enable transformation callback for TS transformations (#16767) 2023-04-06 20:42:01 +04:00