From 8a5c34e6b1fc10631c77041dbf75c30ac805f312 Mon Sep 17 00:00:00 2001 From: Edward Shogulin Date: Mon, 6 Sep 2021 17:08:04 +0300 Subject: [PATCH] [LPT] Refactoring + developer guide --- docs/IE_DG/Int8Inference.md | 2 +- docs/doxygen/ie_docs.xml | 71 ++++++- .../avg_pool_precision_preserved.md | 9 + .../attributes/intervals_alignment.md | 9 + .../attributes/per_tensor_quantization.md | 9 + .../attributes/precision_preserved.md | 9 + .../attributes/precisions.md | 9 + .../attributes/quantization_alignment.md | 9 + .../img/fq_and_convolution.common.png | 3 - .../img/fq_and_convolution.transformed.png | 3 - .../img/fq_fq_and_convolution.common.png | 3 - .../low_precision_transformation_pipeline.png | 4 +- .../img/model_fq_and_convolution.common.png | 3 + ...vg => model_fq_and_convolution.common.svg} | 0 .../model_fq_and_convolution.transformed.png | 3 + ... model_fq_and_convolution.transformed.svg} | 0 .../model_fq_fq_and_convolution.common.png | 3 + ...=> model_fq_fq_and_convolution.common.svg} | 0 .../img/model_qdq_and_convolution.common.png | 3 + ...g => model_qdq_and_convolution.common.svg} | 0 .../img/qdq_and_convolution.common.png | 3 - docs/low_precision_transformations/lpt.md | 195 +++++++++--------- .../lpt_attributes.md | 40 ++++ .../pipeline/img/step2_markup1.png | 3 + .../pipeline/img/step2_markup1.svg | 1 + .../pipeline/img/step2_markup2.png | 3 + .../pipeline/img/step2_markup2.svg | 1 + .../pipeline/img/step2_markup3.png | 3 + .../pipeline/img/step2_markup3.svg | 1 + .../pipeline/img/step2_markup4.png | 3 + .../pipeline/img/step2_markup4.svg | 1 + .../pipeline/img/step2_markup5.png | 3 + .../pipeline/img/step2_markup5.svg | 1 + .../pipeline/img/step2_markup6.png | 3 + .../pipeline/img/step2_markup6.svg | 1 + .../pipeline/img/step2_markup7.png | 3 + .../pipeline/img/step2_markup7.svg | 1 + .../pipeline/img/step2_markup_original.png | 3 + .../pipeline/img/step2_markup_original.svg | 1 + .../pipeline/img/step3_original.png | 3 + .../pipeline/img/step3_original.svg | 1 + .../pipeline/img/step3_transformed.png | 3 + .../pipeline/img/step3_transformed.svg | 1 + .../pipeline/step1_prerequisites.md | 6 + .../pipeline/step2_markup.md | 138 +++++++++++++ .../pipeline/step3_main.md | 49 +++++ .../pipeline/step4_cleanup.md | 8 + .../lin_op_sequence_fusion.md | 1 + .../pull_reshape_through_dequantization.md | 1 + .../pull_transpose_through_dequantization.md | 1 + .../align_quantization_intervals.md | 1 + .../align_quantization_paramters.md | 1 + .../step2_markup/create_attribute.md | 1 + .../create_precisions_dependent_attribute.md | 1 + .../markup_avg_pool_precision_preserved.md | 1 + .../step2_markup/markup_can_be_quantized.md | 1 + .../markup_per_tensor_quantization.md | 1 + .../step2_markup/markup_precisions.md | 1 + .../step2_markup/propagate_precisions.md | 1 + .../propagate_through_precision_preserved.md | 1 + .../step2_markup/propagate_to_input.md | 1 + .../update_shared_precision_preserved.md | 1 + .../step3_main/activation/clamp.md | 1 + .../step3_main/activation/prelu.md | 1 + .../step3_main/activation/relu.md | 1 + .../step3_main/arithmetic/add.md | 1 + .../step3_main/arithmetic/multiply.md | 1 + .../step3_main/convolution/convolution.md | 32 +++ .../convolution/convolution_backprop_data.md | 1 + .../convolution/group_convolution.md | 1 + .../img/fq_and_convolution.common.png | 3 + .../img/fq_and_convolution.common.svg | 1 + .../img/fq_and_convolution.transformed.png | 3 + .../img/fq_and_convolution.transformed.svg | 1 + .../img/fq_fq_and_convolution.common.png | 3 + .../img/fq_fq_and_convolution.common.svg | 1 + .../step3_main/image/interpolate.md | 1 + .../step3_main/matrix/mat_mul.md | 1 + .../step3_main/movement/concat.md | 1 + .../step3_main/movement/depth_to_space.md | 1 + .../step3_main/movement/shuffle_channels.md | 1 + .../step3_main/movement/split.md | 1 + .../step3_main/movement/strided_slice.md | 1 + .../step3_main/movement/transpose.md | 1 + .../step3_main/movement/variadic_split.md | 1 + .../step3_main/normalization/mvn.md | 1 + .../step3_main/normalization/normalize_l2.md | 1 + .../step3_main/pooling/avg_pool.md | 1 + .../step3_main/pooling/max_pool.md | 1 + .../step3_main/quantization/fake_quantize.md | 1 + .../quantization/fold_fake_quantize.md | 1 + .../step3_main/reduction/reduce_max.md | 1 + .../step3_main/reduction/reduce_mean.md | 1 + .../step3_main/reduction/reduce_min.md | 1 + .../step3_main/reduction/reduce_sum.md | 1 + .../step3_main/shape/reshape.md | 1 + .../step3_main/shape/squeeze.md | 1 + .../step3_main/shape/unsqueeze.md | 1 + .../fake_quantize_decomposition.md | 1 + .../step4_cleanup/fold_convert.md | 1 + .../step4_cleanup/fuse_convert.md | 1 + .../fuse_multiply_to_fake_quantize.md | 1 + .../fuse_subtract_to_fake_quantize.md | 1 + .../multiply_to_group_convolution.md | 1 + 104 files changed, 616 insertions(+), 109 deletions(-) create mode 100644 docs/low_precision_transformations/attributes/avg_pool_precision_preserved.md create mode 100644 docs/low_precision_transformations/attributes/intervals_alignment.md create mode 100644 docs/low_precision_transformations/attributes/per_tensor_quantization.md create mode 100644 docs/low_precision_transformations/attributes/precision_preserved.md create mode 100644 docs/low_precision_transformations/attributes/precisions.md create mode 100644 docs/low_precision_transformations/attributes/quantization_alignment.md delete mode 100644 docs/low_precision_transformations/img/fq_and_convolution.common.png delete mode 100644 docs/low_precision_transformations/img/fq_and_convolution.transformed.png delete mode 100644 docs/low_precision_transformations/img/fq_fq_and_convolution.common.png create mode 100644 docs/low_precision_transformations/img/model_fq_and_convolution.common.png rename docs/low_precision_transformations/img/{fq_and_convolution.common.svg => model_fq_and_convolution.common.svg} (100%) create mode 100644 docs/low_precision_transformations/img/model_fq_and_convolution.transformed.png rename docs/low_precision_transformations/img/{fq_and_convolution.transformed.svg => model_fq_and_convolution.transformed.svg} (100%) create mode 100644 docs/low_precision_transformations/img/model_fq_fq_and_convolution.common.png rename docs/low_precision_transformations/img/{fq_fq_and_convolution.common.svg => model_fq_fq_and_convolution.common.svg} (100%) create mode 100644 docs/low_precision_transformations/img/model_qdq_and_convolution.common.png rename docs/low_precision_transformations/img/{qdq_and_convolution.common.svg => model_qdq_and_convolution.common.svg} (100%) delete mode 100644 docs/low_precision_transformations/img/qdq_and_convolution.common.png create mode 100644 docs/low_precision_transformations/lpt_attributes.md create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup1.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup1.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup2.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup2.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup3.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup3.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup4.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup4.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup5.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup5.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup6.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup6.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup7.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup7.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup_original.png create mode 100644 docs/low_precision_transformations/pipeline/img/step2_markup_original.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step3_original.png create mode 100644 docs/low_precision_transformations/pipeline/img/step3_original.svg create mode 100644 docs/low_precision_transformations/pipeline/img/step3_transformed.png create mode 100644 docs/low_precision_transformations/pipeline/img/step3_transformed.svg create mode 100644 docs/low_precision_transformations/pipeline/step1_prerequisites.md create mode 100644 docs/low_precision_transformations/pipeline/step2_markup.md create mode 100644 docs/low_precision_transformations/pipeline/step3_main.md create mode 100644 docs/low_precision_transformations/pipeline/step4_cleanup.md create mode 100644 docs/low_precision_transformations/transformations/step1_prerequisites/lin_op_sequence_fusion.md create mode 100644 docs/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md create mode 100644 docs/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/align_quantization_paramters.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/create_attribute.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/markup_precisions.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/propagate_precisions.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/propagate_to_input.md create mode 100644 docs/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/activation/clamp.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/activation/prelu.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/activation/relu.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/arithmetic/add.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/convolution.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.png create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.svg create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.png create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.svg create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.png create mode 100644 docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.svg create mode 100644 docs/low_precision_transformations/transformations/step3_main/image/interpolate.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/movement/concat.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/movement/split.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/movement/strided_slice.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/movement/transpose.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/movement/variadic_split.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/normalization/mvn.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/pooling/max_pool.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/shape/reshape.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/shape/squeeze.md create mode 100644 docs/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md create mode 100644 docs/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md create mode 100644 docs/low_precision_transformations/transformations/step4_cleanup/fold_convert.md create mode 100644 docs/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md create mode 100644 docs/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md create mode 100644 docs/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md create mode 100644 docs/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md diff --git a/docs/IE_DG/Int8Inference.md b/docs/IE_DG/Int8Inference.md index 889af6a53278b1..dab301fb0c647a 100644 --- a/docs/IE_DG/Int8Inference.md +++ b/docs/IE_DG/Int8Inference.md @@ -71,7 +71,7 @@ available from the Inference Engine API. For example, the part of performance co | resnet\_model/add\_5/fq\_input\_1 | NOT\_RUN | FakeQuantize | undef | 0 | 0 | -> The `exeStatus` column of the table includes possible values: +> The `execStatus` column of the table includes possible values: > - `EXECUTED` - layer was executed by standalone primitive, > - `NOT_RUN` - layer was not executed by standalone primitive or was fused with another operation and executed in another layer primitive. > diff --git a/docs/doxygen/ie_docs.xml b/docs/doxygen/ie_docs.xml index 6eb62a4ce2fb9e..4774c1df7aede4 100644 --- a/docs/doxygen/ie_docs.xml +++ b/docs/doxygen/ie_docs.xml @@ -311,7 +311,76 @@ limitations under the License. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/low_precision_transformations/attributes/avg_pool_precision_preserved.md b/docs/low_precision_transformations/attributes/avg_pool_precision_preserved.md new file mode 100644 index 00000000000000..07ec7c5d10fea7 --- /dev/null +++ b/docs/low_precision_transformations/attributes/avg_pool_precision_preserved.md @@ -0,0 +1,9 @@ +# OpenVINO™ Low Precision Transformations: AvgPoolPrecisionPreserved {#openvino_docs_IE_DG_lpt_AvgPoolPrecisionPreserved} + +Utility attribute which is used only during `AvgPool` operation precision preserved property definition. + +| Property name | Values | +|---------------|----------------------------------------------| +| Required | Yes | +| Defined | Operation | +| Properties | value (boolean) | \ No newline at end of file diff --git a/docs/low_precision_transformations/attributes/intervals_alignment.md b/docs/low_precision_transformations/attributes/intervals_alignment.md new file mode 100644 index 00000000000000..62c9ebf2acc0a1 --- /dev/null +++ b/docs/low_precision_transformations/attributes/intervals_alignment.md @@ -0,0 +1,9 @@ +# OpenVINO™ Low Precision Transformations: IntervalsAlignment {#openvino_docs_IE_DG_lpt_IntervalsAlignment} + +The attribute defines subgraph with the same quantization intervals alignment. `FakeQuantize` operations are included. The attribute is used by quantization operations. + +| Property name | Values | +|---------------|----------------------------------------------| +| Required | Yes | +| Defined | Operation | +| Properties | combined interval, minimal interval, minimal levels, preferable precisions | \ No newline at end of file diff --git a/docs/low_precision_transformations/attributes/per_tensor_quantization.md b/docs/low_precision_transformations/attributes/per_tensor_quantization.md new file mode 100644 index 00000000000000..026d886b1ebf84 --- /dev/null +++ b/docs/low_precision_transformations/attributes/per_tensor_quantization.md @@ -0,0 +1,9 @@ +# OpenVINO™ Low Precision Transformations: PerTensorQuantization {#openvino_docs_IE_DG_lpt_PerTensorQuantization} + +The attribute defines if operation input port requires per-tensor quantization. + +| Property name | Values | +|---------------|----------------------------------------------| +| Required | Yes | +| Defined | Operation, input ports | +| Properties | | \ No newline at end of file diff --git a/docs/low_precision_transformations/attributes/precision_preserved.md b/docs/low_precision_transformations/attributes/precision_preserved.md new file mode 100644 index 00000000000000..cb46c12ca36055 --- /dev/null +++ b/docs/low_precision_transformations/attributes/precision_preserved.md @@ -0,0 +1,9 @@ +# OpenVINO™ Low Precision Transformations: PrecisionPreserved {#openvino_docs_IE_DG_lpt_PrecisionPreserved} + +The attribute defines precision preserved operation. If attribute is absent then an operation is not precision preserved. + +| Property name | Values | +|---------------|----------------------------------------------| +| Required | Yes | +| Defined | Operation | +| Properties | value (boolean) | \ No newline at end of file diff --git a/docs/low_precision_transformations/attributes/precisions.md b/docs/low_precision_transformations/attributes/precisions.md new file mode 100644 index 00000000000000..ef0b0f74ebd428 --- /dev/null +++ b/docs/low_precision_transformations/attributes/precisions.md @@ -0,0 +1,9 @@ +# OpenVINO™ Low Precision Transformations: Precisions {#openvino_docs_IE_DG_lpt_Precisions} + +The attribute defines precision which is required for input/output port or an operation. + +| Property name | Values | +|---------------|----------------------------------------------| +| Required | Yes | +| Defined | Operation, input port, output port | +| Properties | value (boolean) | \ No newline at end of file diff --git a/docs/low_precision_transformations/attributes/quantization_alignment.md b/docs/low_precision_transformations/attributes/quantization_alignment.md new file mode 100644 index 00000000000000..63dabfbdc1a8a7 --- /dev/null +++ b/docs/low_precision_transformations/attributes/quantization_alignment.md @@ -0,0 +1,9 @@ +# OpenVINO™ Low Precision Transformations: QuantizationAlignment {#openvino_docs_IE_DG_lpt_QuantizationAlignment} + +The attribute defines subgraph with the same quantization alignment. `FakeQuantize` operations are not included. The attribute is used by quantization operations. + +| Property name | Values | +|---------------|----------------------------------------------| +| Required | Yes | +| Defined | Operation | +| Properties | value (boolean) | \ No newline at end of file diff --git a/docs/low_precision_transformations/img/fq_and_convolution.common.png b/docs/low_precision_transformations/img/fq_and_convolution.common.png deleted file mode 100644 index d73a3733374e43..00000000000000 --- a/docs/low_precision_transformations/img/fq_and_convolution.common.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd44f4cd86976092a61dbd9c4501b4824afecb8a8a2a8539f676a04b9cb6eb24 -size 129461 diff --git a/docs/low_precision_transformations/img/fq_and_convolution.transformed.png b/docs/low_precision_transformations/img/fq_and_convolution.transformed.png deleted file mode 100644 index 4e8f2442c90029..00000000000000 --- a/docs/low_precision_transformations/img/fq_and_convolution.transformed.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99c75953f3d22783cd145a2ba628fce2063e008929dc4a1b8e7f2adab35a7f26 -size 138879 diff --git a/docs/low_precision_transformations/img/fq_fq_and_convolution.common.png b/docs/low_precision_transformations/img/fq_fq_and_convolution.common.png deleted file mode 100644 index f446fdfd4db1fb..00000000000000 --- a/docs/low_precision_transformations/img/fq_fq_and_convolution.common.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e869642a3ffa9abf2901abd1df5f2afcbc1425ae0955e39bde0080821c0b7ff3 -size 124152 diff --git a/docs/low_precision_transformations/img/low_precision_transformation_pipeline.png b/docs/low_precision_transformations/img/low_precision_transformation_pipeline.png index 079559ed36c89a..cdd94edb97a29d 100644 --- a/docs/low_precision_transformations/img/low_precision_transformation_pipeline.png +++ b/docs/low_precision_transformations/img/low_precision_transformation_pipeline.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb920acb9781c46471f60217afc9b99673a507a327fc600f0499ce058fd46e3b -size 176553 +oid sha256:3e4857abd67351d79a1a9e5d637c37c492bbf6ddfaeea8f2034a9e0c1c51cfd8 +size 354360 diff --git a/docs/low_precision_transformations/img/model_fq_and_convolution.common.png b/docs/low_precision_transformations/img/model_fq_and_convolution.common.png new file mode 100644 index 00000000000000..37d7e97184a454 --- /dev/null +++ b/docs/low_precision_transformations/img/model_fq_and_convolution.common.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1d9a68912b2dde17c731ed31b090077e6812a84231544ce3d212c0e02b13dfb +size 204085 diff --git a/docs/low_precision_transformations/img/fq_and_convolution.common.svg b/docs/low_precision_transformations/img/model_fq_and_convolution.common.svg similarity index 100% rename from docs/low_precision_transformations/img/fq_and_convolution.common.svg rename to docs/low_precision_transformations/img/model_fq_and_convolution.common.svg diff --git a/docs/low_precision_transformations/img/model_fq_and_convolution.transformed.png b/docs/low_precision_transformations/img/model_fq_and_convolution.transformed.png new file mode 100644 index 00000000000000..07fb2213a9076e --- /dev/null +++ b/docs/low_precision_transformations/img/model_fq_and_convolution.transformed.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79b2fd14f9ff7655e4a5abe7e71748e153a095fe1f5eb07c168f53cb12fbb406 +size 216703 diff --git a/docs/low_precision_transformations/img/fq_and_convolution.transformed.svg b/docs/low_precision_transformations/img/model_fq_and_convolution.transformed.svg similarity index 100% rename from docs/low_precision_transformations/img/fq_and_convolution.transformed.svg rename to docs/low_precision_transformations/img/model_fq_and_convolution.transformed.svg diff --git a/docs/low_precision_transformations/img/model_fq_fq_and_convolution.common.png b/docs/low_precision_transformations/img/model_fq_fq_and_convolution.common.png new file mode 100644 index 00000000000000..e12e47a748b30f --- /dev/null +++ b/docs/low_precision_transformations/img/model_fq_fq_and_convolution.common.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d3e9a9eddfdcd50eedb035c500848b982b9317ba23f28809a831bbe66300bec +size 167226 diff --git a/docs/low_precision_transformations/img/fq_fq_and_convolution.common.svg b/docs/low_precision_transformations/img/model_fq_fq_and_convolution.common.svg similarity index 100% rename from docs/low_precision_transformations/img/fq_fq_and_convolution.common.svg rename to docs/low_precision_transformations/img/model_fq_fq_and_convolution.common.svg diff --git a/docs/low_precision_transformations/img/model_qdq_and_convolution.common.png b/docs/low_precision_transformations/img/model_qdq_and_convolution.common.png new file mode 100644 index 00000000000000..e70b6f920e825c --- /dev/null +++ b/docs/low_precision_transformations/img/model_qdq_and_convolution.common.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec31aa62c0e1da3caf1531f2d92270f321857aca3044445ec242f33ee224f91b +size 297353 diff --git a/docs/low_precision_transformations/img/qdq_and_convolution.common.svg b/docs/low_precision_transformations/img/model_qdq_and_convolution.common.svg similarity index 100% rename from docs/low_precision_transformations/img/qdq_and_convolution.common.svg rename to docs/low_precision_transformations/img/model_qdq_and_convolution.common.svg diff --git a/docs/low_precision_transformations/img/qdq_and_convolution.common.png b/docs/low_precision_transformations/img/qdq_and_convolution.common.png deleted file mode 100644 index 9112cbffab9f5f..00000000000000 --- a/docs/low_precision_transformations/img/qdq_and_convolution.common.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:847dfc9d1244cf12d217327b10bca47bb7868c9c2dfba8e1a59e9723d036c755 -size 183486 diff --git a/docs/low_precision_transformations/lpt.md b/docs/low_precision_transformations/lpt.md index d7edbbec87953e..8c3c445ea0f844 100644 --- a/docs/low_precision_transformations/lpt.md +++ b/docs/low_precision_transformations/lpt.md @@ -1,7 +1,9 @@ # OpenVINO™ Low Precision Transformations {#openvino_docs_IE_DG_lpt} ## Introduction -The goal of `Low Precision Transformations` (LPT transformations) is transform quantized model from original precisions (FP16 or FP32) to low precision (INT8: `signed int8` or `unsigned int8`) model to prepare model for low precision inference in OpenVINO™ plugin. It achieved by two main principles: +`Low precision transformations` (known as `LPT`) are a set of nGraph transformations, which are combined in one library. The library is mandatory part of OpenVINO to infer quantized model in low precision with the maximum performance on Intel CPU, GPU and ARM platforms. The library includes more than 45 transformations and supports more then 30 operations. Some transformations are mandatory, some of them are optional and developed for specific device. + +The goal of `Low Precision Transformations` (`LPT`) is transform quantized model from original precisions (FP16 or FP32) to low precision (INT8: `signed int8` or `unsigned int8`) model to prepare model for low precision inference in OpenVINO™ plugin. It achieved by two main principles: 1. `FakeQuantize` operation decomposition to two parts: - part #1: quantize operation - new `FakeQuantize` operation with output quantization intervals in low precision range (signed int8: [-128, 127] or [-127, 127], unsigned int8: [0, 255] or [0, 256]) and with low precision output (`signed int8` or `unsigned int8`), - part #2: dequantization operations with low precision input and original precision output. @@ -13,41 +15,42 @@ How quantize a model in details you can explore in [Low precision tools](#low-pr ## Input model requirements -LPT transformations decompose `FakeQuantize` operations if `level` parameter is set to 255 or 256. LPT transformations propagate dequantization operations through follow operations: -* Add -* Avg -* Clamp -* Concat -* Convolution -* ConvolutionBackpropData -* DepthToSpace -* FakeQuantize -* GroupConvolution -* Interpolate -* MatMul -* MaxPool -* Multiply -* MVN -* NormalizeL2 -* PRelu -* ReduceMax -* ReduceMean -* ReduceMin -* ReduceSum -* Relu -* Reshape -* Split -* Squeeze -* StridedSlice -* Transpose -* Unsqueeze -* VariadicSplit - -If operation is not supported by LPT then dequantization operation will be not propagated, input tensor precisions will be not changed to low precision and operation will be executed in original precision. - -For example, if you would like to infer `Convolution` operation in low precision then your model can look as on picture below: - -![Quantized Convolution](img/fq_and_convolution.common.png) +LPT transformations propagate dequantization operations through follow operations: +* [Add-1](@ref openvino_docs_ops_arithmetic_Add_1) +* [AvgPool-1](@ref openvino_docs_ops_pooling_AvgPool_1) +* [Clamp-1](@ref openvino_docs_ops_activation_Clamp_1) +* [Concat-1](@ref openvino_docs_ops_movement_Concat_1) +* [Convolution-1](@ref openvino_docs_ops_convolution_Convolution_1) +* [ConvolutionBackpropData-1](@ref openvino_docs_ops_convolution_ConvolutionBackpropData_1) +* [DepthToSpace-1](@ref openvino_docs_ops_movement_DepthToSpace_1) +* [FakeQuantize-1](@ref openvino_docs_ops_quantization_FakeQuantize_1) +* [GroupConvolution-1](@ref openvino_docs_ops_convolution_GroupConvolution_1) +* [Interpolate-1](@ref openvino_docs_ops_image_Interpolate_1) +* [Interpolate-4](@ref openvino_docs_ops_image_Interpolate_4) +* [MatMul-1](@ref openvino_docs_ops_matrix_MatMul_1) +* [MaxPool-1](@ref openvino_docs_ops_pooling_MaxPool_1) +* [Multiply-1](@ref openvino_docs_ops_arithmetic_Multiply_1) +* [MVN-1](@ref openvino_docs_ops_normalization_MVN_1) +* [NormalizeL2-1](@ref openvino_docs_ops_normalization_NormalizeL2_1) +* [PRelu-1](@ref openvino_docs_ops_activation_PReLU_1) +* [ReduceMax-1](@ref openvino_docs_ops_reduction_ReduceMax_1) +* [ReduceMean-1](@ref openvino_docs_ops_reduction_ReduceMean_1) +* [ReduceMin-1](@ref openvino_docs_ops_reduction_ReduceMin_1) +* [ReduceSum-1](@ref openvino_docs_ops_reduction_ReduceSum_1) +* [Relu-1](@ref openvino_docs_ops_activation_ReLU_1) +* [Reshape-1](@ref openvino_docs_ops_shape_Reshape_1) +* [Split-1](@ref openvino_docs_ops_movement_Split_1) +* [Squeeze-1](@ref openvino_docs_ops_shape_Reshape_1) +* [StridedSlice-1](@ref openvino_docs_ops_movement_StridedSlice_1) +* [Transpose-1](@ref openvino_docs_ops_movement_Transpose_1) +* [Unsqueeze-1](@ref openvino_docs_ops_shape_Unsqueeze_1) +* [VariadicSplit-1](@ref openvino_docs_ops_movement_VariadicSplit_1) + +If operation is not supported by LPT then dequantization operation will not be propagated, input tensor precisions will not be changed to low precision and operation will be executed in original precision. + +For example, if you would like to infer a model with `Convolution` operation in low precision then the model can look as on picture below: + +![Quantized Convolution](img/model_fq_and_convolution.common.png) > There are several supported quantization approaches on activations and on weights. All supported approaches are described in [Quantization approaches](#quantization-approaches) section below. In demonstrated model [FakeQuantize operation quantization](#fakequantize-operation) approach is used. @@ -67,18 +70,18 @@ Let's explore both approaches in details on `Convolution` operation. ### FakeQuantize operation In this case `FakeQuantize` operation is used on activations and quantized constant on weights. Original input model: -![](img/fq_and_convolution.common.png) +![](img/model_fq_and_convolution.common.png) ### Quantize and dequantization operations In this case `FakeQuantize` operation and `Convert` are used as quantize operation and return quantized low precision tensor. After quantize operation on activations there are `Convert` and dequantization operations to compensate decomposition. Original input model: -![](img/qdq_and_convolution.common.png) +![](img/model_qdq_and_convolution.common.png) In both cases result is the same. In LPT result model you can see, that: -1. if neccessary, `FakeQuantize` operations on activations were decomposed to two part: +1. if necessary, `FakeQuantize` operations on activations were decomposed to two part: - new `FakeQuantize`operation with updated output intervals in low precision range and low precision output, - dequantization operations on activations; -2. if neccessary, existing `FakeQuantize` decomposition can be rework to get more optimal precision; +2. if necessary, existing `FakeQuantize` decomposition can be rework to get more optimal precision; 3. dequantization operations were propagated through `Convolution`. LPT result model: @@ -130,31 +133,31 @@ LPT transformation pipeline has several steps. For each transformation inside on Inside each step LPT transformations handle input model operation by operation, applying transformation matching pattern for each transformation from the step to an operation, and execute transformation if pattern is matched. Decomposition transformation decomposes `FakeQuantize` to quantize and dequantization operations. Dequantization operations from previous transformation result is used for the current one and so on, until the end of the model is achieved. -As result, usually all operations are inferred by plugin in low precision. If plugin doesn't support an operation inference in low precision, then corresponding LPT transformation can be disabled, and input tensor precisions for the operation will be not changed. In this case the operation is inferred in the original precision. +As result, usually all operations are inferred by plugin in low precision. If plugin doesn't support an operation inference in low precision, then corresponding LPT transformation can be disabled, and input tensor precisions for the operation will not be changed. In this case the operation is inferred in the original precision. Low precision transformations pipeline includes four steps: -* Step #1: Prerequisites. -* Step #2: Markup transformations. -* Step #3: Main transformations: `FakeQuantize` decomposition and dequantization operations handling. -* Step #4: Cleanup transformations: cleanup result model. +* [Step #1: Prerequisites](@ref openvino_docs_IE_DG_lpt_step1_prerequisites) +* [Step #2: Markup transformations](@ref openvino_docs_IE_DG_lpt_step2_markup) +* [Step #3: Main transformations](@ref openvino_docs_IE_DG_lpt_step3_main) +* [Step #4: Cleanup transformations](@ref openvino_docs_IE_DG_lpt_step4_cleanup) ### Step #1. Prerequisites This step fuses and propagates some operations in the model before run the next step. The step is required for OpenVINO plugins. Transformations: -* PullReshapeThroughDequantization -* PullTransposeThroughDequantization -* ngraph::pass::LinOpSequenceFusion +* [PullReshapeThroughDequantization](@ref openvino_docs_IE_DG_lpt_PullReshapeThroughDequantization) +* [PullTransposeThroughDequantization](@ref openvino_docs_IE_DG_lpt_PullTransposeThroughDequantization) +* [LinOpSequenceFusion](@ref openvino_docs_IE_DG_lpt_LinOpSequenceFusion) The model on this step is changed. ### Step #2. Markup This step create runtime attributes for operations. Attributes will be used in next step. Transformations: -* MarkupCanBeQuantized -* MarkupPrecisions -* MarkupPerTensorQuantization -* MarkupAvgPoolPrecisionPreserved -* PropagatePrecisions -* AlignQuantizationInttervals -* AlignQuantizationParamters +* [MarkupCanBeQuantized](@ref openvino_docs_IE_DG_lpt_MarkupCanBeQuantized) +* [MarkupPrecisions](@ref openvino_docs_IE_DG_lpt_MarkupPrecisions) +* [MarkupPerTensorQuantization](@ref openvino_docs_IE_DG_lpt_MarkupPerTensorQuantization) +* [MarkupAvgPoolPrecisionPreserved](@ref openvino_docs_IE_DG_lpt_MarkupAvgPoolPrecisionPreserved) +* [PropagatePrecisions](@ref openvino_docs_IE_DG_lpt_PropagatePrecisions) +* [AlignQuantizationIntervals](@ref openvino_docs_IE_DG_lpt_AlignQuantizationIntervals) +* [AlignQuantizationParamters](@ref openvino_docs_IE_DG_lpt_AlignQuantizationParamters) The model on this step is changed: only new attributes are added to some operations. @@ -162,38 +165,38 @@ The model on this step is changed: only new attributes are added to some operati ### Step #3. Main transformations, FakeQuantize decomposition and dequantization operations handling This step has the most transformations. Transformations: -* AddTransformation -* AvgPoolTransformation -* ClampTransformation -* ConcatTransformation -* ConvolutionTransformation -* ConvolutionBackpropDataTransformation -* DepthToSpaceTransformation -* FakeQuantizeDecompositionTransformation -* FakeQuantizeTransformation -* InterpolateTransformation -* GroupConvolutionTransformation -* MatMulTransformation -* MaxPoolTransformation -* MultiplyTransformation -* MVNTransformation -* NormalizeL2Transformation -* PReluTransformation -* ReduceMaxTransformation -* ReduceMeanTransformation -* ReduceMinTransformation -* ReduceSumTransformation -* ReluTransformation -* ReshapeTransformation -* SqueezeTransformation -* ShuffleChannelsTransformation -* SplitTransformation -* StridedSliceTransformation -* TransposeTransformation -* UnsqueezeTransformation -* VariadicSplitTransformation - -Transformations from this step can be separated in two groups: decompostion transformation and dequantization operations handling. +* [AddTransformation](@ref openvino_docs_IE_DG_lpt_AddTransformation) +* [AvgPoolTransformation](@ref openvino_docs_IE_DG_lpt_AvgPoolTransformation) +* [ClampTransformation](@ref openvino_docs_IE_DG_lpt_AvgPoolTransformation) +* [ConcatTransformation](@ref openvino_docs_IE_DG_lpt_ConcatTransformation) +* [ConvolutionTransformation](@ref openvino_docs_IE_DG_lpt_ConvolutionTransformation) +* [ConvolutionBackpropDataTransformation](@ref openvino_docs_IE_DG_lpt_ConvolutionBackpropDataTransformation) +* [DepthToSpaceTransformation](@ref openvino_docs_IE_DG_lpt_DepthToSpaceTransformation) +* [FakeQuantizeDecompositionTransformation](@ref openvino_docs_IE_DG_lpt_FakeQuantizeDecompositionTransformation) +* [FakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FakeQuantizeTransformation) +* [InterpolateTransformation](@ref openvino_docs_IE_DG_lpt_InterpolateTransformation) +* [GroupConvolutionTransformation](@ref openvino_docs_IE_DG_lpt_GroupConvolutionTransformation) +* [MatMulTransformation](@ref openvino_docs_IE_DG_lpt_MatMulTransformation) +* [MaxPoolTransformation](@ref openvino_docs_IE_DG_lpt_MaxPoolTransformation) +* [MultiplyTransformation](@ref openvino_docs_IE_DG_lpt_MultiplyTransformation) +* [MVNTransformation](@ref openvino_docs_IE_DG_lpt_MVNTransformation) +* [NormalizeL2Transformation](@ref openvino_docs_IE_DG_lpt_NormalizeL2Transformation) +* [PReluTransformation](@ref openvino_docs_IE_DG_lpt_PReluTransformation) +* [ReduceMaxTransformation](@ref openvino_docs_IE_DG_lpt_ReduceMaxTransformation) +* [ReduceMeanTransformation](@ref openvino_docs_IE_DG_lpt_ReduceMeanTransformation) +* [ReduceMinTransformation](@ref openvino_docs_IE_DG_lpt_ReduceMinTransformation) +* [ReduceSumTransformation](@ref openvino_docs_IE_DG_lpt_ReduceSumTransformation) +* [ReluTransformation](@ref openvino_docs_IE_DG_lpt_ReluTransformation) +* [ReshapeTransformation](@ref openvino_docs_IE_DG_lpt_ReshapeTransformation) +* [SqueezeTransformation](@ref openvino_docs_IE_DG_lpt_SqueezeTransformation) +* [ShuffleChannelsTransformation](@ref openvino_docs_IE_DG_lpt_ShuffleChannelsTransformation) +* [SplitTransformation](@ref openvino_docs_IE_DG_lpt_SplitTransformation) +* [StridedSliceTransformation](@ref openvino_docs_IE_DG_lpt_StridedSliceTransformation) +* [TransposeTransformation](@ref openvino_docs_IE_DG_lpt_TransposeTransformation) +* [UnsqueezeTransformation](@ref openvino_docs_IE_DG_lpt_UnsqueezeTransformation) +* [VariadicSplitTransformation](@ref openvino_docs_IE_DG_lpt_VariadicSplitTransformation) + +Transformations from this step can be separated in two groups: decomposition transformation and dequantization operations handling. #### Decomposition transformations Decomposition transformations decompose `FakeQuantize` operation to quantize (`FakeQuantize` with low precision output) and dequantization operations (revers operations to quantize, with low precision input and original precision output). For dequantization operations LPT uses three operations: `Convert`, `Subtract` and `Multiply`. Element-wise operations `Subtract` and `Multiply` have constants on the second branches. If dequantization operations are not handled at the end of LPT pipeline, then they will be fused back to the `FakeQuantize`. @@ -212,13 +215,19 @@ Original `FakeQuantize`: In this step LPT transformations fuse or move dequantization operations through existing model operations as more as possible. Original `Convolution` operation in FP32 with dequantization operations before: -![Convolution operation before LPT](img/fq_and_convolution.common.png) +![Convolution operation before LPT](img/model_fq_and_convolution.common.png) `Convolution` operation in INT8 after decomposition and dequantization operations handling: -![Convolution operation after LPT](img/fq_and_convolution.transformed.png) +![Convolution operation after LPT](img/model_fq_and_convolution.transformed.png) ### Step #4: Cleanup result model -LPT cleanup transformations is final stage in LPT pipeline. In this step LPT transformations clean up the result model to avoid not handled dequantization operations: fuse dequantization operations if possible (fuse at least `Convert` operations if not) to other model operations to cleanup result model. +LPT cleanup transformations is final stage in LPT pipeline. In this step LPT transformations clean up the result model to avoid not handled dequantization operations: fuse dequantization operations if possible (fuse at least `Convert` operations if not) to other model operations to cleanup result model. Transformations: +* [FoldConvertTransformation](@ref openvino_docs_IE_DG_lpt_FoldConvertTransformation) +* [FoldFakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FoldFakeQuantizeTransformation) +* [FuseConvertTransformation](@ref openvino_docs_IE_DG_lpt_FuseConvertTransformation) +* [FuseMultiplyToFakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FuseMultiplyToFakeQuantizeTransformation) +* [FuseSubtractToFakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FuseSubtractToFakeQuantizeTransformation) +* [MultiplyToGroupConvolutionTransformation](@ref openvino_docs_IE_DG_lpt_MultiplyToGroupConvolutionTransformation) `FakeQuantize` operation with not handled dequantization operations: ![TODO: FakeQuantize operation with dequantization operations before LPT](quantization/img/fq.transformed.png) @@ -288,7 +297,7 @@ available from the Inference Engine API. For example, the part of performance co | resnet\_model/add\_5/fq\_input\_1 | NOT\_RUN | FakeQuantize | undef | 0 | 0 | -> The `exeStatus` column of the table includes possible values: +> The `execStatus` column of the table includes possible values: > - `EXECUTED` - layer was executed by standalone primitive, > - `NOT_RUN` - layer was not executed by standalone primitive or was fused with another operation and executed in another layer primitive. > @@ -321,13 +330,13 @@ This option defines if operation supports per-tensor quantization only. The opti @snippet snippets/lpt_mkldnn_plugin.cpp per_tensor_quantization -In provided example in result model `Convolution` operations must have per-tensor quantization on input 0 (on acivations). +In provided example in result model `Convolution` operations must have per-tensor quantization on input 0 (on activations). ### Update precisions This option defines if each LPT transformation updates precision or not. The option value is boolean and is passed as `updatePrecisions` member of `LayerTransformation::Params` which is input argument for `LowPrecision` constructor. All transformations are affected. If `true` then low precision transformations update precisions to low precision and doesn't if `false`. Typically this option is used for plugin debugging. ### Typical customization use cases -Plugin specific customization can be implemented via nGraph transformation callbacks. For exmample: asymmetric quantization support can be easilly customizable via `LayerTransformation::isAsymmetricQuantization` and `WeightableLayerTransformation::isAsymmetricOnWeights` methods usage in callbacks. For example: +Plugin specific customization can be implemented via nGraph transformation callbacks. For example: asymmetric quantization support can be easily customizable via `LayerTransformation::isAsymmetricQuantization` and `WeightableLayerTransformation::isAsymmetricOnWeights` methods usage in callbacks. For example: @snippet snippets/lpt_mkldnn_plugin.cpp asymmetric_quantization diff --git a/docs/low_precision_transformations/lpt_attributes.md b/docs/low_precision_transformations/lpt_attributes.md new file mode 100644 index 00000000000000..aa5a0fddf571d8 --- /dev/null +++ b/docs/low_precision_transformations/lpt_attributes.md @@ -0,0 +1,40 @@ +# OpenVINO™ Low Precision Transformations: attributes {#openvino_docs_IE_DG_lpt_attributes} + +## Introduction + +| Name | Target | Required | Mutable | +|-------------------------------------------------------------------------------------|------------------------|----------|---------| +| [AvgPoolPrecisionPreserved](@ref openvino_docs_IE_DG_lpt_AvgPoolPrecisionPreserved) | Precision | No | Yes | +| [IntervalsAlignment](@ref openvino_docs_IE_DG_lpt_IntervalsAlignment) | Quantization interval | Yes | Yes | +| [PerTensorQuantization](@ref openvino_docs_IE_DG_lpt_PerTensorQuantization) | Precision | Yes | No | +| [PrecisionPreserved](@ref openvino_docs_IE_DG_lpt_PrecisionPreserved) | Precision | Yes | Yes | +| [Precisions](@ref openvino_docs_IE_DG_lpt_Precisions) | Precision | Yes | Yes | +| [QuantizationAlignment](@ref openvino_docs_IE_DG_lpt_QuantizationAlignment) | Quantization alignment | Yes | Yes | + +> `Target` attribute group defines attribute usage during model transformation for the best performance: +> - `Precision` - the attribute is used to define the most optimal output port precision. +> - `Quantization interval` - the attribute is used to define quantization interval. +> - `Quantization alignment` - the attribute is used to define quantization alignment: per-channel or per-tensor quantization. +> +> `Required` attribute group defines if attribute usage is required to get optimal model during transformation or not: +> - `Yes` - the attribute is used in low precision optimization which is used by all OpenVINO plugins. +> - `No` - the attribute is used in specific OpenVINO plugin. +> +> `Mutable` attribute group defines if transformation can update existing attribute or not: +> - `Yes` - the attribute can be updated by the next transformations in pipeline. But attribute update order is still important. +> - `No` - existing attribute can not be updated by the next transformation. Previous handled transformation has optimized model in accordance with current value. + +`FakeQuantize` decomposition is mandatory part of low precision transformations. Attributes which are used during decomposition are mandatory. Optional attributes are required for some operations only. + +Attributes usage by transformations: + +| Attribute name | Created by transformations | Used by transformations | +|---------------------------|---------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| +| PrecisionPreserved | MarkupPrecisions, MarkupAvgPoolPrecisionPreserved | AlignQuantizationIntervals, AlignQuantizationParameters, FakeQuantizeDecompositionTransformation, MarkupAvgPoolPrecisionPreserved | +| AvgPoolPrecisionPreserved | MarkupAvgPoolPrecisionPreserved | | +| Precisions | MarkupCanBeQuantized, MarkupPrecisions | FakeQuantizeDecompositionTransformation | +| PerTensorQuantization | MarkupPerTensorQuantization | | +| IntervalsAlignment | AlignQuantizationIntervals | FakeQuantizeDecompositionTransformation | +| QuantizationAlignment | AlignQuantizationParameters | FakeQuantizeDecompositionTransformation | + +> Note, please, the same type attribute instances can be created in different transformations. This approach is result of transformation single-responsibility principle. For example `Precision` attribute instances are created in `MarkupCanBeQuantized` and `MarkupPrecisions` transformations but the creation reason is different. \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup1.png b/docs/low_precision_transformations/pipeline/img/step2_markup1.png new file mode 100644 index 00000000000000..813625f420b01d --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a79d152dae50fd3afaa78d8e18de7d279bb1c79b3e4d5c68fffed52a7c51b18 +size 383875 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup1.svg b/docs/low_precision_transformations/pipeline/img/step2_markup1.svg new file mode 100644 index 00000000000000..21359eda17aea3 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup1.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1levels: 256{f32} {1, 3, 299, 299}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2levels: 256{f32} {1, 3, 299, 299}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3levels: 256{f32} {1, 3, 299, 299}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2{f32} {1, 6, 299, 299}AvgPoolname: maxPool{f32} {1, 6, 299, 299}Convolutionname: convolution2{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {9, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {9, 1, 1, 1}Convert{f32} {9, 1, 1, 1}Convolutionname: convolution1in0: Precisions {precisions: {}}In1: Precisions {precisions: {}}{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup2.png b/docs/low_precision_transformations/pipeline/img/step2_markup2.png new file mode 100644 index 00000000000000..07a66e8c080f54 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:877171666a0120e0507b900e04a9a040a34bd92f1be9b906ce5af9642b5b1de2 +size 388880 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup2.svg b/docs/low_precision_transformations/pipeline/img/step2_markup2.svg new file mode 100644 index 00000000000000..42747f71f680e1 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup2.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1levels: 256{f32} {1, 3, 299, 299}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1rt info: PrecisionPreserved{value: true}{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2levels: 256{f32} {1, 3, 299, 299}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3levels: 256{f32} {1, 3, 299, 299}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2rt info: PrecisionPreserved{value: true}{f32} {1, 6, 299, 299}AvgPoolname: maxPool{f32} {1, 6, 299, 299}Convolutionname: convlution2in0: Precisions {precisions: {u8}}In1: Precisions {precisions: {i8}}{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {9, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {9, 1, 1, 1}Convert{f32} {9, 1, 1, 1}Convolutionname: convolution1in0: Precisions {precisions: {}}In1: Precisions {precisions: {}}{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup3.png b/docs/low_precision_transformations/pipeline/img/step2_markup3.png new file mode 100644 index 00000000000000..481b4d86bdd135 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1de684e554192b85c699a6f7b7e0a3f9863c55d93aede3b3a9fcd6e9255c0a3 +size 393432 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup3.svg b/docs/low_precision_transformations/pipeline/img/step2_markup3.svg new file mode 100644 index 00000000000000..5c2d39972bf221 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup3.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1levels: 256{f32} {1, 3, 299, 299}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1rt info: PrecisionPreserved{value: true}{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2levels: 256{f32} {1, 3, 299, 299}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3levels: 256{f32} {1, 3, 299, 299}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2rt info: PrecisionPreserved{value: true}{f32} {1, 6, 299, 299}AvgPoolname: maxPool{f32} {1, 6, 299, 299}Convolutionname: convlution2in0: PerTensorQuantization, Precisions {precisions: {u8}}in1: Precisions {precisions: {i8}}{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {9, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {9, 1, 1, 1}Convert{f32} {9, 1, 1, 1}Convolutionname: convolution1in0: PerTensorQuantization, Precisions {precisions: {}}in1: Precisions {precisions: {}}{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup4.png b/docs/low_precision_transformations/pipeline/img/step2_markup4.png new file mode 100644 index 00000000000000..9e262ee2d5c8a2 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7edfdb6e16f7c002f69a9682a0f6c10922d958ba4228db1b1e794afbe36cc77b +size 398944 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup4.svg b/docs/low_precision_transformations/pipeline/img/step2_markup4.svg new file mode 100644 index 00000000000000..6837c953a3c9b5 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup4.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1levels: 256{f32} {1, 3, 299, 299}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1rt info: PrecisionPreserved{value: true}{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2levels: 256{f32} {1, 3, 299, 299}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3levels: 256{f32} {1, 3, 299, 299}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2rt info: PrecisionPreserved{value: true}{f32} {1, 6, 299, 299}AvgPoolname: maxPoolrt info: AvgPoolPrecisionPreserved{value: true}, PrecisionPreserved{value: true}{f32} {1, 6, 299, 299}Convolutionname: convlution2in0: PerTensorQuantization, Precisions{precisions: {u8}}In1: Precisions{precisions: {i8}}{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {9, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {9, 1, 1, 1}Convert{f32} {9, 1, 1, 1}Convolutionname: convolution1in0: PerTensorQuantization, Precisions{precisions: {}}In1: Precisions{precisions: {}}{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup5.png b/docs/low_precision_transformations/pipeline/img/step2_markup5.png new file mode 100644 index 00000000000000..666ec8db6fd166 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cef7584b2ae82e0bbcdd36d0fe54f967afc6e7828c60a9232051d578c3b47e6 +size 475233 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup5.svg b/docs/low_precision_transformations/pipeline/img/step2_markup5.svg new file mode 100644 index 00000000000000..d23952d0433bd3 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup5.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1levels: 256{f32} {1,3,299,299} Precisions {precisions: {u8}}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1rt info: PrecisionPreserved{value: true}, Precisions {precisions: {u8}{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2levels: 256{f32} {1, 3, 299, 299} Precisions {precisions: {u8}}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3levels: 256{f32} {1, 3, 299, 299} Precisions {precisions: {u8}}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2rt info: PrecisionPreserved{value: true}, Precisions {precisions: {u8}{f32} {1, 6, 299, 299}AvgPoolname: maxPoolrt info: AvgPoolPrecisionPreserved{value: true}, PrecisionPreserved{value: true}, Precisions {precisions: {u8}}{f32} {1, 6, 299, 299}Convolutionname: convlution2in0: PerTensorQuantization, Precisions {precisions: {u8}}in1: Precisions {precisions: {i8}}{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {9, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {9, 1, 1, 1}Convert{f32} {9, 1, 1, 1}Convolutionname: convolution1in0: PerTensorQuantization, Precisions {precisions: {}}in1: Precisions {precisions: {}}{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup6.png b/docs/low_precision_transformations/pipeline/img/step2_markup6.png new file mode 100644 index 00000000000000..f1ee1cd4057201 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:093788a0decc92247b0c473314ba6b43d7ebf919e8ba28c628422e8e0d2fc52b +size 488509 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup6.svg b/docs/low_precision_transformations/pipeline/img/step2_markup6.svg new file mode 100644 index 00000000000000..ce9c24774508e4 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup6.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1levels: 256rt info: IntervalsAlignment{levels: 256, minLevels: 256, preferablePrecisions: {i8}}{f32} {1,3,299,299} Precisions{precisions: {u8}}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1rt info: IntervalsAlignment{levels: 256, minLevels: 256, preferablePrecisions: {i8}}, PrecisionPreserved{value: true}, Precisions {precisions: {u8}{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2levels: 256rt info: IntervalsAlignment{levels: 256, minLevels: 256, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299} Precisions{precisions: {u8}}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3levels: 256rt info: IntervalsAlignment{levels: 256, minLevels: 256, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299} Precisions{precisions: {u8}}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2rt info: IntervalsAlignment{levels: 256, minLevels: 256, preferablePrecisions: {i8}}, PrecisionPreserved{value: true},Precisions{precisions: {u8}{f32} {1, 6, 299, 299}AvgPoolname: maxPoolrt info: IntervalsAlignment{levels: 256, minLevels: 256, preferablePrecisions: {i8}},AvgPoolPrecisionPreserved{value: true}, PrecisionPreserved{value: true}, Precisions{precisions: {u8}{f32} {1, 6, 299, 299}Convolutionname: convlution2in0: PerTensorQuantization, Precisions{precisions: {u8}}In1: Precisions {precisions: {i8}}{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {9, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {9, 1, 1, 1}Convert{f32} {9, 1, 1, 1}Convolutionname: convolution1in0: PerTensorQuantization, Precisions{precisions: {}}In1: Precisions {precisions: {}}{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup7.png b/docs/low_precision_transformations/pipeline/img/step2_markup7.png new file mode 100644 index 00000000000000..04464b34fff843 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b7e746eb834cd3d1b638d84dba43317c6988f2a83e0b7bcf7585d80b580b712 +size 519897 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup7.svg b/docs/low_precision_transformations/pipeline/img/step2_markup7.svg new file mode 100644 index 00000000000000..1c1defa0356ad3 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup7.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true},Precisions{precisions: {u8}},QuantizationAlignment{value: false}{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true},Precisions {precisions: {u8}},QuantizationAlignment{value: true}{f32} {1, 6, 299, 299}AvgPoolname: maxPoolrt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true}Precisions {precisions: {u8}}QuantizationAlignment{value: true}{f32} {1, 6, 299, 299}Convolutionname: convolutionin0: {f32}[1,6,7,7]: PerTensorQuantization, Precisions {precisions: {u8}}in1: {f32}[9,6,1,1]: Precisions {precisions: {i8}}{f32} {1, 6, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {6, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {6, 1, 1, 1}Convert{f32} {6, 1, 1, 1}Convolutionname: convolution1{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup_original.png b/docs/low_precision_transformations/pipeline/img/step2_markup_original.png new file mode 100644 index 00000000000000..28608500f8ef47 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup_original.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4edd8311874fb9a3a22f650c40ee5a247fd89220d81e4a373850d0040b695b4 +size 351552 diff --git a/docs/low_precision_transformations/pipeline/img/step2_markup_original.svg b/docs/low_precision_transformations/pipeline/img/step2_markup_original.svg new file mode 100644 index 00000000000000..9f0d3495e50a7c --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step2_markup_original.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1levels: 256{f32} {1, 3, 299, 299}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2levels: 256{f32} {1, 3, 299, 299}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3levels: 256{f32} {1, 3, 299, 299}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2{f32} {1, 6, 299, 299}AvgPoolname: maxPool{f32} {1, 6, 299, 299}Convolutionname: convlution2{f32} {1, 9, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {9, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {9, 1, 1, 1}Convert{f32} {9, 1, 1, 1}Convolutionname: convolution1{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step3_original.png b/docs/low_precision_transformations/pipeline/img/step3_original.png new file mode 100644 index 00000000000000..7c06e5b0f1f495 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step3_original.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06caa4dc97b00f150395abc230bc90822f3bfa4e0bb3b65019f111a5a40e1d1c +size 520155 diff --git a/docs/low_precision_transformations/pipeline/img/step3_original.svg b/docs/low_precision_transformations/pipeline/img/step3_original.svg new file mode 100644 index 00000000000000..69717ff6fce47d --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step3_original.svg @@ -0,0 +1 @@ +FakeQuantizename: fakeQuantize1rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]ResultConcatname: concat1rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true},Precisions{precisions: {u8}},QuantizationAlignment{value: false}{f32} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]FakeQuantizename: fakeQuantize3rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{f32} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [-1.28]Constant{f32} {1, 1, 1, 1}value: [1.27]ResultConcatname: concat2rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true},Precisions {precisions: {u8}},QuantizationAlignment{value: true}{f32} {1, 6, 299, 299}AvgPoolname: maxPoolrt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true}Precisions {precisions: {u8}}QuantizationAlignment{value: true}{f32} {1, 6, 299, 299}Convolutionname: convolutionin0: {f32}[1,6,7,7]: PerTensorQuantization, Precisions {precisions: {u8}}in1: {f32}[9,6,1,1]: Precisions {precisions: {i8}}{f32} {1, 6, 299, 299}Constant{i8} {9, 6, 1, 1}Dequantization on weightsMultiply{f32} {9, 6, 1, 1}Convert{f32} {9, 6, 1, 1}Constant{f32} {6, 1, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {6, 1, 1, 1}Convert{f32} {6, 1, 1, 1}Convolutionname: convolution1{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/img/step3_transformed.png b/docs/low_precision_transformations/pipeline/img/step3_transformed.png new file mode 100644 index 00000000000000..cf65091c10b763 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step3_transformed.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f19d8f068afa4aa62fc04cfa0d2678e6bfe3f90c164a08f588bff9685854030 +size 661189 diff --git a/docs/low_precision_transformations/pipeline/img/step3_transformed.svg b/docs/low_precision_transformations/pipeline/img/step3_transformed.svg new file mode 100644 index 00000000000000..3b90c028118784 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/img/step3_transformed.svg @@ -0,0 +1 @@ +Dequantizations on branch #2INT8 ConvolutionFakeQuantizename: fakeQuantize1rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{u8} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input1{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.42667]Constant{f32} {1, 1, 1, 1}value: [0.42333]Constant{f32} {1, 1, 1, 1}value: [0.0]Constant{f32} {1, 1, 1, 1}value: [255.0]ResultConcatname: concat1rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true},Precisions{precisions: {u8}},QuantizationAlignment{value: false}{u8} {1, 6, 299, 299}FakeQuantizename: fakeQuantize2rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{u8} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input2{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: [-0.64]Constant{f32} {1, 1, 1, 1}value: [0.635]Constant{f32} {1, 1, 1, 1}value: [64]Constant{f32} {1, 1, 1, 1}value: [192]FakeQuantizename: fakeQuantize3rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}{u8} {1, 3, 299, 299}Precisions {precisions: {u8}}Parametername: input3{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}value: -1.28]Constant{f32} {1, 1, 1, 1}value: [12.7]Constant{f32} {1, 1, 1, 1}value: [0.0]Constant{f32} {1, 1, 1, 1}value: [255.0]ResultConcatname: concat2rt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true},Precisions {precisions: {u8}},QuantizationAlignment{value: true}{u8} {1, 6, 299, 299}AvgPoolname: maxPoolrt info: IntervalsAlignment{combined: { -1.28, 1.27 }, preferablePrecisions: {i8}}PrecisionPreserved{value: true}Precisions {precisions: {u8}}QuantizationAlignment{value: true}{u8} {1, 6, 299, 299}Convolutionname: convolutionin0: {f32}[1,6,7,7]: PerTensorQuantization, Precisions {precisions: {u8}}in1: {f32}[9,6,1,1]: Precisions {precisions: {i8}}{f32} {1, 6, 299, 299}Constant{i8} {9, 6, 1, 1}Convolutionname: convolution1{f32} {1, 9, 299, 299}Constant{f32} {9, 6, 1, 1}Dequantizations on branch #1Multiply{f32} {1, 6, 299, 299}Convert{f32} {1, 6, 299, 299}Constant{f32} {1, 6, 1, 1}Subtract{f32} {1, 6, 299, 299}Subtract{f32} {1, 6, 299, 299}Constant{u8} {1, 6, 1, 1}Constant{f32} {1, 6, 1, 1}Multiply{f32} {1, 6, 299, 299}Constant{f32} {1, 6, 1, 1}Subtract{f32} {9, 6, 1, 1}Constant{i8} {6, 1, 1, 1}Zero point on activationsZero point on weights \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/step1_prerequisites.md b/docs/low_precision_transformations/pipeline/step1_prerequisites.md new file mode 100644 index 00000000000000..03d8fb18cc1c70 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/step1_prerequisites.md @@ -0,0 +1,6 @@ +# OpenVINO™ LPT: step #1. Prerequisites transformations {#openvino_docs_IE_DG_lpt_step1_prerequisites} + +Prerequisites transformations are optional. The goal is prepare a model before to run other low precision transformations. Transformations don't operate with dequantization operations, don't update precisions. Transformations: +* [PullReshapeThroughDequantization](@ref openvino_docs_IE_DG_lpt_PullReshapeThroughDequantization) +* [PullTransposeThroughDequantization](@ref openvino_docs_IE_DG_lpt_PullTransposeThroughDequantization) +* [LinOpSequenceFusion](@ref openvino_docs_IE_DG_lpt_LinOpSequenceFusion) \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/step2_markup.md b/docs/low_precision_transformations/pipeline/step2_markup.md new file mode 100644 index 00000000000000..e3afbb5fe03e12 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/step2_markup.md @@ -0,0 +1,138 @@ +# OpenVINO™ LPT: step #2. Markup transformations {#openvino_docs_IE_DG_lpt_step2_markup} + +This step defines the most optimal `FakeQuantize` decomposition precisions for the best inference performance via operations markup with runtime attribute instances. Attributes are created for input & output ports and operations. Operation output port precisions are not changed in these transformations. Transformations order is important. A model markup low precision logic is decomposed and implemented into following common markup transformations (in usage order, order is important): +1. [MarkupCanBeQuantized](@ref openvino_docs_IE_DG_lpt_MarkupCanBeQuantized) +2. [MarkupPrecisions](@ref openvino_docs_IE_DG_lpt_MarkupPrecisions) +3. [MarkupPerTensorQuantization](@ref openvino_docs_IE_DG_lpt_MarkupPerTensorQuantization) +4. [MarkupAvgPoolPrecisionPreserved](@ref openvino_docs_IE_DG_lpt_MarkupAvgPoolPrecisionPreserved) +5. [PropagatePrecisions](@ref openvino_docs_IE_DG_lpt_PropagatePrecisions) +6. [AlignQuantizationIntervals](@ref openvino_docs_IE_DG_lpt_AlignQuantizationIntervals) +7. [AlignQuantizationParamters](@ref openvino_docs_IE_DG_lpt_AlignQuantizationParamters) + +
+Click to explore transformations and used attributes in one table + +| Transformation name | Create attributes | Use attributes | +|---------------------------------|-------------------------------|-------------------------------------------| +| MarkupCanBeQuantized | Precisions | | +| MarkupPrecisions | Precisions,PrecisionPreserved | | +| MarkupPerTensorQuantization | PerTensorQuantization | | +| MarkupAvgPoolPrecisionPreserved | AvgPoolPrecisionPreserved | Precisions, PrecisionPreserved | +| PropagatePrecisions | Precisions | Precisions, PrecisionPreserved | +| AlignQuantizationIntervals | IntervalsAlignment | PrecisionPreserved | +| AlignQuantizationParamters | QuantizationAlignment | PrecisionPreserved, PerTensorQuantization | + +
+ +Note, please, the same type attribute instances can be created in different transformations. This approach is result of transformation single-responsibility principle. For example `Precision` attribute instances are created in `MarkupCanBeQuantized` and `MarkupPrecisions` transformations but the creation reason is different. + +Common markup transformations can be decomposed to simpler utility markup transformations. Markup utility transformations (order is not important): +* [CreateAttribute](@ref openvino_docs_IE_DG_lpt_CreateAttribute) +* [CreatePrecisionsDependentAttribute](@ref openvino_docs_IE_DG_lpt_CreatePrecisionsDependentAttribute) +* [PropagateThroughPrecisionPreserved](@ref openvino_docs_IE_DG_lpt_PropagateThroughPrecisionPreserved) +* [PropagateToInput](@ref openvino_docs_IE_DG_lpt_PropagateToInput) +* [UpdateSharedPrecisionPreserved](@ref openvino_docs_IE_DG_lpt_UpdateSharedPrecisionPreserved) + +Let's explore all transformations and their relations in details on the same model: + +![](img/step2_markup_original.png) + +The original model key features: +* The first `concat1` concatenation operation has not quantized `convolution1` consumer. +* The second `concat2` concatenation operation has quantized `convolution2` consumer with requirements: 1) support `unsigned int8` on activations 2) per-tensor quantization. +* Between `concat2` concatenation operation and `Convolution` there is `AvgPool` operation which mathematically have to return `f32` tensor. But `MarkupAvgPoolPrecisionPreserved` transformation is active, which allows low precision after `AvgPool` transformation to propagate low precision tensor to the next consumer. + +Transformations are ran with parameters: + +@snippet snippets/lpt_mkldnn_plugin.cpp lpt_markup_pipeline + +## 1. MarkupCanBeQuantized +The transformation marks operations which can not be quantized. The transformation doesn't require any attributes before. + +Changes in example model after `MarkupCanBeQuantized` transformation: +* Not quantized `convolution1` operation is marked by `Precisions` attribute with empty values. This attribute allows to ignore not quantized operation by the next transformations. + +Result model: + +![MarkupCanBeQuantized](img/step2_markup1.png) + +> Model display features (here and below): +> 1. Added by current transformation attributes are marked in bold. +> 2. If attributes are not fit into one line, then one line consists only one attribute. + +## 2. MarkupPrecisions +The transformation is required and include two tasks: +1. Mark operation input ports (create `Precision` attribute instance) by provided restrictions: input port index and required precisions. Restrictions are provided as input argument in `ngraph::pass::low_precision::LowPrecision` constructor. +2. Mark precision preserved operations. + +The transformation doesn't require any attributes before. Changes in example model after `MarkupPrecisions` transformation: +* Both concatenation operations are marked as precision preserved operation. It allows to propagate precision via these operations. +* Quantized `convolution2` operation is marked by `Precisions` attribute with `u8` precision on activations and `i8` precisions on weights in accordance with provided restrictions. This attribute instance allows to specify which precisions are required for quantized `Convolution` operation. + +Result model: + +![MarkupPrecisions result](img/step2_markup2.png) + +## 3. MarkupPerTensorQuantization +The transformation is required and marks operations (create `PerTensorQuantization` attribute instance) by provided restrictions: operation which requires per-tensor quantization. The transformation doesn't require any attributes before. +Changes in example model after `MarkupPerTensorQuantization` transformation: +* both `Convolution` operations are marked by `PerTensorQuantization` + +Result model: + +![MarkupPerTensorQuantization result](img/step2_markup3.png) + +## 4. MarkupAvgPoolPrecisionPreserved +The transformation is optional. `MarkupAvgPoolPrecisionPreserved` marks `AvgPool` operations as precision preserved or not precision preserved. `AvgPool` operation is precision preserved if next not precision preserved operation can be inferred in low precision. In other words: `AvgPool` operations became precision preserved operations to speed up model inference. The transformation uses `PrecisionPreserved` attributes created before. The transformation is combined and uses: +* CreatePrecisionsDependentAttribute +* PropagateThroughPrecisionPreserved +* UpdateSharedPrecisionPreserved + +Changes in example model after `MarkupAvgPoolPrecisionPreserved` transformation: +* `AvgPool` operations are marked by `PrecisionPreserved` and `AvgPoolPrecisionPreserved` (not used below). + +Result model: + +![MarkupAvgPoolPrecisionPreserved](img/step2_markup4.png) + +## 5. PropagatePrecisions +The transformation is required. `PropagatePrecision` is a key transformation in markup pipeline which marks `FakeQuantize` output port precisions. The transformation uses `PrecisionPreserved` attribute instances which are created before. The transformation is combined and uses: +* CreateAttribute +* PropagateThroughPrecisionPreserved +* PropagateToInput + +Changes in example model after `PropagatePrecisions` transformation: +* All precision preserved operations are marked by `Precisions` attribute instance which defines required precision for the operation. +* `FakeQuantize` operation output ports are marked by `Precisions` attribute instances which defines target precision for decomposition. In sample model `FakeQuantize` operations have signed intervals but `Precisions` attributes initialized by `u8` (`unsigned int8`) values as result applied during transformations restrictions for `Convolution` operations. + +Result model: + +![PropagatePrecisions](img/step2_markup5.png) + +> `AlignQuantizationIntervals` and `AlignQuantizationParamters` transformations are required if model has quantized concatenation operations. + +## 6. AlignQuantizationIntervals +The transformation is required for models with quantized operation. The transformation marks `FakeQuantize` operation and precision preserved consumers to combine quantization information from different `FakeQuantize` operations for future quantization intervals alignment. The transformation is combined and uses: +* CreateAttribute +* PropagateThroughPrecisionPreserved + +Changes in example model after `AlignQuantizationIntervals` transformation: +* All `FakeQuantize` operation and theirs precision preserved consumers are marked by `IntervalsAlignment` attribute instance. + +Result model: + +![AlignQuantizationIntervals](img/step2_markup6.png) + +## 7. AlignQuantizationParamters +The transformation is required for models with quantized concatenation operation. The transformation marks `FakeQuantize` precision preserved consumers to align quantization intervals. The transformation is combined and uses: +* CreateAttribute +* PropagateThroughPrecisionPreserved +* UpdateSharedPrecisionPreserved + + +Changes in example model after `AlignQuantizationParamters` transformation: +* All `FakeQuantize` precision preserved consumers are marked by `QuantizationAlignment` attribute instance. `convolution1` input ports are marked by `Precisions` attribute instances with empty precisions collection. As result `convolution1` operation was detected as not quantized and `QuantizationAlignment` attribute default value `false` was not changed. `convolution2` input ports are marked by `Precisions` attribute instances with not empty precisions collection. As result `convolution2` operation was detected as quantized with `PerTensorQuantization` attribute and `QuantizationAlignment` attribute default value was changed to `true`. + +Final model: + +![AlignQuantizationParamters](img/step2_markup7.png) diff --git a/docs/low_precision_transformations/pipeline/step3_main.md b/docs/low_precision_transformations/pipeline/step3_main.md new file mode 100644 index 00000000000000..a42b9fff22d406 --- /dev/null +++ b/docs/low_precision_transformations/pipeline/step3_main.md @@ -0,0 +1,49 @@ +# OpenVINO™ LPT: step #3. Main transformations {#openvino_docs_IE_DG_lpt_step3_main} + +Main transformations are the most part of low precision transformations. Transformations operate with dequantization operations. Transformations: +* [AddTransformation](@ref openvino_docs_IE_DG_lpt_AddTransformation) +* [AvgPoolTransformation](@ref openvino_docs_IE_DG_lpt_AvgPoolTransformation) +* [ClampTransformation](@ref openvino_docs_IE_DG_lpt_AvgPoolTransformation) +* [ConcatTransformation](@ref openvino_docs_IE_DG_lpt_ConcatTransformation) +* [ConvolutionTransformation](@ref openvino_docs_IE_DG_lpt_ConvolutionTransformation) +* [ConvolutionBackpropDataTransformation](@ref openvino_docs_IE_DG_lpt_ConvolutionBackpropDataTransformation) +* [DepthToSpaceTransformation](@ref openvino_docs_IE_DG_lpt_DepthToSpaceTransformation) +* [FakeQuantizeDecompositionTransformation](@ref openvino_docs_IE_DG_lpt_FakeQuantizeDecompositionTransformation) +* [FakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FakeQuantizeTransformation) +* [InterpolateTransformation](@ref openvino_docs_IE_DG_lpt_InterpolateTransformation) +* [GroupConvolutionTransformation](@ref openvino_docs_IE_DG_lpt_GroupConvolutionTransformation) +* [MatMulTransformation](@ref openvino_docs_IE_DG_lpt_MatMulTransformation) +* [MaxPoolTransformation](@ref openvino_docs_IE_DG_lpt_MaxPoolTransformation) +* [MultiplyTransformation](@ref openvino_docs_IE_DG_lpt_MultiplyTransformation) +* [MVNTransformation](@ref openvino_docs_IE_DG_lpt_MVNTransformation) +* [NormalizeL2Transformation](@ref openvino_docs_IE_DG_lpt_NormalizeL2Transformation) +* [PReluTransformation](@ref openvino_docs_IE_DG_lpt_PReluTransformation) +* [ReduceMaxTransformation](@ref openvino_docs_IE_DG_lpt_ReduceMaxTransformation) +* [ReduceMeanTransformation](@ref openvino_docs_IE_DG_lpt_ReduceMeanTransformation) +* [ReduceMinTransformation](@ref openvino_docs_IE_DG_lpt_ReduceMinTransformation) +* [ReduceSumTransformation](@ref openvino_docs_IE_DG_lpt_ReduceSumTransformation) +* [ReluTransformation](@ref openvino_docs_IE_DG_lpt_ReluTransformation) +* [ReshapeTransformation](@ref openvino_docs_IE_DG_lpt_ReshapeTransformation) +* [SqueezeTransformation](@ref openvino_docs_IE_DG_lpt_SqueezeTransformation) +* [ShuffleChannelsTransformation](@ref openvino_docs_IE_DG_lpt_ShuffleChannelsTransformation) +* [SplitTransformation](@ref openvino_docs_IE_DG_lpt_SplitTransformation) +* [StridedSliceTransformation](@ref openvino_docs_IE_DG_lpt_StridedSliceTransformation) +* [TransposeTransformation](@ref openvino_docs_IE_DG_lpt_TransposeTransformation) +* [UnsqueezeTransformation](@ref openvino_docs_IE_DG_lpt_UnsqueezeTransformation) +* [VariadicSplitTransformation](@ref openvino_docs_IE_DG_lpt_VariadicSplitTransformation) + +Let's explore some main transformations on example model. Original model: + +![Original model](img/step3_original.png) + +Result model after main transformations: + +![Original model](img/step3_transformed.png) + +Changes in example model after main transformation: +* All `FakeQuantize` operations (`fakeQuantize1`, `fakeQuantize2` and `fakeQuantize3`) were decomposed: + - original `FakeQuantize` operations were replaced with new operations with other output intervals and output port precision, + - dequantization operations. +* Dequantization operations were 'moved' via precision preserved (`concat1` and `concat2`) and quantized operations (`convolution2`) + +> Note, left branch (branch #1) doesn't required per-tensor quantization. As result, `fakeQuantize1` output interval is [0, 255]. But quantized `convolution2` required per-tensor quantization on the right branch (branch #2). As result, all connected `FakeQuantize` interval operations (`fakeQuantize1` and `fakeQuantize2`) are aligned to have per-tensor quantization after concatenation (`concat2`) operation. \ No newline at end of file diff --git a/docs/low_precision_transformations/pipeline/step4_cleanup.md b/docs/low_precision_transformations/pipeline/step4_cleanup.md new file mode 100644 index 00000000000000..6ffd0db25168bd --- /dev/null +++ b/docs/low_precision_transformations/pipeline/step4_cleanup.md @@ -0,0 +1,8 @@ +# OpenVINO™ LPT: step #4. Cleanup transformations {#openvino_docs_IE_DG_lpt_step4_cleanup} + +* [FoldConvertTransformation](@ref openvino_docs_IE_DG_lpt_FoldConvertTransformation) +* [FoldFakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FoldFakeQuantizeTransformation) +* [FuseConvertTransformation](@ref openvino_docs_IE_DG_lpt_FuseConvertTransformation) +* [FuseMultiplyToFakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FuseMultiplyToFakeQuantizeTransformation) +* [FuseSubtractToFakeQuantizeTransformation](@ref openvino_docs_IE_DG_lpt_FuseSubtractToFakeQuantizeTransformation) +* [MultiplyToGroupConvolutionTransformation](@ref openvino_docs_IE_DG_lpt_MultiplyToGroupConvolutionTransformation) \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step1_prerequisites/lin_op_sequence_fusion.md b/docs/low_precision_transformations/transformations/step1_prerequisites/lin_op_sequence_fusion.md new file mode 100644 index 00000000000000..dae36f020c0684 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step1_prerequisites/lin_op_sequence_fusion.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: LinOpSequenceFusion {#openvino_docs_IE_DG_lpt_LinOpSequenceFusion} diff --git a/docs/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md b/docs/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md new file mode 100644 index 00000000000000..72c7134d95bc16 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: PullReshapeThroughDequantization {#openvino_docs_IE_DG_lpt_PullReshapeThroughDequantization} diff --git a/docs/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md b/docs/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md new file mode 100644 index 00000000000000..a341d8287db537 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: PullTransposeThroughDequantization {#openvino_docs_IE_DG_lpt_PullTransposeThroughDequantization} diff --git a/docs/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md b/docs/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md new file mode 100644 index 00000000000000..4ae73a923529c0 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: AlignQuantizationIntervals {#openvino_docs_IE_DG_lpt_AlignQuantizationIntervals} \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step2_markup/align_quantization_paramters.md b/docs/low_precision_transformations/transformations/step2_markup/align_quantization_paramters.md new file mode 100644 index 00000000000000..9bbe02c4de347f --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/align_quantization_paramters.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: AlignQuantizationParamters {#openvino_docs_IE_DG_lpt_AlignQuantizationParamters} \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step2_markup/create_attribute.md b/docs/low_precision_transformations/transformations/step2_markup/create_attribute.md new file mode 100644 index 00000000000000..320a4c26a94f0d --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/create_attribute.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: CreateAttribute {#openvino_docs_IE_DG_lpt_CreateAttribute} diff --git a/docs/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md b/docs/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md new file mode 100644 index 00000000000000..5870d43be2ed64 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: CreatePrecisionsDependentAttribute {#openvino_docs_IE_DG_lpt_CreatePrecisionsDependentAttribute} diff --git a/docs/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md b/docs/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md new file mode 100644 index 00000000000000..dc2ca3c217005c --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MarkupAvgPoolPrecisionPreserved {#openvino_docs_IE_DG_lpt_MarkupAvgPoolPrecisionPreserved} diff --git a/docs/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md b/docs/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md new file mode 100644 index 00000000000000..e404f68cf87120 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MarkupCanBeQuantized {#openvino_docs_IE_DG_lpt_MarkupCanBeQuantized} \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md b/docs/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md new file mode 100644 index 00000000000000..9ef649a9fa5818 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MarkupPerTensorQuantization {#openvino_docs_IE_DG_lpt_MarkupPerTensorQuantization} diff --git a/docs/low_precision_transformations/transformations/step2_markup/markup_precisions.md b/docs/low_precision_transformations/transformations/step2_markup/markup_precisions.md new file mode 100644 index 00000000000000..9609dc718b5905 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/markup_precisions.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MarkupPrecisions {#openvino_docs_IE_DG_lpt_MarkupPrecisions} diff --git a/docs/low_precision_transformations/transformations/step2_markup/propagate_precisions.md b/docs/low_precision_transformations/transformations/step2_markup/propagate_precisions.md new file mode 100644 index 00000000000000..1da2e6d9d14d77 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/propagate_precisions.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: PropagatePrecisions {#openvino_docs_IE_DG_lpt_PropagatePrecisions} diff --git a/docs/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md b/docs/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md new file mode 100644 index 00000000000000..d3f306d32f0721 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: PropagateThroughPrecisionPreserved {#openvino_docs_IE_DG_lpt_PropagateThroughPrecisionPreserved} diff --git a/docs/low_precision_transformations/transformations/step2_markup/propagate_to_input.md b/docs/low_precision_transformations/transformations/step2_markup/propagate_to_input.md new file mode 100644 index 00000000000000..7146608be7dbe9 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/propagate_to_input.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: PropagateToInput {#openvino_docs_IE_DG_lpt_PropagateToInput} diff --git a/docs/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md b/docs/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md new file mode 100644 index 00000000000000..5d01c76c51a928 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: UpdateSharedPrecisionPreserved {#openvino_docs_IE_DG_lpt_UpdateSharedPrecisionPreserved} diff --git a/docs/low_precision_transformations/transformations/step3_main/activation/clamp.md b/docs/low_precision_transformations/transformations/step3_main/activation/clamp.md new file mode 100644 index 00000000000000..dccf867695fc18 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/activation/clamp.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ClampTransformation {#openvino_docs_IE_DG_lpt_ClampTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/activation/prelu.md b/docs/low_precision_transformations/transformations/step3_main/activation/prelu.md new file mode 100644 index 00000000000000..b81481475b69de --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/activation/prelu.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: PReluTransformation {#openvino_docs_IE_DG_lpt_PReluTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/activation/relu.md b/docs/low_precision_transformations/transformations/step3_main/activation/relu.md new file mode 100644 index 00000000000000..378fe3105e3c64 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/activation/relu.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ReluTransformation {#openvino_docs_IE_DG_lpt_ReluTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/arithmetic/add.md b/docs/low_precision_transformations/transformations/step3_main/arithmetic/add.md new file mode 100644 index 00000000000000..367cdcdeeed532 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/arithmetic/add.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: AddTransformation {#openvino_docs_IE_DG_lpt_AddTransformation} \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md b/docs/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md new file mode 100644 index 00000000000000..cf1ba307153043 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MultiplyTransformation {#openvino_docs_IE_DG_lpt_MultiplyTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/convolution.md b/docs/low_precision_transformations/transformations/step3_main/convolution/convolution.md new file mode 100644 index 00000000000000..aa1a0958f428cc --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/convolution.md @@ -0,0 +1,32 @@ +# OpenVINO™ Low Precision Transformations: ConvolutionTransformation {#openvino_docs_IE_DG_lpt_ConvolutionTransformation} + +The transformation propagate dequantization operations on activations and on weights through `Convolution` operation. The transformation supports several weights quantization approaches: +* quantized weights in low precision with dequantization operations, +* weights in original precision with `FakeQuantize` operation. + +Result dequantization `Multiply` constant value *result* is calculated as multiplication for dequantization `Multiply` constant value on activations *a* and dequantization `Multiply` constant value on weights *b* : + +\f[ +result_{i} = a_{i} \cdot b_{i} +\f] + +## Limitations +* `Subtract` dequantization operations on activations and weights are not propagated and . +* Dequantization on activations have to be per-tensor. It means that dequantization `Multiply` constant value on activations has to be scalar. + +## Subgraph before transformation + +### Quantized weights in low precision with dequantization operations +The subgraph with quantized `Convolution` before transformation with quantized weights in low precision constant and dequantization operations: + +![Convolution before](img/fq_and_convolution.common.png) + +### Weights in original precision with FakeQuantize operation +The subgraph with quantized `Convolution` before transformation with weights in original precision and `FakeQuantize` operation: + +![Convolution before](img/fq_fq_and_convolution.common.png) + +## Subgraph after transformation +The subgraph with `Convolution` operation after the transformation: + +![Convolution after](img/fq_and_convolution.transformed.png) \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md b/docs/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md new file mode 100644 index 00000000000000..1f984bcc780d0c --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ConvolutionBackpropDataTransformation {#openvino_docs_IE_DG_lpt_ConvolutionBackpropDataTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md b/docs/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md new file mode 100644 index 00000000000000..d8f082d5a61c5b --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: GroupConvolutionTransformation {#openvino_docs_IE_DG_lpt_GroupConvolutionTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.png b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.png new file mode 100644 index 00000000000000..7b686f72935d8e --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e5bfd5ca52ea6660e0ff67afefc98d64941eab6e8b464116242a6e044f318f5 +size 207602 diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.svg b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.svg new file mode 100644 index 00000000000000..f45ca77e426854 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.common.svg @@ -0,0 +1 @@ +FP32 Convolution with quantized weightsQuantized weightsDequantization on activationsConvolution{f32} {1, 6, 299, 299}Constant{i8} {6, 3, 1, 1}Dequantization on weightsMultiply{f32} {6, 3, 1, 1}Convert{f32} {6, 3, 1, 1}Constant{f32} {6, 1, 1, 1}Subtract{f32} {6, 3, 1, 1}Constant{i8} {6, 1, 1, 1}Convert{f32} {6, 1, 1, 1}Multiply{f32} {1, 3, 299, 299}Convert{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}Subtract{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.png b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.png new file mode 100644 index 00000000000000..63fa693e6b0a76 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:756c225ee8e1da046e0210bf0696185b3939378f10b4ed6d757e43070d379436 +size 135804 diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.svg b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.svg new file mode 100644 index 00000000000000..57bab915e3ac3b --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_and_convolution.transformed.svg @@ -0,0 +1 @@ +DequantizationINT8 Convolution with zero pointSubtract{f32} {1, 3, 299, 299}Multiply{f32} {1, 6, 299, 299}Convolution{f32} {1, 6, 299, 299}Constant{i8} {6, 3, 1, 1}Constant{u8} {}Constant{f32} {1, 6, 1, 1}Subtract{f32} {1, 3, 299, 299}Constant{i8} {6, 1, 1, 1}Zero point on activationsZero point on weights \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.png b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.png new file mode 100644 index 00000000000000..b887ab2b7642b1 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08d4116490ab329636fced24c292636fbe00856976b19e5219e433bc2c6e4e16 +size 190590 diff --git a/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.svg b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.svg new file mode 100644 index 00000000000000..c475faa62ac6b7 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/convolution/img/fq_fq_and_convolution.common.svg @@ -0,0 +1 @@ +FP32 Convolution with quantized weightsNot quantized weights in original precisionConvolution{f32} {1, 6, 299, 299}FakeQuantizelevels: 255{f32} {6, 3, 299, 299}Constant{f32} {6, 3, 1, 1}Constant{f32} {1, 1, 1, 1}Value: [-12.8]Constant{f32} {1, 1, 1, 1}Value: [12.7]Constant{f32} {1, 1, 1, 1}Value: [-12.8]Constant{f32} {1, 1, 1, 1}Value: [12.7]Dequantization on activationsMultiply{f32} {1, 3, 299, 299}Convert{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1}Subtract{f32} {1, 3, 299, 299}Constant{f32} {1, 1, 1, 1} \ No newline at end of file diff --git a/docs/low_precision_transformations/transformations/step3_main/image/interpolate.md b/docs/low_precision_transformations/transformations/step3_main/image/interpolate.md new file mode 100644 index 00000000000000..1159413827ed7a --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/image/interpolate.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: InterpolateTransformation {#openvino_docs_IE_DG_lpt_InterpolateTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md b/docs/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md new file mode 100644 index 00000000000000..39675443de4cc1 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MatMulTransformation {#openvino_docs_IE_DG_lpt_MatMulTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/movement/concat.md b/docs/low_precision_transformations/transformations/step3_main/movement/concat.md new file mode 100644 index 00000000000000..57739bc3bc53f4 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/movement/concat.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ConcatTransformation {#openvino_docs_IE_DG_lpt_ConcatTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md b/docs/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md new file mode 100644 index 00000000000000..e4270a58427f2c --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: DepthToSpaceTransformation {#openvino_docs_IE_DG_lpt_DepthToSpaceTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md b/docs/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md new file mode 100644 index 00000000000000..d79cda0d163d14 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ShuffleChannelsTransformation {#openvino_docs_IE_DG_lpt_ShuffleChannelsTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/movement/split.md b/docs/low_precision_transformations/transformations/step3_main/movement/split.md new file mode 100644 index 00000000000000..e0095b4b3233c2 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/movement/split.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: SplitTransformation {#openvino_docs_IE_DG_lpt_SplitTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/movement/strided_slice.md b/docs/low_precision_transformations/transformations/step3_main/movement/strided_slice.md new file mode 100644 index 00000000000000..9c53b5ec74936b --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/movement/strided_slice.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: StridedSliceTransformation {#openvino_docs_IE_DG_lpt_StridedSliceTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/movement/transpose.md b/docs/low_precision_transformations/transformations/step3_main/movement/transpose.md new file mode 100644 index 00000000000000..6b0046e202039b --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/movement/transpose.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: TransposeTransformation {#openvino_docs_IE_DG_lpt_TransposeTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/movement/variadic_split.md b/docs/low_precision_transformations/transformations/step3_main/movement/variadic_split.md new file mode 100644 index 00000000000000..3eaaff0c42508c --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/movement/variadic_split.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: VariadicSplitTransformation {#openvino_docs_IE_DG_lpt_VariadicSplitTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/normalization/mvn.md b/docs/low_precision_transformations/transformations/step3_main/normalization/mvn.md new file mode 100644 index 00000000000000..d366da1065a8b5 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/normalization/mvn.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MVNTransformation {#openvino_docs_IE_DG_lpt_MVNTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md b/docs/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md new file mode 100644 index 00000000000000..1e6ade2e9b2bd8 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: NormalizeL2Transformation {#openvino_docs_IE_DG_lpt_NormalizeL2Transformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md b/docs/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md new file mode 100644 index 00000000000000..8f83b13997734d --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: AvgPoolTransformation {#openvino_docs_IE_DG_lpt_AvgPoolTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/pooling/max_pool.md b/docs/low_precision_transformations/transformations/step3_main/pooling/max_pool.md new file mode 100644 index 00000000000000..a7180809ca202a --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/pooling/max_pool.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MaxPoolTransformation {#openvino_docs_IE_DG_lpt_MaxPoolTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md b/docs/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md new file mode 100644 index 00000000000000..9d79c84d800e67 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: FakeQuantizeTransformation {#openvino_docs_IE_DG_lpt_FakeQuantizeTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md b/docs/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md new file mode 100644 index 00000000000000..bb270489a97326 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: FoldFakeQuantizeTransformation {#openvino_docs_IE_DG_lpt_FoldFakeQuantizeTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md new file mode 100644 index 00000000000000..f49d8856af29eb --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ReduceMaxTransformation {#openvino_docs_IE_DG_lpt_ReduceMaxTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md new file mode 100644 index 00000000000000..0cbbb7414342fe --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ReduceMeanTransformation {#openvino_docs_IE_DG_lpt_ReduceMeanTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md new file mode 100644 index 00000000000000..dce8c328441710 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ReduceMinTransformation {#openvino_docs_IE_DG_lpt_ReduceMinTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md new file mode 100644 index 00000000000000..bab335d0f9d3c4 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ReduceSumTransformation {#openvino_docs_IE_DG_lpt_ReduceSumTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/shape/reshape.md b/docs/low_precision_transformations/transformations/step3_main/shape/reshape.md new file mode 100644 index 00000000000000..6594980e7c1f84 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/shape/reshape.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: ReshapeTransformation {#openvino_docs_IE_DG_lpt_ReshapeTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/shape/squeeze.md b/docs/low_precision_transformations/transformations/step3_main/shape/squeeze.md new file mode 100644 index 00000000000000..e877bef28de374 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/shape/squeeze.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: SqueezeTransformation {#openvino_docs_IE_DG_lpt_SqueezeTransformation} diff --git a/docs/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md b/docs/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md new file mode 100644 index 00000000000000..a6a6a47603ac03 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: UnsqueezeTransformation {#openvino_docs_IE_DG_lpt_UnsqueezeTransformation} diff --git a/docs/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md b/docs/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md new file mode 100644 index 00000000000000..8dc01bb9aabde5 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: FakeQuantizeDecompositionTransformation {#openvino_docs_IE_DG_lpt_FakeQuantizeDecompositionTransformation} diff --git a/docs/low_precision_transformations/transformations/step4_cleanup/fold_convert.md b/docs/low_precision_transformations/transformations/step4_cleanup/fold_convert.md new file mode 100644 index 00000000000000..c99f8a815125dd --- /dev/null +++ b/docs/low_precision_transformations/transformations/step4_cleanup/fold_convert.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: FoldConvertTransformation {#openvino_docs_IE_DG_lpt_FoldConvertTransformation} diff --git a/docs/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md b/docs/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md new file mode 100644 index 00000000000000..744d25709fdd19 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: FuseConvertTransformation {#openvino_docs_IE_DG_lpt_FuseConvertTransformation} diff --git a/docs/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md b/docs/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md new file mode 100644 index 00000000000000..62e7b6cb3da661 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: FuseMultiplyToFakeQuantizeTransformation {#openvino_docs_IE_DG_lpt_FuseMultiplyToFakeQuantizeTransformation} diff --git a/docs/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md b/docs/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md new file mode 100644 index 00000000000000..7c0f38c07789ae --- /dev/null +++ b/docs/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: FuseSubtractToFakeQuantizeTransformation {#openvino_docs_IE_DG_lpt_FuseSubtractToFakeQuantizeTransformation} diff --git a/docs/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md b/docs/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md new file mode 100644 index 00000000000000..64dd7b9d414e20 --- /dev/null +++ b/docs/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md @@ -0,0 +1 @@ +# OpenVINO™ Low Precision Transformations: MultiplyToGroupConvolutionTransformation {#openvino_docs_IE_DG_lpt_MultiplyToGroupConvolutionTransformation}