Commit Graph

119 Commits

Author SHA1 Message Date
Pavel Esir
cb63b39c72 do not change names while replacing FQ nodes (#17936)
* do not change names while replacing FQ nodes

* more solid fix

* even more solid fix

* fix UT failure
2023-06-16 15:51:50 +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
Edward Shogulin
43d67b0a32 [LPT] StridedSlice dequantization improvement (#17563)
* [LPT] StridedSlice dequantization improvement

* review comments: refactoring & simplification
2023-06-02 08:47:36 +01: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
Oleg Pipikin
ce82fc78df Revert code style formatting for lp transformation tests (#17437) 2023-05-10 14:44:16 +01:00
Edward Shogulin
000311d72e LPT cmake warning flag was removed (#17358) 2023-05-08 09:03:40 +04:00
Edward Shogulin
9c3186b243 [LPT] Concat: different branch precisions support (#17330)
* [LPT] Concat: different branch precisions support
2023-05-07 11:38:32 +01:00
Edward Shogulin
e593cf8545 [LPT] Precision restriction customization extending (#17147)
* [LPT] Precision restriction customization extending

* comments fix: refactoring
2023-04-26 13:29:09 +01:00
Vladislav Golubev
a8278ba4a6 [LPT] FQ reference implementation reused in foldFakeQuantize function (#17096)
* [LPT] reused reference FQ implementation in fold_fake_quantize

* [LPT] Removed legacy parameters

* Added plugin tests with per-channel FQ for GrConv wo reshape

* Apply folding only in the case when FQ data input is constant

* EliminateFQ fix
2023-04-25 14:08:01 +01:00
Vladislav Golubev
f410658d32 [LPT] AddTransformation fix (#17076)
* [LPT] AddTransformation: constants on 0's input support

* AddTransformation: new test instances

* codestyle
2023-04-24 12:15:01 +01:00
Edward Shogulin
a3f14366d9 [LPT] Extending EliminateFakeQuantize transformation (two interval boundaries) (#17140)
* [LPT] EliminateFakeQuantize extending

* tests

* folding quick fix
2023-04-24 11:58:00 +01:00
Vladislav Golubev
f100c36ac9 [LPT] Revert changes in fold_reshape (#17068) 2023-04-20 11:43:59 +01:00
Vladislav Golubev
00a4fc514c Review comments applied (#16856) 2023-04-19 10:11:47 +01:00
Vladislav Golubev
e6341917cd [LPT] PullReshapeThroughDequantization transformation fix (#16395)
* PullReshapeThroughDequantization fix

* Added a test-case
2023-04-18 15:22:31 +01:00
Edward Shogulin
8bdc5bc85f [LPT] Support ONNX quantized models coming from ORT PTQ (#14811)
* [LPT] FakeQuantize fuse

* GPU & CPU tests alignment

* refactoring & comments

* doc quick fix

* quick fix
2023-04-14 21:22:55 +00:00
Vladislav Golubev
98afdc848a [LPT] ConvolutionTransformation: support for a new per channel dequantization representation (#16687)
* [LPT][TESTS] GrConv: added test cases with per channel dq on weights and without reshape

* FoldFQ: don't transform FQ with quantization by several dimensions

* ConvolutionTransformation: supported GrConv with per channel dq on weights and without reshape

* fold_reshape: refactoring
2023-04-11 14:07:23 +02:00
Vladislav Golubev
5f416dc4d2 [LPT] Introduced BiasAttribute (#16781)
* Extended check on ConvSum fusing

* [LPT] Introduced 'bias' rt attribute

* [CPU][TESTS] Added FQLayerDQBias tests
2023-04-06 16:01:04 +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
Edward Shogulin
fb24e91416 [LPT] NNCF GroupConvolution 5D on weights support (#16336)
* [LPT] NNCF GroupConvolution 5D on weights support

* PullReshapeThroughDequantization rollback
2023-03-23 13:24:10 +00: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
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
Tingqian Li
fdc2664b24 fix special FQ node (#14594)
* fix special FQ with zero range in quantized models

* fix format & comments

* Add test case

* remove dot interval test case from smoke_LPT/FakeQuantizeTransformation.CompareFunctions

* Remove dot interval gpu test case because Pooling is also folded

* handle review comment

* fix code style

* update docs

* remove fold_zero_multiply
2023-03-15 10:13:29 +00: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
Pawel Raasz
d32da828b4 Review scatter nd update class for shape inference aspects (#15610)
* Review interval shape and labels propagation

* Review shape infer template implementation
- add test for default ctor

* Add evaluate upper, lower and label
- add new default label evaluator which propagates labels
from inputs list

* default_label_evaluator for 0 input only is wrapper for
generic evaluator implementation

* Use default_label_evaluator in ScatterUpdate

* Fix build issues
2023-02-16 13:49:19 +01:00
Mateusz Tabaka
9a540e61dc Don't use could_propagate in MarkDequantizationSubgraph (#15325) 2023-02-13 11:28:38 +01:00
Vladislav Golubev
b8a7b3bb43 Cleanup & refactoring (#15588) 2023-02-13 10:50:46 +01:00
Vladislav Golubev
6630ae82d2 [LPT] Avoid AddTransformation for the cases which introduce Infinite constants after math calculations (#15496) 2023-02-08 13:06:24 +00: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
Edward Shogulin
c1782d9e3d [LPT] clang merge warning fix (#15502) 2023-02-03 21:21:23 +00:00
Mang Guo
9e83b081f4 Add gather lpt transformation (#14597)
* Add gather lpt transformation

* Add per-channel gather lpt dequantization support

* Fix review comments

* Add GPU test case

* Fix clang-format error gpu case  build error

* Fix comments

* Fix clang-format check fail

* Update docs

* Fix comments

* Add Gather opset1 quantization support
2023-02-02 16:13:52 +01:00
Vladislav Golubev
d1397b7b48 [LPT] Rank limitations removed (#14785)
* [LPT] LayerTransformation: removed legacy rank checks

* [LPT] Added test cases with 1D and 6D ranks & existing tests corrected
2023-01-31 00:26:59 +00:00
Mateusz Tabaka
3ad92084d6 Fix MarkDequantizationSubgraph when Mul has Convert on both inputs (#14997)
Ticket: 100042
2023-01-26 08:55:23 +00: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
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
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
161a0a6319 Disable clang format for lp transformation test for fix CI (#14629) 2022-12-15 11:12:35 +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
Vladislav Golubev
b11adcdde4 [LPT] FQ Decomposition improvement (#14203)
* [LPT] FQ Decomposition modified to create FQ without constants with several consumers

* [LPT] Added subgraph test

* CPUTestsBase: Added the ability to check only fusing results

* [CPU] Added subgraph test

* LPT review comments applied

* CPUTestsUtils: added special string 'anytype' for selectedType check ignore
2022-11-30 01:04:10 +00:00
Vladislav Golubev
f06c44115f [LPT] Check on isQuantized fixed (#14151) 2022-11-28 13:58:42 +04:00
Edward Shogulin
cdb711a069 LPT: element-wise ops fuse extension to support updatePrecisions (#14141) 2022-11-25 13:49:03 +04:00
Mateusz Tabaka
e105b3ea37 [LPT] fix weights output channel index in ConvolutionBackpropDataTransformation (#14124)
ConvolutionBackpropData weights have following shape {input channels, output_channels, ...},
so unlike forward convolution, the output channels are on the second dimension.
2022-11-23 09:01:59 +01: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
Xiping Yan
2a7dc5404b [Core/CC]Verify add_matcher scope for Conditinal Compilation. (#13148)
* My verification:
libopenvino.so original size: 10799560
After adding this patch, new size: 10684744

Reduce: (10799560 - 10684744)/1024.0 = 112.125K.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* try to fix clang issue

* Merge xuejun/cc_test

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Test

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

* TEST1

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

* TEST2

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

* Complete Add_matcher wraper.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* register_pass rebase

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* fix clang issue.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* fix some replace error.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* 1: Rename ADD_MATCHER_SCOPE_WITH_OBJ -> ADD_MATCHER_SCOPE;
2: Remove debug info;
3: Fix bug: REGISTER_PASS_WITH_FALSE_

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Add ADD_MATCHER_SCOPE_WITHOUT_NSPACE macro

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* fix macro define issue.

* Add register_pass for cnn_network_ngraph_impl.cpp

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Try to fix vpux plugin fail issue.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Fix clang issue

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Merge macro "REGISTER_PASS_MODEL_SCOPE" and "REGISTER_PASS_FUNCTION_SCOPE" to "REGISTER_PASS_SCOPE"

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Rename "REGISTER_PASS_SCOPE_WITH_FALSE" to "REGISTER_DISABLED_PASS_SCOPE_WITH"

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Rename ADD_MATCHER_SCOPE_WITHOUT_OBJ to ADD_MATCHER_SCOPE_FOR_THIS
ADD_MATCHER_SCOPE_WITHOUT_NSPACE to ADD_MATCHER_SCOPE_FOR_THIS_WITHOUT_NSPACE

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* In order to implement CC, I have to move "StridesOptimization()" constructor to cpp file.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Remove "SCOPE" in macro.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Recover changes to fix clang issue.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Remove "REGISTER_PASS_MODEL_IF"

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* 1: Remove "ADD_MATCHER_FOR_THIS_WITHOUT_NSPACE";
2: Remove param "nspace" in Macro, replace with "using namespace " in local.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* fix missing update.

* For MACRO REGISTER_PASS:
1: Only keep a external macro define;
2: Judge 3 possibilities, if one of them is true, it will be disable;

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Optimize ADD_MATCHER_FOR_THIS.
-#    define ADD_MATCHER_FOR_THIS(region, ...)        add_matcher<region>(__VA_ARGS__);
+#    define ADD_MATCHER_FOR_THIS(region, ...)        ADD_MATCHER(this, region, __VA_ARGS__)

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Update src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp

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

* Update src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp

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

* Update src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp

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

* Update src/common/conditional_compilation/include/openvino/cc/pass/itt.hpp

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

* clang format

* Update OR defiation in MACRO, increasing code scalability.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

* Fix window compiles error.

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>

Signed-off-by: Yan, Xiping <xiping.yan@intel.com>
Signed-off-by: xuejun <Xuejun.Zhai@intel.com>
Co-authored-by: xuejun <Xuejun.Zhai@intel.com>
Co-authored-by: Ilya Churaev <ilyachur@gmail.com>
2022-11-20 19:02:42 +03:00
Tingqian Li
80971ae8e8 [CPU] Optimize fused FQ/Eltwise nodes to use less binary postOps (#13502) 2022-11-16 00:26:02 +03:00
Tomasz Jankowski
c5eb25d3ea Transformation component transition to OV namespace (phase 2) (#13557) 2022-11-15 04:40:48 +03:00
Xiake Sun
7ab81d0950 Add missing opset5 header for LSTMSequence in LPT (#13953) 2022-11-11 09:43:31 +03:00
Tomasz Jankowski
5eef0298d9 Transformation component transition to OV namespace (phase 1) (#13469)
* Move GeluFusion into ov namespace

It required to move utils as well.

* Move AddFakeQuantizeFusion into ov namespace

* Move AlignEltwiseInputRanks into ov namespace

* Move BatchToSpaceFusion into ov namespace

* Move BinarizeWeights into ov namespace

* Move BroadcastElementwiseFusion into ov namespace

* Move ClampFusion into ov namespace

* Move Concats and Eliminations into ov namespace

* Move many passes and such  into ov namespace

* Move many passes and such into ov namespace

ngraph_ops
op_conversions

* Move control_flow into ov namespace

* Apply style

* Move smart_reshape into ov namespace

* Move opset_conversions into ov namespace

* Move low_precision into ov namespace

* Apply style

* Move fused_names into ov namespace

* Add missing aliases

* Move few passes into ov namespace

ConvertPrecision
FixRtInfo
InitNodeInfo

* Move CommonOptimizations into ov namespace

* Fix convert_precision conflicting namespaces

* Apply code style

* ov-nize Type Relaxed definitions

* Remove useless aliases

bulkly added by script

* Revert opsets

* Address review comments

* Remove NGRAPH_RTTI

* Clean up remains of yet another implicit inclusion

Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2022-11-11 02:52:19 +03:00
Egor Duplenskii
c1733b5542 [CPU][LPT] Support quantized RNN (LSTM and GRU algorithms) (#12981) 2022-11-10 23:48:51 +03:00
Mateusz Tabaka
154850e8ca Eliminate dequantization shift when zero point == 0 (#13353)
Ticket: 91111
2022-10-27 01:37:13 +02:00