Commit Graph
265 Commits
Author SHA1 Message Date
Ivan Tikhonov 4812879318 Enable transformation callback for TS transformations (#16767) 2023-04-06 20:42:01 +04:00
Tomasz Jankowski cb436112b2 [Transformations] Assert valid output shape on ReduceReshape fusion (#16712)
* Assert valid output shape on ReduceReshape fusion

* Remove useless test step

* Reduce tests flow

* _dummy_

to retrigger failed nonrestartable check
2023-04-06 11:55:57 +00:00
Oleg Pipikin 1c564226f3 Deprecate util functions in public api (#16716)
* Deprecate util functions in public api

* Add deprecation suppression for usage inside openvino

* Fix clang-format

* Fix1
2023-04-06 06:32:04 +04:00
Pavel Esir f9bd2d2c1e [ie transformations] improve SoftMax fusion for better mixed precision inference (#16574)
* improve SoftMax fusion

* style and unit-test fix

* more precise SoftMax unit-tests

* rewritten SoftMaxFusion with single matcher

* fixes for align_mixed_fp32_fp16_types_test.cpp and mark_subgraph_to_keep_in_mixed_precision_test.cpp

* add include for pass/pattern/op/or.hpp

* get rank only when necessary

* style-fix

* add comment why SoftmaxFusion is called manually

* fix copy_runtime_info
2023-04-05 11:28:48 +04:00
Mateusz Tabaka 03ab0e4388 Add ConvolutionToGroupConvolutionFusion (#16688)
Fuses Split->series of Conv->Concat to GroupConvolution op.

Ticket: 105170
2023-04-03 14:38:44 +02:00
Oleg Pipikin e978db3132 Move new util functions from public api to dev api (#16683) 2023-04-01 11:46:20 +04:00
Roman Kazantsev 9a5a8f6abc [TF FE] Move to TopK-11 operation and update downgrading TopK transformation (#16590)
* [TF FE] Move to TopK-11 operation

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

* Update downgrading transformation

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-03-31 17:44:58 +02:00
Gorokhov Dmitriy 6e09e53f0d [CORE] Added optimized fp32->fp16 precision conversion implementation (#16672) 2023-03-31 11:02:39 +00:00
Zhang Yi fc88bed604 [CPU] Improvement for NoneZero and Gather (#16641) 2023-03-31 11:05:43 +02:00
Chen Xu 35398e339d [CPU] Implement TopK-11 to CPU plugin (#16522) 2023-03-31 10:28:20 +02:00
Vladislav Golubev 8d59252966 [Transforamtions] NonZero horizontal fusion (#16571)
* Added ValuePredicate 'consumers_more_than'

* NonZero fusion

* NonZero fusion tests
2023-03-29 17:23:37 +04:00
Tomasz Jankowski f7e898893d Add PRelu fusion (#16617) 2023-03-29 11:32:57 +00:00
Ivan Tikhonov 5a8a195dad TransposeSinking: add support for Slice and Reshape ops (#16208)
* 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

* codestyle

* fix unit tests, revert changes for TSSlice transformation

* fix TSSqueeze transformation

* resolve review comments

* codestyle
2023-03-24 17:01:15 +04:00
Kelvin Choi 8518a3a8e8 [GPU] Disable converting gather8 to 7 pass because GPU plugin supports gather8:nagative-index feature (#15868)
* Add GatherV7 and gatherV8 for convert_gather_0d pattern

* Add updating output_shape using reorder/reshape for scalar indice instead of using ConvertGather0D pass

* Add WA for NMS-gather8 pattern
2023-03-23 23:12:12 -07:00
Tomasz Dołbniak 8eb142ca6e Interpolate v11 -> v4 downgrade transformation (#16448) 2023-03-22 17:00:53 +01:00
Xuejun Zhai 8509d0dd82 [Deprecated API] remove version (#16426)
* [Remove version] Remove version from py openvino

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Modify caused by remove version

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix clang format issue

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Revert "Fix clang format issue"

This reverts commit 132787286f.

* Fix CI format issue

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix CI format issue

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix merge conflict error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-03-22 16:09:14 +01:00
Pavel Esir d8e7b39edb flush by recreating constant (#16430) 2023-03-21 18:05:11 +04:00
Tomasz Dołbniak a99a5057e2 TopK v11 -> v3 downgrade transformation (#16339) 2023-03-17 12:40:56 +00:00
Vladislav Golubev 249d57f37e [Transformations] CompressQuantizeWeights: fp16 weights support (#16323)
* [Transformations] CompressQuantizeWeights: fp16 weights support

* Code style fix

* Code style fix
2023-03-17 14:43:32 +04:00
Xuejun Zhai a9bd5f741d Xuejun/remove api model (#15924)
* [Remove APIs] remove api m_transformation_callback

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Remove APIs] remove api run_on_function(), replaced by run_on_model()

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Remove APIs] remove set_callback(), use get_pass_config() to configure transformation pipeline

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Remove APIs] remove api add_matcher()

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix format issue

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Remove APIs] Fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix formast issue

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix merge master error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix CI compiler error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Update ONNX Runtime from rel-1.8.1 to rel-1.14.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Revert "Update ONNX Runtime from rel-1.8.1 to rel-1.14.0"

This reverts commit e31a9e04b7.

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-03-17 10:44:28 +04:00
Ivan Tikhonov e1ee8f0ec8 TransposeSinking refactoring: part 2 (class names, folders, file names) (#16291)
* 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
2023-03-15 17:18:39 +04:00
Tomasz Jankowski 0f9583c3cf [Transformations] Nop-eliminate 1D Reshape node (#16083)
* Nop-eliminate 1D Reshape node

* Don't eliminate checking Reshape node
2023-03-15 14:43:46 +04:00
Mateusz TabakaandMichal Lukaszewski 8477bc8897 Reduce the number of validate and infer types in ConvertPrecision (#15277)
* Reduce the number of validate and infer types in ConvertPrecision

Currently, ConvertPrecision pass frequently runs validate and infer types.
This is due to the fact that it iterates over every precision pair, then over
the whole model followed by validate and infer types.
The proposed solution is to iterate over the model: for each node iterate
over precisions array, update the node if required followed by validate and
infer types.

Ticket: 81311

* use map

* clang format

* move enum hasher

* fix gpu

* revalidate

* reinvalidate if node has changed

* remove validate for input prec changes

* fix gpu

* review

* find

* fix pytorch case

* revalidate

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-03-14 21:45:24 +04:00
Ivan Tikhonov 596036a2db Transpose Sinking: refactoring (#16283)
* Add descriptions to the transformations, add additional checks

* fix a warning
2023-03-14 13:55:25 +00:00
Ivan Tikhonov 8da01d4c2d TransposeSinking transformation: support new ops and fix performance issues (#15660)
* 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

* codestyle
2023-03-13 14:18:02 +04:00
Ilya Churaev 75314c2c53 Rename OPENVINO_UNREACHABLE to OPENVINO_THROW (#16201)
* Changed some exceptions to OPENVINO_THROW

* Changed samples throw exception

* Fixed some comments

* Remove OPENVINO_UNREACHABLE
2023-03-10 20:23:13 +04:00
Ilya Churaev 45bdbf7486 Changed throw ov::Exception to macro (#16150)
* Changed throw ov::Exception to macro

* Fixed code style

* Revert myriad headers

* CPPlint fixes

* Fixed typo
2023-03-10 11:14:50 +04:00
Pavel EsirandRoman Kazantsev e43f606750 [LoadTime][MO] flush fp32 subnormals to zero at offline phase (#15929)
* flush fp32 subnormals to zero in IR

* style fix in test_offline_api.py

* simplified call of FlushFP32SubnormalsToZero: is called form offline_transformations.cpp

* reverted offline_transformations.py

* use fpclassify

* style-fix

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

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

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-03-09 16:21:28 +04:00
Nadezhda Ageeva 0dad7749b5 Fix RTInfo for ReduceL2Decomposition (#16107)
* Fix RTInfo for ReduceL2Decomposition

* Review comments
2023-03-07 10:24:55 +04:00
Tomasz Jankowski b8348cda2e Add AbsSubMul PReLu fusion (#16086) 2023-03-06 12:56:22 +00:00
Mateusz Tabaka 62ff31df8a ReverseInputChannelsFusion - no reverse input channels -> return (#15784)
* ReverseInputChannelsFusion - return early if there is no reverse input channels

Ticket: 98067

* run_passes

* fix unnecessary validate calls
2023-02-28 17:56:21 +00:00
Maxim Vafin 2ced2ad929 Add removing dangling results in MultiSubGraphOp transformation (#15862)
* Add removing dangling results in MultiSubGraphOp transformation

* Add recursive call for nested subgraphs

* Fix frontend build

* Add tests

* Add more tests and fix special port

* Add more tests, fix LSTM tests

* Preserve merged inputs

* Fix code style

* Fix paddle tests

* Fix special output
2023-02-27 14:31:53 +01:00
Mateusz Bencer 15935069ff Skip PullThroughReduce optimization for multi-output inputs (#15829)
* Skip PullThroughReduce optimization for multi-output inputs

* review remarks
2023-02-24 12:11:32 +01:00
Tomasz Jankowski e8d1be6e0f [Transformations] Enable missing runtime info check (#15796)
* Add rt info propagation to StridesOptimization

* Enable rt info check for pruning tests
2023-02-23 19:14:13 +04:00
Mateusz Tabaka eaf368a5f5 PushConstantToSubgraph - use vector<bool> for remove_inputs_mask (#15827)
When MultiSubGraphOp has more than 32 inputs, int is not enough
to track inputs to be removed.

Ticket: 103248
2023-02-22 15:31:34 +01:00
Roman KazantsevandMaxim Vafin 4746c04840 [Common][FE] Implement reverse infer for Transpose (#15824)
* [Common][FE] Implement reverse infer for Transpose

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

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

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

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

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

* Add one more tests with constant order and known output

* Fix reverse infer for a case of know order and output shape

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-02-21 13:42:39 +00:00
Maxim Vafin cbd56c3ed9 [PT FE] Enable reverse infer (#15802)
* Enable reverse infer in PT FE

* Inherit channes from weight of convolution

* Except 1

* Add tests

* Add shape propagation for concat
2023-02-20 16:07:28 +01:00
Tomasz Jankowski ed49d51ee1 [Transformations] Add Broadcast v3 nop-elimination (#15765)
* Nop-eliminate Broadcast v3

* Combine multi ops wrapper
2023-02-17 14:12:04 +01:00
Xuejun Zhai 91df0a8aa9 [API remove] remove variantImpl & variantwrapper related class/interfaces (#15580)
* [API remove] remove variantImpl & variantwrapper related class/interfaces

Signed-off-by: xuejun <xuejun.zhai@intel.com>

* [Remove APIs] fix code format issue

Signed-off-by: xuejun <Xuejun.Zhai@intel.com>

* [Remove api] fix python compiler issue caused by deprecated varient

Signed-off-by: xuejun <Xuejun.Zhai@intel.com>

* [Remove APIs] fix code format issue

Signed-off-by: xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: xuejun <xuejun.zhai@intel.com>
Signed-off-by: xuejun <Xuejun.Zhai@intel.com>
2023-02-17 16:31:26 +04:00
Pavel Esir 0f459c0455 [Core] fix compress_float_constants.cpp for denormal float16 (#15575)
* fix compress_float_constants.cpp for denormal float16

* keep denormals also in fp16; added unit-test

* fixed comment

* removed debug code; added some comments in unit-tests

* fix warning as error

* fix sign
2023-02-17 16:23:31 +04:00
Vladislav Golubev f03a3321fc GraphComparator: stricter requirements for sinks mapping (#15633) 2023-02-17 11:33:20 +04:00
Mateusz Tabaka 829257510a [Pruning] Handle Reshape with nonconstant second input with -1 or 0 dims (#15673)
Ticket: 100573
2023-02-16 23:48:15 +01:00
Tomasz Jankowski c62be51cc1 [Transformations] Enable dynamic decomposition BTS and STB ops (#15179)
* Add dynamism for BatchToSpace conversion

* Extend dynamism for BatchToSpace conversion

Only block input needs to be const 'cse axes_order_const is freaky

* Enhace dynamism for BatchToSpace conversion

Block input need not be const now.

* Add dynamism for STB by elements conversion

* Remove const need for crops for BTS by_elements

* temp for review

* Try to fix output tensor overwrite

* Make test to reproduce invalid shape inference

* Reproduce the error with template plugin

* Fix code style

* Fix 0D inputs issue

* Remove 0D shape parts before Concat

* Apply nested namespaces

* Enable non-constant STB Block input

* Fix BTS runtime info

* Fix STB by elems runtime info

* Add dynamism for STB conversion

* Add BTS dynamic data test

* Add STB dynamic data test

* Reduce STB concats

* Add tests naming

* Edit

* style

* Consider other block element types

* Enhance type test

* Use opset10 only

* Check block shape
2023-02-14 14:45:10 +04:00
Mateusz Tabaka 9a540e61dc Don't use could_propagate in MarkDequantizationSubgraph (#15325) 2023-02-13 11:28:38 +01:00
Ilya Lavrenov 1f3e469c5e Added -Wall for Clang and GCC (#15513)
* Added -Wall for Clang and GCC

* Fixes

* Don't use /J

* Fixed warnings

* Fixed warnings

* More fixes

* Fixed for MSVC

* Fixed more warnings on Windows

* Suppressed some warnings in template plugin

* Update src/tests/functional/plugin/shared/include/behavior/plugin/caching_tests.hpp

* Added suppression for PT FE

* Suppressed warnings in TF FE

* Suppressed warnings on Core unit tests

* Suppress warnings in python

* Suppressed Windows warning for 3rd party modules

* Suppresed one more warning
2023-02-08 15:01:00 +04:00
Ivan Tikhonov a0a73d443e Enable TransposeSinking transformation in Tensorflow FrontEnd (#15410)
* Enable TransposeSinking in MOC

* replace TransposeSinking in TF Frontend

* fix TS for concat op

* Fix TS for Binary/Concat ops: broadcast transposed input

* Fix transpose sinking for Pad op

* fix pad tests

* fix dynamic case for Concat/Binary ops

* codestyle

* fix TransposeSinking for Split/Concat ops

* fix split

* Resolve review comments
2023-02-07 19:21:34 +00:00
Nadezhda Ageeva 049cfcb72c [nGraph]: fix fused names for ShuffleChannelsFusion transformation (#15150)
* [nGraph]: fix fused names for ShuffleChannelsFusion transformation

* Review comments
2023-02-03 12:45:12 +00:00
Pavel Esir 4103a931c2 [FP16] call marking for mixed precision inside ConvertPrecision (#14965)
* call marking for mixed precision inside ConvertPrecision

* fix typo in precisions list; moved conversion from f64->f32 to the very beginning

* remove obsolete convert_compressed_to_mixed_precision_test.cpp

* typo fix after merge

* corrected namespace prefix

* fixed align_mixed_fp32_fp16_types_test.cpp by removing redundant ConvertPrecision

* updated ConvertPrecison tests for mixed precision

* style fix
2023-02-03 13:47:57 +04:00
Pawel Raasz 0da339a7f2 Use ov tensor in validation utils for bounds evaluation (#15252)
* Use ov::Tensor in are_equal

* Use ov::Tensor in bounds evaluation
- remove from node evaluates bounds for HostTensor
- update validation utils
- update operators

* Fix code style

* Fix windows compilation errors

* Fix windows compilation errors in scatter update

* Improve reshape output shape calculation
during shape infer

* Add common bound evaluator
- rename evaluate_bound_t -> evaluate_bound

* Fix code formatting

* Move bound evaluation util functions to dev API

* Fix compilation issues

* Remove from dev API not required bound eval
- extract bound eval functions to separate source

* Add missing doxygen comment

* Use ref evaluate in bounds calc for shape_of
because input data can have dynamic type and
create tensor is not possible and data type has
no meaning for shape calculation.
2023-01-31 19:18:28 +01:00
Pavel EsirandMaxim Vafin 7b6eefbbf8 [nG] [IE] add support of mixed FP16/FP32 precision ov::Model for mixed inference (#13249)
* add pattern mathing for MVN, Exp->ReduceSum, L2Normalize, Div with eps for mixed precision inference

* added necessary includes

* clang_format_fix_all

* fix warning_as_error for unused variable

* fix warning_as_error for specifying float literals

* enable marking for fp32 IRs as well

* cosmetic improvements in unit-tests

* fix warnings as error

* added unit-tests for compress_float_constants.cpp for out of range values

* Update align_mixed_fp32_fp16_types.cpp

* Apply suggestions from code review

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

* some grooming: mainly in imports

* build fix: replaced ngraph:: -> ov::

* collected all markings in a single file

* shortened pass names

* style fix

* made MarkNormalizationOps as a separate pass

* removed redundant comment, fixed description of MarkSugraphsToKeepInMixedPrecision pass

* comments on Up and Down marking in MarkSugraphsToKeepInMixedPrecision

* cleared info messages in compress_float_constants.cpp, removed threshold adjusting from ENV

* moved declarations of MarkNormalizationOps, MarkExpInReduceOpPath, MarkDivWithEps to hide them from outside users

* simplified pattern matching for max_or_add

* moved `reduceop_path` rt_info inside mark_subgraphs_to_keep_in_mixed_precision.cpp

* fix potential bug with Convert

* removed redundant check for Converts in `insert_converts_after_if_needed` as well

* set Convert types more safely

* corrections in opset10 namespaces; some minor corrections

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-01-30 10:04:12 +04:00