Commit Graph
452 Commits
Author SHA1 Message Date
Shuangji YangandIvan Tikhonov 8e103bcf39 fix bug on conversion of gather to sequeeze (#19012)
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-08-10 22:25:41 +04:00
Mateusz Tabaka 8ceddf4be7 CompressQuantizeWeights - handle decompressed inputs to FakeQuantize (#19061)
Decompression attribute (that is present in models with FP16 precision)
prevents the weights to be constantfolded. Weights constantfolding is
required by CompressQuantizeWeights to compress the weights to low
precision format.

Ticket: CVS-117310
2023-08-08 16:52:40 +00:00
Evgenya Stepyreva 0b9d0e232f Additional NopEliminations and SharedOpOptimizations (#18914)
* Shared ShapeOf transformation via SharedOpOptimization. Allow EliminateGatherUnsqueeze pattern to have intermediate binary operation. Changes covered with transformation tests

* Move Reshape up through binary op to be optimized by NopElimination transformations

* Optimizes Shared Convert

* SharedOpOptimization: give higher priority for nodes of later versions to become root nodes

* Deleted old transformations

* Added revalidation for modified nodes

* Added binary op revalidation to the EliminateGatherUnsqueeze in order to have correct shapes for other matchers in the same graph rewrite

* Made PrepareShapeOpsForEliminationAroundBE independable of the upper node

* Introduces GroupedSliceToVSplitOptimization optimization

* Preserve output names during GroupedSliceToVSplitOptimization

* Revert "Made PrepareShapeOpsForEliminationAroundBE independable of the upper node"

This reverts commit 96785b24c9.

* Comments are adressed

* SharedOpOptimization: removes Base classes from the rules
2023-08-08 20:10:51 +04:00
Anton Voronov eacdc24d54 [CPU] Transpose constant folding on cpu plug-in side for MatMul op (#18877) 2023-08-07 22:17:08 +04:00
Ivan Tikhonov 5f6aba5ec5 Update ResolveNameCollisions to handle all friendly names, not only auto-generated (#18948)
* Update ResolveNameCollisions transformation to handle all friendly names, not only autogenerated

* codestyle
2023-08-04 13:38:59 +04:00
Pavel Esir aeffdec5b2 Fix Division with eps marking (#18932)
* improve Division with eps marking

* delete obsolete empty files
2023-08-04 13:23:15 +04:00
Pawel Raasz 1f08d3520c Review multiclass nms class for shape inference aspects (#18908)
* Review NMS shape inference

* Fix test issues

* Review MatrixNms shape inference

* Unregister NMS with dynamic output from CPU plugin

* Review MulticlassNms for shape inference
2023-08-02 08:01:06 +00:00
Wang, Yang 5572fad712 [CPU] Support precision conversion for opset10::IsFinite and opset10::IsNaN (#18149) 2023-07-31 13:35:07 +04:00
Vladislav Golubev 2b5ca40eb6 [CPU] MatMul: move i8 compressed weights constant folding to the plugin (#18718)
- Reused LPT pass for ConstantFold pass disabling for decompression subgraph
- GraphOptimizer: added FuseFCAndWeightsDecompression transformation
- Transformation pipeline adapted to the MatMuls with compressed weights
- Added MoveFCReshapeToWeights CPU transformation
2023-07-31 12:44:09 +04:00
Ivan Tikhonov 5fadde62ba Enable ResolveNamesCollisions transformation in MOC #2 (#18772)
* ResolveNamesCollisions transformation refactoring; enable it in MOC

* fix the description

* call ResolveNamesCollisions transformation in the frontends; resolve review comments

* Resolve review comments

* fix EliminateUnsqueezeGather and AlignMixedTypes transformations
2023-07-29 09:29:31 +04:00
Oleg Pipikin ff0b51f3ca Rename CommonTestUtils namespace (#18590)
* Rename CommonTestUtils namespace 1

* Rename CommonTestUtils namespace 2

* Rename CommonTestUtils namespace 3

* Rename CommonTestUtils namespace 4

* Fix1

* Fix2

* Fix3

* Apply comments

* Fix4

* Fix5
2023-07-26 21:06:50 +02:00
1ee5b6dd3f [Tests] Add subgraph body functions comparison (#18254)
* Add subgraph body comparison

* Avoid confusing function name

* Skip failing snippet test

* Skip some ov_snippets_func_tests

* Derive comparison flags

* Skip snippet test

* Drop on bodies mismatch

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-26 15:59:28 +02:00
Evgeny Kotov 4d3601ac11 fix (#18762) 2023-07-26 08:36:30 +04:00
Katarzyna Mitrus 26d53eb1da [GroupNormalization-12] Reference implementation update to minimize fp16 error (#18760)
* Update mean calculation in group_normalization ref

* Update tests

* Update using namespaces
2023-07-25 13:07:15 +02:00
Evgenya Stepyreva 6be083d37e SharedOpOptimization (#18622)
* SharedOpOptimization

* PR Comments adressed

* Misprint

* Removed unnecessary mode_ref

* Fixed memcmp and modified tests accordingly

* Style

* Comment from Sergey resolved

* Optimize operations in groups

* Removed Transpose fusion per agreement with Dmitry

* Style

* Resolved unnecessary looping of the graph
2023-07-25 15:00:44 +04:00
Evgeny KotovandIvan Tikhonov 6ecbdaea08 fix TSGatherForward transformation (#18537)
* add comment

* rewrite new_order generation code

* add unit tests

* code review fix

* fix windows build

* code review fixes

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-24 14:18:22 +00:00
Pawel Raasz 5eab1be682 Migrate shape infers to new IStaticShapeInfer API (#18579)
* Add static shape adapter
- Adapters holds CPU dimension which can be reference to it or vector
- Add ov::optional for holding optional result from shape inference
- Add new `infer` function in `IStaticShapeInfer`

* Temporary support of StaticShape

* Minor corrections in ShapeInferenceTA

* Migrate shape_infer to new interface version

* Replace StaticShape by adapter implementation

* Replace IShapeInferCommon by IStaticShapeInfer

* Correct code formatting

* Fix build issues

* NodeValidationFailure::create for StaticShapeRef
2023-07-24 15:59:18 +02:00
Mateusz TabakaandIvan Tikhonov fe8b8a96ff Handle sequence ops with non constant W, R, B inputs (#18138)
* Handle sequence ops with non constant W, R, B inputs

Ticket: CVS-49207

* fix tests

* tests

* fix gna tests

* add include

* change type for seqLenIdx

* rename is_constfoldable to is_on_constant_path

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-20 14:48:41 +04:00
Anton Voronov 60e40843c0 [CPU] f16 constant folding on cpu plug-in side for MatMul only (#18079) 2023-07-20 08:58:46 +04:00
Evgenya Stepyreva b51069dd79 Eliminates Nop Broadcast/Tile and Slice Before GatherElements (#18614) 2023-07-19 14:12:13 +04:00
Ilya Lavrenov 700677c5c6 Less argressive chages (#18591) 2023-07-18 19:54:00 +04:00
Oleg Pipikin cdef86c366 Move unit and func test utils (#18423)
* Move unit and func test utils. Rename targets

* Fix1
2023-07-18 16:23:58 +02:00
Evgenya Stepyreva 4f415ba211 Partial Values and Labels visualization and update in label equality checks (#18527)
* Provided visualization of partial values and labels. Adopted DimensionTracker for better equivalence tracking

* Addressed comments and fixed one test
2023-07-17 11:59:24 +00:00
Oleg Pipikin b211767280 Consolidate common test utils targets (#18385)
* Consolidate test util targets

* Fix code style

* Fix 1

* Fix code style
2023-07-17 11:59:13 +00:00
Evgeny Kotov 31f86c83d3 remove debug (#18514) 2023-07-14 11:06:09 +04:00
Ivan Tikhonov 97fb4ed18c Update the transformations to use the concrete op versions instead of opsets (#18503)
* codestyle

* update the transformations to use the concrete op versions instead of opsets

* resolve review comments

* codestyle
2023-07-13 16:46:05 +04:00
Katarzyna Mitrus 4c948ab6f8 [Transformations][ONNX FE][GroupNormalization-12] Decomposition transformation and ONNX FE update (#18416)
* Use GroupNormalization in ONNX FE

* Add and enable decomposition transformation

* Add NodeRegistry

* Adjust eps type

* Use Unsqueeze for bias and scale adjustment

* Add transformation tests

* Add Squeeze for bias and scale to ONNX FE

* Simplify get_range helper

* Add cast double to float eps helper

* Adjust reduction axes

* Style alignment

* Add float eps values in tests

* Enable accuracy comparator in transformation tests

* Skip F16 ref test

* Namespace adjustment

* Const ref for shape vec

* Remove nested scopes from transform tests

* Rename function to model in tests

* Add more const to variables

* Use common input shapes and elem type in transform tests

* Add ticket number to the test

* Update tests headers and names

* Use compatible ror rank check

* Use move to insert splits in new shape

* Add docs to cast_eps helper

* Additional test for eps

* Use versions instead of opset

* Include each op separately
2023-07-12 14:37:03 +02:00
Mateusz Tabaka 0296008c7e Add explicit converts for Parameter and Result in ConvertPrecision tr… (#18183)
* Add explicit converts for Parameter and Result in ConvertPrecision transformation

* set friendly name for convert on output

* tests
2023-07-11 13:02:28 +04:00
Katarzyna MitrusandPawel Raasz 827fb0234b [Shape Infer] RNN/GRU/LSTM Cell & Sequence - common shape infer and review (#18009)
* rrn seq base common shape infer init

* Update and add shape infer to all seq rnn based ops

* Use shape_infer in lstm seq core op

* Use shape_infer in rnn seq core op

* Unified shape infer for rnn cell base

* Update and add missing cells shape_infer functions

* Use shpe_infer in rnn_cell

* Update shape_infer map

* shape_infer tests

* Move new shape_infer to TA map

* More tests and shape improvements

* Introduce common base tests

* Fix merge conflict

* Missing setters and default ctor tests

* Use RNNCellBase class instead of template type op

* Update v0 LSTMSequence to use RNNCellBase as parent class

* Style

* V0::LSTMSequence update

* Specify opset in shape infer registry

* Move rank check

* Output vec generation refactor

* Update num_dir_validation

* Tests warining fix

* Test types adjustment

* Commented code cleanup

* Move test helpers to test fixture

* Common default ctor tests for Cell

* Update GRU shape infer tests

* Update LSTM shape infer tests

* Update RNN shape infer tests

* File names update

* Functions renaming

* Cast hidden size in test

* Move v0::LSTMSequence conformance test

---------

Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
2023-07-11 12:38:31 +04:00
Evgeny KotovandIvan Tikhonov 2663b002e8 fix transformation; add unit test (#18346)
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-11 10:27:33 +02:00
Evgeny KotovandIvan Tikhonov ad7caf5d76 Pruning add Pad12 support (#18363)
* fix transformation

* add unit test

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-10 23:18:46 +04:00
Evgeny KotovandIvan Tikhonov 0cd4ea29ce fix ReverseShapeAndTypeInfer; add unit test (#18319)
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-07 17:49:47 +02:00
Evgeny Kotov fb676a9e76 fix ov_transformation_tests duplicates (#18383) 2023-07-05 16:16:00 +02:00
Evgeny KotovandIvan Tikhonov 6a0c6a1a60 fix transformation; add unit test (#18314)
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-05 14:36:46 +02:00
Evgeny KotovandIvan Tikhonov f313dde66b EliminatePad and PadFusion support Pad12 positive indexes (#18278)
* update opset5::Pad -> PadBase

* rewrite unit tests

* refactor unit tests

* add unit test NegativePadElimination

* fix add destructor

* clang fixes

* fix unit tests

* add unit tests

* bug fix

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-05 10:34:01 +00:00
Evgeny Kotov 0ab948a1d4 PropagateDownDisableSensitivityForQuantized Pad12 support (#18367)
* fix transformation

* fix clang
2023-07-05 11:29:58 +04:00
Evgeny KotovandIvan Tikhonov 18caac366d ConvertPadToGroupConvolution support Pad12 with positive indexes (#18301)
* fix transformations

* clang fix

* fix unit tests - check the both Pad versions

* add unit tests checking negative padding

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-07-05 09:25:32 +02:00
Ilya Churaev 7fc16c3295 Move OpenVINO core developers API to OpenVINO folder (#18360)
* Move openvino core developers API to OpenVINO folder

* Fixed GPU plugin

* Fixed code style
2023-07-04 22:14:53 +04:00
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