Commit Graph
402 Commits
Author SHA1 Message Date
Ivan Tikhonov cd4623d2f6 Transformations: API 2.0 transition part 4 (#20445)
* Transformations: API 2.0 transition part 4

* fix code style
2023-10-14 00:27:43 +02:00
Ilya Lavrenov 56d74a82cb Relocatable developer package (#20327)
* Merge Linux CC + static build + clang compiler

* Improvements

* Removed ie prefixes from cmake scripts

* Fixes for NPU

* Initial relocatable OpenVINO Developer package

* Improvements

* Try to fix

* improvements

* Export a lot of headers

* Removed NVIDIA pipeline; make it to be a job

* Fixes

* Fixes 2

* Try ilya-lavrenov repo

* Clean-up

* More imrpovements

* Even more improvements

* Override export, install

* Override export, install

* Disable pythonwheel generation for relocatable OV dev package

* Fixed issues with versions

* Fixed android build

* Fixed android build

* Fixed NPU build

* Update src/bindings/python/CMakeLists.txt
2023-10-12 22:59:04 +00:00
Nadezhda Ageeva 4426486e6f [nGraph Transformations] Add missing rtinfo copy in ConvertPrecision transformation (#20347) 2023-10-10 13:47:52 +00:00
Evgeny Kotov 4d9f2f3cd7 Support new operations in TS: Selu, Swish, HSwish, Tile, CumSum, HardSigmoid (#19990)
* add new operations as unary

* get unary as input(0) instead of iterating pattern map

* add CumSum + unit tests

* add Tile + unit tests

* add tile

* fix ts_tile

* code review fix: use ADD_MATCHER

* fix bug CI tests
2023-10-10 15:06:10 +04:00
Mateusz Tabaka 4a3ce48f7a CompressQuantizeWeights optimizations (#20025)
* Optimize CompressQuantizeWeights transformation

- remove CoordinateTransform usage from FakeQuantize reference implementation
- move ZeroPointOptimizer functionality inside CompressQuantizeWeights
- compute scale and zero point in the same loop

Ticket: CVS-119273

* review comments

* clang format

* fix comments
2023-10-10 13:10:05 +04:00
Anton Voronov aa6adcd261 Gather: removed indices normalization pass and added some checks for Gather-8 -> Gather-7 conversion (#19666)
* Do not normalize negative indices for Gather v8

* code style fix

* added transformation test with accuracy check for Gather-v8

* removed GatherNegativeConstIndicesNormalize transformation at all

* ConvertGather8ToGather7 conversion: added more checks

* Introduced shared Gather8withIndicesDataLayerTest: added CPU, GPU instances

* code style fix

* small fix

* review fixes

* do negative indices normalization if possible

* code style fix

* refactor cpu test instances

* code style fix
2023-10-10 11:17:33 +04:00
Ilya Lavrenov d6c2a10b38 Merge Linux CC + static build + clang compiler (#20243)
* Merge Linux CC + static build + clang compiler

* Improvements

* Fixes
2023-10-06 00:30:11 +04:00
Ivan Tikhonov 3d6fb85a99 Model builders refactoring: rename dirs, targets, file names (#19885)
* Model builders refactoring

* Apply review comments

* resolve review commets: update cmake target names

* fix build: use correct headers

* fix headers

* fix build

* fix docs
2023-10-04 18:08:24 +02:00
Ilya Churaev 23e5964c5d Remove HostTensor from ov namespace (#20168)
* Remove HostTensor from ov namespace

* Fixed build
2023-10-03 09:13:18 +04:00
Andrei Beleiu b5f4087f66 [transformations][WeightsDequantizeToFakeQuantize] Extend pattern matching (#19772)
* [transformations] WeightsDequantizeToFakeQuantize: Extend pattern matching with the case when both Subtract inputs are Convert

* [transformations] WeightsDequantizeToFakeQuantize: Added new tests to cover the extention added to pattern match

* Fix review comments
2023-09-27 10:06:06 +01:00
Roman Lyamin 1ba8005688 [GPU] Disabling redundant copying of constant weights (#18949) 2023-09-26 18:43:57 +04:00
Mateusz Tabaka 5384fe43df Add EnableShapeOfConstantFolding transformation (#19880)
* Add EnableShapeOfConstantFolding transformation

Transpose sinking (that is used in TF frontend) disables ShapeOf constant folding
which prevents some optimizations further in the pipeline.
This patch introduces EnableShapeOfConstantFolding that removes DisableConstantFolding
from ShapeOf nodes.

Ticket: CVS-118890

* add description

* review comments

* headers
2023-09-26 15:53:23 +02:00
Nadezhda Ageeva 9e7938106b [Transformations] Fix unroll if transformation rt info (#20047)
* [Transformations] Fix unroll if transformation rt info

* Update test to check body names
2023-09-26 13:13:52 +00:00
Anton Voronov 3ce48fc3d6 Fixed OV static build issues (#19976) 2023-09-26 10:23:00 +04:00
Pavel EsirandRoman Kazantsev efe54362fd fix f16/f32 el type mismatch for shape subgraphs: Parameter type should not be fused for precision sensitive nodes (#19959)
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-09-22 02:06:39 +04:00
Vladislav Golubev 0e0e1b0ee6 SmartReshape: ReshapeMatMul transformations are fixed (#19987)
* SmartReshape: ReshapeMatMul transformations are fixed

* clang-format fixes
2023-09-21 19:49:07 +02:00
Maxim Vafin d0ef28e541 Reverse infer deduce second Squeeze input (#19923)
* Reverse infer deduce second Squeeze input

* Fix build

* Fix tf tests

* Small optimization

* Fix type

* Fix tests
2023-09-21 17:37:33 +02:00
Tomasz JankowskiandEvgenya Nugmanova c4adf80ec6 [Core] Move SlicePlan to Dev API (#19971)
* Move SlicePlan to Dev API

* Recover legacy API

---------

Co-authored-by: Evgenya Nugmanova <evgeniia.nugmanova@intel.com>
2023-09-21 14:41:01 +02:00
Evgenya Nugmanova c1a8380052 Symbolic shape inference and graph optimizations (#19392)
* Symbolic shape inference and graph optimizations
- Prepares a place in CommonOptimizations pipeline for symbolic optimizations
- Introduces symbolic propagation and symbolic optimizations for ChainedMaximum, NopBroadcast and shape sub-graph optimization
- Introduces utility runtime info for TableOfEquivalence passing and disabling of value invalidation during shape inference

* Executes NgramFusion in a symbolic environment. Relaxes Ngram fusion pattern utilizing symbolic knowledge

* Remove debug model visualization

* rt_info copying to new Add operation

* Fix visualization and place validation in nicer place in symbolic transformation

* Fix Slice operation not to propagate labels if input and output dimension is fully dynamic

* Covering Vladislav comments

* Replace value invalidation followed by validation to revalidation since it does the same thing

* Adding back invalidation of cached values to Symbolic Propagation pass

* Fix StridedSlice label propagation. Code style

* Update src/common/transformations/tests/symbolic_transformations/nop_broadcast.cpp
2023-09-20 18:00:07 +04:00
Evgeny Kotov 35d0d92ef7 fix TSGatherForward transformation (#19821)
* fix ts_gather_forward

* remove unneeded header
2023-09-19 13:55:43 +04:00
Ilya Lavrenov 54609e7b72 Removed FixRtInfo pass (#16870)
* Removed FixRtInfo pass

* Removed FixRtInfo pass

* Fixed macOS compilation
2023-09-19 00:07:59 +04:00
Ilya Lavrenov 35a0706dff Replaced several cmake utilities with new ov_ prefix (#19819)
* Replaced several cmake utilities with new ov_ prefix

* Replaced several cmake utilities with new ov_ prefix
2023-09-14 16:22:50 +04:00
Mateusz TabakaandIvan Tikhonov d0dda74fc2 Handle negative values in GroupedSliceToVSplitOptimization (#19495)
* Handle negative values in GroupedSliceToVSplitOptimization

CVS-118897

* change the way of getting slice inputs

* clamp value

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-09-11 18:31:39 +04:00
Mateusz Tabaka a55b5381d3 Move BroadcastTransition to MOC (#19543)
* Move BroadcastTransition to MOC

Broadcast that could be eliminated by BroadcastElementwiseFusion are moved down the graph
(by BroadcastTransition registered in the plugins). That prevents BroadcastElementwiseFusion
to eliminate them.

Ticket: CVS-118899

* dont count const layers

* remove virtual inheritance
2023-09-08 11:05:54 +04:00
Ilya Churaev 1d62f0141d Rename cmake ie_ macros and ie_parallel script (#19606)
* Rename cmake ie_ macros and ie_parallel script

* Add warning messages
2023-09-05 19:31:52 +02:00
Evgenya Stepyreva fef4d4d641 Auto batch lost label fix (#19535)
* Restored opset1::Reshape label peropagation for -1 special value

* Lets opset1::Reshape keep same shape infer. Makes FindBatch transformation keep labels in output shapes of Result node

* uses Parameter from correct namespace
2023-09-04 17:11:09 +02:00
Mateusz Tabaka bd0c156a70 PullReshapeThroughReduce - skip transformation if Reshape doesn't unsqueeze input (#19477)
Ticket: CVS-118905
2023-09-04 13:58:53 +02:00
Tomasz JankowskiandRaasz, Pawel 51df17912b [Ref_Impl] Change namespace from nG to OV (#19363)
* Use quotes for openvino includes

* Drop runtime from openvino::reference

* Drop runtime::reference

* Replace ngraph::reference with ov::reference - defs

* Replace ngraph::reference with ov::reference - uses

* Drop redundant nesting

* Fix non arch64 builds

* Move coordinate*pp files under openvino

* Move Coordinate... helpers under ov:: namespace

* Revert not needed changes

* Fix missing namespace scope

* Fix compilation

* Fix code style

* Use ov suppress deprecated macro instead of ngraph

---------

Co-authored-by: Raasz, Pawel <pawel.raasz@intel.com>
2023-09-04 08:07:06 +04:00
Mateusz Tabaka 441adcc122 SplitSqueezeConcatFusion - handle Squeeze nodes without second input (#19512)
Ticket: CVS-119330
2023-09-01 23:35:17 +04:00
Nadezhda Ageeva b81cad6ae5 Update ConvertReduceToReshape transformation to support ReduceProd (#19532) 2023-09-01 10:52:05 +00:00
Mateusz Tabaka 120a81ff5e Disallow LeakyReluFusion when alpha is greater than one (#19446)
Tickets: CVS-118898, CVS-82454
2023-08-31 14:41:46 +04:00
Mateusz Tabaka 6ad11108b5 Fix include path in TS ShapeOf tests (#19507) 2023-08-30 17:00:03 +02:00
Mateusz Tabaka 02d6c1cb5d TransposeSinking - add support for ShapeOf (#19471)
* TransposeSinking - add support for ShapeOf

It's often in the model that transposes have two consumers: ShapeOf and
another transpose and with ShapeOf absent - the transpose pair could be eliminated.
This patch's approach is to propagate a transpose through ShapeOf by creating
"ShapeOf->Gather" subgraph and replacing ShapeOf's input with transpose input.

Ticket: CVS-118896

* enhance docs
2023-08-30 12:45:48 +00:00
Ivan Tikhonov 38cf4764cb Transformations: API 2.0 transition part 2 (#19475)
* Transformation component API 2.0:part 2

* Refactoring

* fix build
2023-08-30 14:28:20 +02:00
Mateusz Tabaka 3e8c0fac1b Remove useless Slices (#19451)
Adjust UselessStridedSliceEraser to work with Slice nodes.

Ticket: CVS-118895
2023-08-30 11:28:33 +02:00
Ivan Tikhonov 0f9734aaa7 Transformation tests API 2.0: part 1 (#19366)
* API 2.0 replace ngraph headers and namespaces in CPU, LPT etc transformations tests

* revert the incorrect renaming

* function -> model in arm transformation tests
2023-08-27 18:52:03 +02:00
Tomasz Jankowski bcad953f5f [Ref_Impl] Rename file paths to openvino relative (#19284)
* Move files to new directories

* Use quotes for openvino includes

* Provide proxy calls for transition

of dependant components.

* Correct includes style

* Redo proxies

* Fix deprecated

* Move aliases to proxy files

* Apply code style
2023-08-25 06:43:06 +04:00
Ivan Tikhonov 128ec5452e Transformations API 2.0: replace ngraph headers and namespaces with openvino (#19304)
* switch to OV headers and namespaces

* resolve review comments

* fix precomp header

* refactoring, add missing include
2023-08-23 11:45:34 +04:00
Evgeny KotovandIvan Tikhonov f4cc3bf7d3 add callback check (#18397)
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-08-23 11:01:11 +04:00
Anton Voronov 4f29e60742 FIxed is_on_constant_path() using in all places (#19239)
* Fixed matmul weights check in snippets_mark_skipped

* fix

* ConvertMatMulToFC: is_on_constant_path fix

* [TESTS] added SplitMatMulConcat subgraph test

* MarkDequantizationSubgraph: is_on_constant_path fix
2023-08-18 14:01:07 +04:00
Ivan Tikhonov 20bb450af2 Fix TransposeSinking when the data input is broadcasted (#19233) 2023-08-18 10:23:59 +04:00
Mateusz Tabaka 5d8abfe41f ConvertSequenceToTensorIterator - push on-constant-path W, R, B inputs to TI's body (#19237)
For some (e.g. quantized) models, W, R, B inputs to sequence operations
are not direct constants, but a subgraph that can be constfolded later.
In that case, we don't need to have them as inputs to TensorIterator,
they can be pulled into its body instead.

Ticket: CVS-117544
2023-08-17 15:17:14 +04:00
f0300a36eb Efficient FP32 -> FP16 conversion for convert_precision, save_model, ovc and mo (#18988)
* WIP Postpone fp16 in CompressFloatConstantsImpl

* Apply suggestions from code review

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* WIP: Compression to FP16 in Serialize

* Prepared for efficient fp32 to fp16 conversion

* Update src/core/reference/src/runtime/reference/convert.cpp

* Called real slow reference implementations in the place where the optimized versions are supposed to be implemented

* Code style

* Fixed 0 values in the fast f64 to f16 compression

* Optimized convert_from_f32_to_f16_with_clamp

* Added optimized f32->f16 instance of change_constant_precision

* compression transformation Python test

* use tmp dir, minor corrections

* Update src/bindings/python/tests/test_transformations/test_compression.py

* Update src/bindings/python/tests/test_transformations/test_compression.py

* style fix

* define rt_info for postponed_fp16_compression

* remove redundant class

* fix temp dir for Win in test_compression.py

* update definitions in convert.hpp

* Update implementation in convert.cpp

* Update serialize.cpp

* Update compress_float_constants.cpp

* added macros for ARM/non_x86 in convert.cpp

* fix macros in convert.cpp

* change fixme placement in serialize.cpp

* style_fix

* Update src/core/reference/src/runtime/reference/convert.cpp

* style_fix

* Optimized count_out_of_f16_range

* Code style

* Revert unused

* Update src/core/src/pass/serialize.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* Update src/core/reference/src/runtime/reference/convert.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* use optimized convert_from_f32_to_f16_with_clamp for non postponed

* minor corrections

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

* Update compress_float_constants.cpp

* Switched mo and ovc to save_model instead of serialize to leverage performance improvements in fp32->fp16

* Applied minor code imporvements to address review feedback

* Minor changes in code

* Update tools/ovc/openvino/tools/ovc/main.py

* Apply suggestions from code review

* Fixed failed test in case when both usual xml compression and fp16 compression are applied simultaneously (disabled for now)

* Added description for CompressFloatConstantImpl postponed parameter

* Description of postponed parameter for CompressFloatConstants

* Reverted switching to save_model in mo as the compression can be applied not only via CLI and old code should be kept for Python path (not applicable for ovc)

* Removed remining committed test artefacts and reverted remaining changes in mo

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: dmitrygo <dmitry.gorokhov@intel.com>
Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com>
Co-authored-by: Pavel Esir <pavel.esir@intel.com>
Co-authored-by: Pavel Esir <pavel.esir@gmail.com>
2023-08-17 11:08:33 +00:00
Ivan Tikhonov 8509737d0a Fix TransposeSinking for Gather (#19202)
* Fix TS gather

* enable pytest

* revert auto replaced comment
2023-08-15 16:23:01 +00:00
Sergey Shlyapnikov d13ae31a61 [GPU] Allow to use infinity value as a Pad's fill value (#19201) 2023-08-15 14:31:49 +00:00
Nadezhda Ageeva 45a534d209 Adds constant folding in ConvertInterpolate11ToInterpolate4 transformation (#19195) 2023-08-15 11:39:22 +00:00
Evgeny Kotov 44a90dc874 TransposeSinking PRelu special slope fix input(1) (#19066)
* fix + unit tests

* code review fixes

* code review fix: IsSpecialPRelu use only partial shape
2023-08-14 12:45:54 +04:00
Ilya Lavrenov 6067ab17ba Aligned target and files (libraries) names (#19161) 2023-08-13 11:31:44 +04:00
Anastasiia Pnevskaia 6bf75f569c Fix of tensor names loosing for cf=True flag in MOC transformations. (#19014)
* Added shape and type infer for result nodes in MOC transformations.

* Clang format.

* Added validate_nodes_and_infer_types() pass at the end of MOC pipeline.

* Clang format.

* Added test.

* Clang format.
2023-08-11 15:19:07 +04:00
Anton Voronov 2a3132941c [FIX][CPU] Convert CF: added convert childs number check (#19022)
* [FIX][CPU] Convert CF: added convert childs number check

* code style fix

* WIP: [CPU][TESTS] Convert CF: Added subgraph test with two outputs for Convert node

* MatMulDecompressConvertTest refactoring + instances fixes

* removed KeepConstAndDecompressionForMatMul pass and added cpu callback for KeepConstAndDecompression

* MatMulDecompressConvertTest2: added graphs and small problem description

* small review fix
2023-08-11 12:10:00 +04:00