Commit Graph

213 Commits

Author SHA1 Message Date
Mateusz Tabaka
8512fc1655 Add PushConstantToSubgraph transformation (#15250)
* Add PushConstantToSubgraph transformation

Transformation detects constfoldable inputs to MultiSubGraphOp,
constantfold them and then pushes them to inner subgraphs.

Ticket: 98155

* cast to int

* comments, split to functions

* remove op::util
2023-01-25 18:46:09 +04:00
Ilya Lavrenov
0970bc8fcf Moved legacy library and deprecated tests to GNA (#15244) 2023-01-25 11:36:22 +04:00
Tomasz Jankowski
988847f559 Transformation component transition to OV namespace (phase 4) (#13558)
* Use openvino pass graph_rewrite

* Replace use of ngraph::pass to ov::pass

* Remove ngraph::pass aliases

* Update after rebase

* Fix post merge conflicts

* Apply code style

* Apply code style

* Remove bypassing inclusion

* Apply code style
2023-01-25 01:02:35 +03:00
Pawel Raasz
9ee80d67b7 Review topk for shape inference aspects (#14890)
* Review TopK for:
- label and dimension propagation
- partial value and label propagation
- preserve partial value and labels
- add evaluate upper, lower and label

* TopK v1 use shape infer instead fallback
- update static shape inference tests

* TopK shape_infer return output shapes

* Add new way to get tensor data as shape
with custom data processing
- Update tail op to use new function
- Update topk op to use this function
- Add test for negative k

* Add missing include

* Fix compilation issues

* Add support for i4 and u4 element types in
get_raw_data_as

* Fix signed and unsigned and compile warnings

* Remove constexpr from InTypeRange::operator()

* Use forward reference for functor
- minor corrections in InTypeRange class

* Use shape)infer in evaluate
- fix TopK v3 ctor for input data validation

* Fix transformation tests to use correct type for k

* Fix f16 handling in get_raw_data_as

* Correct topk bounds evaluators

* Topk detect overlap for same size dimensions
As op specification not guarantee correct order of
several elements same value

* Remove evaluate bounds
required investigation if required then will be provided

* Remove bound evaluation leftovers

* Update get const data in slice ops
2023-01-24 12:38:08 +04:00
Ivan Tikhonov
0ade00488e TransposeSinking: support Pad operation (#15137)
* Add Transpose sinking for Pad op, tests, refactoring

* Update GeneralTransposeSinking transformation

* resolve review comments

* resolve review comment
2023-01-23 10:03:47 +03:00
Maxim Vafin
d4cb719213 Add support for GroupConvolution in DilatedConvolutionConverter (#15168)
* Add support for GroupConvolution in DilatedConvolutionConverter

* Fix codestyle

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

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

* Add tf frontend test

* Apply codestyle

* Update src/frontends/tensorflow/tests/convert_tricky_models.cpp
2023-01-22 14:01:16 +03:00
Pawel Raasz
59c868f5ae Add ov::label_t alias and set it to uint32_t (#15010)
* Add ov::label_t alias and set it to uint32_t
to simplify conversion to tensor element type

* Fix clang formatting

* Fix one hot test to use label_t

* Remove label types alias duplicates
propagate using alias for label types

* Correct label type in transpose tests

* Define label_t in dimension
remove size_t usage as label type.

* Correct label type usage in Einsum and LSTM op's

* Correct label type usage in tracker transformation
scatter update and split op tests

* Correct usage label type in type_porp tests
- squeeze
- tile
- transpose
- variadic split

* Correct usage label type in type_porp tests
- squeeze
- transpose
- unsqeeze
- variadic split
2023-01-16 12:14:10 +01:00
Ilya Churaev
0c9abf43a9 Updated copyright headers (#15124)
* Updated copyright headers

* Revert "Fixed linker warnings in docs snippets on Windows (#15119)"

This reverts commit 372699ec49.
2023-01-16 11:02:17 +04:00
Evgeny Kotov
78995e9ac2 Transpose sinking binary/split/concat mult consumers case + PRelu (#14670)
* binary: move test classes into namespaces

* add unsing namespacees ov and ov::opset9

* ov::Model -> Model

* use naming for unit tests

* fix unary -> binary

* fix identation

* add tests binary forward consumers > 1

* add binary output consumers > 1 unit tests

* add binary input consumers > 1 unit tests

* binary backward add unit test binary has multiple consumers + fix

* move code to common function CloneNodeWithoutConsumers

* add unit test on backward binary propagation multi consumers

* reorganize binary unit tests

* add backward_input_node_consumers test

* add test output transpose mult consumers

* cleanup

* cleanup unit tests for split

* add forward::mult_consumers::input_node_consumers tests

* add forward::mult_consumers::input_transpose_consumers tests

* add forward::mult_consumers::output_consumers tests

* code indentation fix

* fix unit test split backward input node consumers

* added mult_output_consumers split unit test

* add mult_split_consumers split unit test

* cancat tests using namespaces

* concat add unit tests

* move repeated code into functions

* clang format fixes

* rename TransposeSinkingBinaryElementwise -> TransposeSinkingBinary

* add PRelu

* clang cleanup

* fix prelu tests

* fix using

* clang fixes

* fix NodeVector argument

* fix function descriptions

* fix const ref arg functions

* clang fixes

* prevent backward sinking if not all output nodes are transposes

* fix RemoveSingleOutputConsumers checking output size

* cleanup

* clang cleanup

* disable unary backward with not same transposes

* clang fixes

* remove unneeded functions CloneNodeWithoutConsumers GetNodeIds

* remove unneeded GetTransposeConstant(Input<Node> input) as duplicate of GetTransposeConstant(Node* node)

* cleanup

* add output_transpose_mult_transposes test

* add backward::output_transpose_mult_transposes test

* add unit tests for unary backward multiple transposes; fix problems by adding new transformation

* fix bug TransposeSinkingUnaryBackwardMultiConsumers consumers_more_than
2023-01-12 17:42:46 +03:00
Tomasz Jankowski
fc8c1a1193 [Transformations] ConvertMVN1ToMVN6: Limit downgrading downcast (#14669)
* Add anti-downgrade downcast test

* Strengthen limits test

* Allow convert if normalization is off

* Suppress downgrading for F64 only

* Limit eps values to float

* Limit eps values to float

* Add test

* Consider actual double values
2023-01-04 06:58:13 +01:00
Pavel Esir
a856dc4776 [FP16] Keep ShapeOf and Sensitive Subgraphs in FP32 for GPU (#14822)
* keep Shape subgraph in FP32 for GPU

* replaced ngraph:: -> ov:: namespace

* renamed ConvertModelToFP16ElementType -> ConvertCompressedToMixedPrecision and other passes; removed unnecessary argument for the pass

Signed-off-by: Pavel Esir <pavel.esir@intel.com>

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

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

* rephrase calling of ConvertPrecision to avoid error of an unused variable

* Update convert_compressed_to_mixed_precision.cpp

* placed calling of ConvertCompressedToMixedPrecision into the beginning of CommonOptimizations

* Update transformations_pipeline.cpp

* refactored unit-tests

* cleared obsolete commented line

* code style fix

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

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

Signed-off-by: Pavel Esir <pavel.esir@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2022-12-31 16:25:13 +03:00
Nadezhda Ageeva
8c897e5473 Fix output precision of MatrixNmsIE (#14788) 2022-12-23 11:39:32 +04:00
Ilya Churaev
139a9de45b Revert zi fs flags (#14782)
* Revert "[VPUX] - add replacement /Z7 -> /Zi /FS (#14753)"

This reverts commit 4dc44a5a26.

* Revert "Use Zi FS instead of Z7 (#14741)"

This reverts commit 1147777808.

* Revert "[OV][VPUX] - Debug build flags (#14651)"

This reverts commit d300abf743.
2022-12-23 10:59:14 +04:00
Evgeny Kotov
8807c46056 Transpose sinking Unsqueeze different ranks (#14354)
* add unit test for incompat shapes case; fix existed unit tests using get_test_name

* cleanup

* fix unit tests; add unsqueeze insertion

* cleanup

* add test for concat

* fix unit test for concat

* reset concat test to master

* cleanup

* cleanup after rebase

* cleanup

* fix after rebase

* clang fixes

* remove unused headers

* input squeeze on forward sinking

* code review fixes

* add test for forward unsqueeze case

* cleanup

* fix windows build warning/error

* code review fixes
2022-12-23 06:52:55 +01:00
Ilya Churaev
1147777808 Use Zi FS instead of Z7 (#14741) 2022-12-21 12:15:34 +04:00
Oleg Pipikin
40e19dec00 Fix clang warnings for transformation tests (#14727) 2022-12-20 08:34:19 +04:00
Oleg Pipikin
b808fb7f4f Enable warnings for transformation tests (#14699)
* Remove warning suppression from tests

* Fix warnings MSVC ov_transformations_tests

* Fix warnings MSVC ov_lp_transformations_tests

* Fix code style
2022-12-17 01:54:24 +03:00
Oleg Pipikin
8e3c3f5c04 Enable clang-format for tests (#14667) 2022-12-17 01:54:07 +03:00
Oleg Pipikin
e9812caff5 Change compile options for transformation tests to fix CVS-97900 (#14608)
* Change compile options for transformation tests to fix CVS-97900

* Disable cpplint

* Remove changes for RelWithDebugInfo config
2022-12-16 17:09:46 +04:00
Nadezhda Ageeva
539f17df62 [HETERO][nGraph] Fix ConstantFolding fused_names handling (#13766)
* [HETERO][CPU][GPU][TEMPLATE][nGraph] Fix ConstantFolding fused_names propogation. Add tests for QN. Fix for unsupported comsumers in QN

Fix ConvolutionMultiplyFusion for CPU

Enable fused_names check for Constants

Fix memory formats rt info for CPU

* Update src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.hpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Update src/tests/unit/inference_engine/query_model_test.cpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Update src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.hpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Update src/plugins/intel_cpu/src/ngraph_transformations/convert_matmul_to_fc.cpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Update src/core/src/rt_info.cpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Update src/core/src/rt_info.cpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Fix review comments

* Fix test

* Code style

* Review comments

* Don't add Parameters/Inputs/Results to supported due to supported consumers/sours. Add tests for that.

* Fix rt_info propogation for ConstantFolding

* Fix test build

* Code stye

* Review comments. Adds ShapeOfBase.

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>
2022-12-16 10:16:50 +04:00
Maxim Vafin
9c0ec2c9b4 Add reverse infer (#14348)
* Add reverse infer

* Add more convolutions and include transformation in normalize of tf fe

* Fix code style

* Add activations and eltwise support

* Fix code style

* Add deprecation supression

* Fix pad type

* Remove eltwise

* Remove ngraph namespace usage

* Fix code style

* Apply review feedback

* Add tests for activations and eltwise

* Make transformation friend of tensor to avoid deprecated API

* clang fix all

* Update src/common/transformations/include/transformations/common_optimizations/reverse_shape_and_type_infer.hpp

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

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-12-15 19:26:58 +04:00
Oleg Pipikin
33b0ca885a Disable clang format for transformation test for fix CI (#14657) 2022-12-15 11:22:34 +01:00
Nadezhda Ageeva
6507c7e8bd Fix code style on master (#14620) 2022-12-15 00:26:02 -08:00
Evgeny Kotov
22d7bc70d9 Transpose sinking general (#13943)
* initial

* build fixes + couple of simple unit tests

* remove old transpose_sinking_binary berfore merge with PR branch

* initial

* clang cleanup fixes

* remove TrasposeAxis function; cleanup namespaces

* fix TransposeInputsInfo spell

* one_input_transpose spell

* cleanup speel

* spell

* decompose forward sinking

* decompose backward sink

* use NodeVector

* clang cleanup

* decomposite transformations into different files

* decompose unit tests

* clang cleanup

* fix transformation names in general transformation

* fix ngraph::pass::TransposeFuse use element type the same as in fusing nodes

* add checkout sinking ability function; check sinking ability for unary operations; add unit test on general transformation

* sinking check for binary; unit tests; fixes

* add check to concat transformation; unit test

* add check to split tranformation

* azure build fixes

* add general test

* cleanup tests using common class

* clang cleanup

* add transpose sinkig to moc

* remove comment

* fix after rebase

* clang fixes

* fix after rebase

* code review fixes

* fix after rebase

* add RUN_ON_FUNCTION_SCOPE to general transformation

* fixes after rebase

* move tests to new directory

* cleanup

* use ov::RuntimeAttribute

* move NoTransposeSinkingAttr to files

* fix namespace

* fix names
2022-12-13 17:08:06 +01:00
Oleg Pipikin
cc386d13ec Fix code style for transformation and lp transformations tests (#14073)
* Fix code style for transformation tests

* Fix code style for lp transformation tests
2022-12-13 15:19:09 +04:00
Ivan Tikhonov
54a774e332 Move transformation tests to the correct directory (#14491)
* Move transformation tests to the correct directory

* Revert "Move transformation tests to the correct directory"

This reverts commit 0c2a932505.

* Move the transformation tests to the correct dir
2022-12-08 11:47:25 +00:00
Ilya Churaev
ed36ddac55 Removed legacy get_name() from descriptor::Tensor (#13934)
* Removed legacy get_name() from descriptor::Tensor

* Fixed GPU plugin

* One more fix for GPU

* Fixed typo

* Revert constructor changes

* Revert get_name for internal plugins
2022-12-07 12:57:11 +04:00
Ilya Churaev
d5d67b2be8 Removed using of BWDCMP macro (#14292)
* Removed using of BWDCMP macro

* Fixed code style

* Removed type info

* Fixed ONNX tests

* Fixed CPU tests

* Fixed ExecutionNode
2022-12-07 12:47:16 +04:00
Tomasz Dołbniak
6da95784c7 Unique-10 tests and improvements (#14315) 2022-12-06 19:09:30 +03:00
Nadezhda Ageeva
23481a5403 Move ReshapePRelu to common transformation to reuse it in NV plugin (#14169) 2022-12-06 16:58:51 +04:00
Chen Xu
541045b0ba [CPU] Ensure mathematical correctness of Convert node (#14174) 2022-12-02 17:10:19 +04:00
Tomasz Jankowski
64391cdb3f Transformation component transition to OV namespace (phase 3) (#13653)
* Use openvino pass graph_rewrite

* Use openvino pass pattern matcher

* Remove ngraph opsets

* Remove ngraph.hpp

* Remove ngraph includes

* Remove ngraph includes

* Use transformations API

* Remove ngraph includes

* Remove ngraph rt_info

* Remove unused ngraph includes

* Replace ngraph:: scope with ov:: here and there

* Remove serialize proxy header

* Remove proxy include

* Bring back a file for vpu-plugin

* Fix after upstream merge

* Remove nested namespace conflict

Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
Co-authored-by: Mateusz Tabaka <mateusz.tabaka@intel.com>
2022-12-01 12:34:58 +01:00
Tomasz Jankowski
8ad74c17a4 Avoid Windows warnings in Transformantions (#14304)
* Avoid Windows warnings

* Don't change public API

* Enhance input shape control
2022-12-01 13:10:05 +03:00
Roman Baranchuk
3448681de9 [CPU] Xor: convert to LogicalXor (#14115) 2022-12-01 11:59:22 +04:00
Roman Kazantsev
a4c76d645d Return SelectWithOneValueCondition Transformation (#14336)
* [Common] Implement SelectWithOneValueCondition common transformation

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

* Add transformation tests for select_with_one_value_condition

* Move call of SelectWithOneValueCondition transformation to MOC

* Apply code-review feedback

* Remove corner case with dynamic output shape for Select

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2022-11-30 22:16:59 +03:00
Vladislav Golubev
ebf04b17d1 LLT2Sequence tests fix (#14319) 2022-11-30 18:57:10 +04:00
Evgenya Stepyreva
e41a0823db Relaxes restriction for constant weights in the pass::MarkDequantizationSubgraph (#14297) 2022-11-30 09:04:19 +00:00
Evgenya Stepyreva
9478062e79 Zero inputs Concat fix and Scatter Update ops fix (#14284) 2022-11-30 12:08:21 +04:00
Pavel Esir
2a1a2532b2 more safe get_output_types in callback in convert_compression_only_to_legacy.cpp;more readable unit-tests for out of bound Intervals (#14300) 2022-11-29 22:05:16 +00:00
Ilya Lavrenov
115a9071e4 Revert "[Common] Implement SelectWithOneValueCondition common transformation (#14242)" (#14317)
This reverts commit 5a59b2b8f2.
2022-11-29 21:08:48 +04:00
Roman Kazantsev
5a59b2b8f2 [Common] Implement SelectWithOneValueCondition common transformation (#14242)
* [Common] Implement SelectWithOneValueCondition common transformation

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

* Add transformation tests for select_with_one_value_condition

* Move call of SelectWithOneValueCondition transformation to MOC

* Apply code-review feedback

* Remove corner case with dynamic output shape for Select

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2022-11-29 15:40:04 +04:00
Pavel Esir
e648001b12 [IE] keep constants in shape subgraphs in f32 (#14204)
* keep constants in shape subgraphs in f32

* added unit-test without callback; added comment in convert_compression_only_to_legacy.cpp
2022-11-29 13:55:06 +04:00
Katarzyna Mitrus
13a76a8b72 [Unique-10] ConvertPrecision transformation and new attribute for output type (#14229)
* Add attribute for last output element type

* Add convert precision transformation and tests

* Update Unique python API with new attribute

* Update Unique-10 op specification

* Update docstrings

* Update visitor tests

* Add type prop tests for the new attribute

* Check axis constant before shape, compare with partial shape
2022-11-28 11:56:49 +01:00
Oleg Pipikin
f1795ad78a Move new transformation tests from ieFuncTests to ov_transformations_tests (#14241) 2022-11-28 08:23:17 +04:00
Ivan Tikhonov
4f0b846d1a Move GRUCellFusion and SequenceFusion transformations before NopElimination (#14213) 2022-11-25 10:57:45 +04:00
Mateusz Bencer
87715978dc PullThroughReduce and ReduceReshapeFusion transformations - handle more than one consumers (#14101) 2022-11-25 09:26:00 +03:00
Katarzyna Mitrus
87ad175b69 [Transformation] Fix ConvertBroadcast-3 transformation for boolean input (#14085)
* Tests with boolean type for ConvertBroadcast3 transformation

* Extend support of bool input in ConvertBroadcast3 transformation

* New tests redundant ngraph namespace cleanup
2022-11-24 12:57:58 +01:00
Ivan Tikhonov
81c579fd2a fix inference of some with TensorIterator (#14108) 2022-11-22 10:17:58 +04:00
Oleg Pipikin
6b4b01aecf Move transformation and lp transformations tests from IeFuncTests and IeUnitTests (#14096)
* Move transformation and lp transformations tests from IeFuncTests and IeUnitTests

* Enable tests in Azure CI

Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
2022-11-22 07:46:19 +04:00
Evgeny Kotov
0846bdb67e Transpose sinking on passes for Concat, Split and binary eltwise operations (#13718)
* initial

* clang cleanup fixes

* remove TrasposeAxis function; cleanup namespaces

* fix TransposeInputsInfo spell

* one_input_transpose spell

* cleanup speel

* spell

* decompose forward sinking

* decompose backward sink

* use NodeVector

* clang cleanup

* decomposite transformations into different files

* decompose unit tests

* clang cleanup

* azure build fixes

* code review fixes

* clang cleanup fixes
2022-11-21 16:24:26 +04:00