Group Common optimization passes

group ie_transformation_common_api

A set of common optimization passes.

class AddTransformation : public ov::pass::low_precision::EltwiseBaseTransformation
#include <add.hpp>

AddTransformation propagates dequantization subtraction from one input branch to another and propagates dequantization multiplication from the same branch through Add operation.

For more details about the transformation, refer to AddTransformation page in the Inference Engine Developer Guide.

class AlignQuantizationIntervals : public ov::pass::ModelPass
#include <align_quantization_intervals.hpp>

AlignQuantizationIntervals transformation marks precision preserved operations subgraph by IntervalsAlignmentAttribute after FakeQuantize operations.

For more details about the transformation, refer to AlignQuantizationIntervals page in the Inference Engine Developer Guide.

class AlignQuantizationParameters : public ov::pass::ModelPass
#include <align_quantization_parameters.hpp>

AlignQuantizationParameters transformation marks precision preserved operations subgraph by QuantizationAlignmentAttribute attribute after FakeQuantize operations.

For more details about the transformation, refer to AlignQuantizationParameters page in the Inference Engine Developer Guide.

class AvgPoolTransformation : public ov::pass::low_precision::LayerTransformation
#include <avg_pool.hpp>

AvgPoolTransformation propagates dequantization operations through AvgPool operation.

For more details about the transformation, refer to AvgPoolTransformation page in the Inference Engine Developer Guide.

class BatchToSpaceTransformation : public ov::pass::low_precision::LayerTransformation
#include <batch_to_space.hpp>

BatchToSpaceTransformation propagates dequantization operations through BatchToSpace operation.

For more details about the transformation, refer to BatchToSpaceTransformation page in the Inference Engine Developer Guide.

class ClampTransformation : public ov::pass::low_precision::LayerTransformation
#include <clamp.hpp>

ClampTransformation propagates dequantization operations through Clamp operation.

For more details about the transformation, refer to ClampTransformation page in the Inference Engine Developer Guide.

class CleanupTransformation : public ov::pass::low_precision::LayerTransformation
#include <cleanup_transformation.hpp>

Base class for cleanup low precision transformation.

Subclassed by ov::pass::low_precision::EliminateFakeQuantizeTransformation, ov::pass::low_precision::FoldConvertTransformation, ov::pass::low_precision::FuseConvertTransformation, ov::pass::low_precision::FuseElementwiseToFakeQuantizeTransformation, ov::pass::low_precision::MultiplyToGroupConvolutionTransformation

class ConcatTransformation : public ov::pass::low_precision::LayerTransformation
#include <concat.hpp>

ConcatTransformation propagates dequantization operations through Concat operation.

For more details about the transformation, refer to ConcatTransformation page in the Inference Engine Developer Guide.

class ConvertSubtractConstant : public ov::pass::MatcherPass
#include <convert_subtract_constant.hpp>

ConvertSubtractConstant marks Convert operations on constant subgraph by DISABLED_CONSTANT_FOLDING attribute to prevent constant folding.

For more details about the transformation, refer to ConvertSubtractConstant page in the Inference Engine Developer Guide.

class ConvolutionTransformation : public ov::pass::low_precision::WeightableLayerTransformation
#include <convolution.hpp>

ConvolutionTransformation propagates dequantization operations through Convolution operation.

For more details about the transformation, refer to ConvolutionTransformation page in the Inference Engine Developer Guide.

Subclassed by ov::pass::low_precision::GroupConvolutionTransformation

class ConvolutionBackpropDataTransformation : public ov::pass::low_precision::WeightableLayerTransformation
#include <convolution_backprop_data.hpp>

ConvolutionBackpropDataTransformation propagates dequantization operations through ConvolutionBackpropData operation.

For more details about the transformation, refer to ConvolutionBackpropDataTransformation page in the Inference Engine Developer Guide.

template<typename AttributeType, typename OperationType = ov::pass::pattern::op::Label>
class CreateAttribute : public ov::pass::low_precision::BaseMatcherPass
#include <create_attribute.hpp>

CreateAttribute transformation marks OperationType operations by AttributeType attribute.

For more details about the transformation, refer to CreateAttribute page in the Inference Engine Developer Guide.

template<typename AttributeType, typename OperationType>
class CreatePrecisionsDependentAttribute : public ov::pass::MatcherPass
#include <create_precisions_dependent_attribute.hpp>

CreatePrecisionsDependentAttribute transformation marks OperationType operations by PrecisionPreservedAttribute and AttributeType attributes with the same shared part.

For more details about the transformation, refer to CreatePrecisionsDependentAttribute page in the Inference Engine Developer Guide.

class DepthToSpaceTransformation : public ov::pass::low_precision::TransparentBaseTransformation
#include <depth_to_space.hpp>

DepthToSpaceTransformation propagates dequantization operations through DepthToSpace operation.

For more details about the transformation, refer to DepthToSpaceTransformation page in the Inference Engine Developer Guide.

class EliminateFakeQuantizeTransformation : public ov::pass::low_precision::CleanupTransformation
#include <eliminate_fake_quantize.hpp>

EliminateFakeQuantizeTransformation removes FakeQuantize operations.

For more details about the transformation, refer to EliminateFakeQuantizeTransformation page in the Inference Engine Developer Guide.

class EltwiseBaseTransformation : public ov::pass::low_precision::LayerTransformation
#include <eltwise_base_transformation.hpp>

EltwiseBaseTransformation is base class for element-wise LPT transformations.

Subclassed by ov::pass::low_precision::AddTransformation, ov::pass::low_precision::MultiplyPartialTransformation

class FakeQuantizeTransformation : public ov::pass::low_precision::LayerTransformation
#include <fake_quantize.hpp>

FakeQuantizeTransformation fuses dequantization operations into FakeQuantize operation.

For more details about the transformation, refer to FakeQuantizeTransformation page in the Inference Engine Developer Guide.

class FakeQuantizeDecompositionTransformation : public ov::pass::low_precision::LayerTransformation
#include <fake_quantize_decomposition.hpp>

FakeQuantizeDecompositionTransformation decomposes FakeQuantize operations to quantize (FakeQuantize with changes output intervals and low precision output type) and dequantize operations.

For more details about the transformation, refer to FakeQuantizeDecompositionTransformation page in the Inference Engine Developer Guide.

class FoldConvertTransformation : public ov::pass::low_precision::CleanupTransformation
#include <fold_convert.hpp>

FoldConvertTransformation evaluates Convert operation on Subtract constant subgraph. Important notice: this transformation ignores DisableConstantFolding runtime attribute.

For more details about the transformation, refer to FoldConvertTransformation page in the Inference Engine Developer Guide.

class FoldFakeQuantizeTransformation : public ov::pass::low_precision::LayerTransformation
#include <fold_fake_quantize.hpp>

FoldFakeQuantizeTransformation evaluate FakeQuantize operations.

For more details about the transformation, refer to FoldFakeQuantizeTransformation page in the Inference Engine Developer Guide.

class FuseConvertTransformation : public ov::pass::low_precision::CleanupTransformation
#include <fuse_convert.hpp>

FuseConvertTransformation fuses Convert operation with Multiply, Subtract or Add operations.

For more details about the transformation, refer to FuseConvertTransformation page in the Inference Engine Developer Guide.

class FuseElementwiseToFakeQuantizeTransformation : public ov::pass::low_precision::CleanupTransformation
#include <fuse_elementwise_to_fake_quantize.hpp>

Base class for fuse elementwise to FakeQuantize low precision transformation.

Subclassed by ov::pass::low_precision::FuseMultiplyToFakeQuantizeTransformation, ov::pass::low_precision::FuseSubtractToFakeQuantizeTransformation

class FuseMultiplyToFakeQuantizeTransformation : public ov::pass::low_precision::FuseElementwiseToFakeQuantizeTransformation
#include <fuse_multiply_to_fake_quantize.hpp>

FuseMultiplyToFakeQuantizeTransformation fuses Multiply operation to FakeQuantize.

For more details about the transformation, refer to FuseMultiplyToFakeQuantizeTransformation page in the Inference Engine Developer Guide.

class FuseSubtractToFakeQuantizeTransformation : public ov::pass::low_precision::FuseElementwiseToFakeQuantizeTransformation
#include <fuse_subtract_to_fake_quantize.hpp>

FuseSubtractToFakeQuantizeTransformation fuses Subtract operation to FakeQuantize.

For more details about the transformation, refer to FuseSubtractToFakeQuantizeTransformation page in the Inference Engine Developer Guide.

class GroupConvolutionTransformation : public ov::pass::low_precision::ConvolutionTransformation
#include <group_convolution.hpp>

GroupConvolutionTransformation propagates dequantization operations through GroupConvolution operation.

For more details about the transformation, refer to GroupConvolutionTransformation page in the Inference Engine Developer Guide.

class InterpolateTransformation : public ov::pass::low_precision::LayerTransformation
#include <interpolate.hpp>

InterpolateTransformation propagates dequantization operations through Interpolate operation.

For more details about the transformation, refer to InterpolateTransformation page in the Inference Engine Developer Guide.

class LayerTransformation : public ov::pass::MatcherPass
#include <layer_transformation.hpp>

Base class for low precision transformation.

Subclassed by ov::pass::low_precision::AssignAndReadValueTransformation, ov::pass::low_precision::AvgPoolTransformation, ov::pass::low_precision::BatchToSpaceTransformation, ov::pass::low_precision::ClampTransformation, ov::pass::low_precision::CleanupTransformation, ov::pass::low_precision::ConcatTransformation, ov::pass::low_precision::ConvertTransformation, ov::pass::low_precision::EltwiseBaseTransformation, ov::pass::low_precision::FakeQuantizeDecompositionTransformation, ov::pass::low_precision::FakeQuantizeTransformation, ov::pass::low_precision::FoldFakeQuantizeTransformation, ov::pass::low_precision::GatherTransformation, ov::pass::low_precision::InterpolateTransformation, ov::pass::low_precision::MVNTransformation, ov::pass::low_precision::MatMulTransformation, ov::pass::low_precision::MaxPoolTransformation, ov::pass::low_precision::MoveFakeQuantize, ov::pass::low_precision::NormalizeL2Transformation, ov::pass::low_precision::PReluTransformation, ov::pass::low_precision::PadTransformation, ov::pass::low_precision::RecurrentCellTransformation, ov::pass::low_precision::ReduceBaseTransformation, ov::pass::low_precision::ReluTransformation, ov::pass::low_precision::ReshapeTransformation, ov::pass::low_precision::ShuffleChannelsTransformation, ov::pass::low_precision::SpaceToBatchTransformation, ov::pass::low_precision::SplitTransformation, ov::pass::low_precision::SqueezeTransformation, ov::pass::low_precision::StridedSliceTransformation, ov::pass::low_precision::SubtractTransformation, ov::pass::low_precision::TransparentBaseTransformation, ov::pass::low_precision::TransposeTransformation, ov::pass::low_precision::UnsqueezeTransformation, ov::pass::low_precision::WeightableLayerTransformation

class Params
#include <layer_transformation.hpp>
class PrecisionDetails
#include <layer_transformation.hpp>
class MarkupAvgPoolPrecisionPreserved : public ov::pass::ModelPass
#include <markup_avg_pool_precision_preserved.hpp>

MarkupAvgPoolPrecisionPreserved transformation marks AvgPool operations as precision preserved or not.

For more details about the transformation, refer to MarkupAvgPoolPrecisionPreserved page in the Inference Engine Developer Guide.

class MarkupBias : public ov::pass::MatcherPass
#include <markup_bias.hpp>

MarkupBias transformation marks biases after target layers.

For more details about the transformation, refer to MarkupBias page in the Inference Engine Developer Guide.

class MarkupCanBeQuantized : public ov::pass::ModelPass
#include <markup_can_be_quantized.hpp>

MarkupCanBeQuantized transformation marks Convolution, ConvolutionBackpropData, GroupConvolution and Concat operations as able to be quantized or not. If an operation is not quantized, then PrecisionsAttribute attribute instance is created with empty precisions.

For more details about the transformation, refer to MarkupCanBeQuantized page in the Inference Engine Developer Guide.

class MarkupPrecisions : public ov::pass::ModelPass
#include <markup_precisions.hpp>

MarkupPrecisions transformation marks: 1) not supported operations by PrecisionsAttribute attribute with empty precisions, 2) operations with required precisions by PrecisionsAttribute attribute according to the provided restrictions, 3) precision preserved operations by PrecisionPreservedAttribute attribute.

For more details about the transformation, refer to MarkupPrecisions page in the Inference Engine Developer Guide.

class Restriction
#include <markup_precisions.hpp>
class RestrictionByVersion
#include <markup_precisions.hpp>
class MarkupQuantizationGranularity : public ov::pass::ModelPass
#include <markup_quantization_granularity.hpp>

MarkupPerTensorQuantization transformation marks operations as required per-tensor quantization according to the provided restrictions.

For more details about the transformation, refer to MarkupPerTensorQuantization page in the Inference Engine Developer Guide.

class PerTensorQuantization
#include <markup_quantization_granularity.hpp>
class MatMulTransformation : public ov::pass::low_precision::LayerTransformation
#include <mat_mul.hpp>

MatMulTransformation propagates dequantization operations through MatMul operation.

For more details about the transformation, refer to MatMulTransformation page in the Inference Engine Developer Guide.

class MaxPoolTransformation : public ov::pass::low_precision::LayerTransformation
#include <max_pool.hpp>

MaxPoolTransformation propagates dequantization operations through MaxPool operation.

For more details about the transformation, refer to MaxPoolTransformation page in the Inference Engine Developer Guide.

class MultiplyTransformation : public ov::pass::low_precision::WeightableLayerTransformation
#include <multiply.hpp>

MultiplyTransformation propagates dequantization operations through Multiply operation.

For more details about the transformation, refer to MultiplyTransformation page in the Inference Engine Developer Guide.

class MultiplyPartialTransformation : public ov::pass::low_precision::EltwiseBaseTransformation
#include <multiply_partial.hpp>

MultiplyPartialTransformation propagates dequantization operations through Multiply operation.

For more details about the transformation, refer to MultiplyPartialTransformation page in the Inference Engine Developer Guide.

class MultiplyToGroupConvolutionTransformation : public ov::pass::low_precision::CleanupTransformation
#include <multiply_to_group_convolution.hpp>

MultiplyToGroupConvolutionTransformation replace quantized Multiply operations to GroupConvolution to speed up inference.

For more details about the transformation, refer to MultiplyToGroupConvolutionTransformation page in the Inference Engine Developer Guide.

class MVNTransformation : public ov::pass::low_precision::LayerTransformation
#include <mvn.hpp>

MVNTransformation propagates dequantization operations through MVN operation.

For more details about the transformation, refer to MVNTransformation page in the Inference Engine Developer Guide.

class NormalizeL2Transformation : public ov::pass::low_precision::LayerTransformation
#include <normalize_l2.hpp>

NormalizeL2Transformation propagates dequantization operations through NormalizeL2 operation.

For more details about the transformation, refer to NormalizeL2Transformation page in the Inference Engine Developer Guide.

class PadTransformation : public ov::pass::low_precision::LayerTransformation
#include <pad.hpp>

PadTransformation propagates dequantization operations through Pad operation.

For more details about the transformation, refer to PadTransformation page in the Inference Engine Developer Guide.

class PReluTransformation : public ov::pass::low_precision::LayerTransformation
#include <prelu.hpp>

PReluTransformation propagates dequantization operations through PRelu operation.

For more details about the transformation, refer to PReluTransformation page in the Inference Engine Developer Guide.

class PropagatePrecisions : public ov::pass::ModelPass
#include <propagate_precisions.hpp>

PropagatePrecisions transformation propagates PrecisionsAttribute attribute instances precision preserved operations.

For more details about the transformation, refer to PropagatePrecisions page in the Inference Engine Developer Guide.

template<class AttributeType>
class PropagateSharedValue : public ov::pass::ModelPass
#include <propagate_shared_value.hpp>

PropagateSharedValue transformation propagates shared value AttributeType attribute instances through precision preserved operations.

For more details about the transformation, refer to PropagateSharedValue page in the Inference Engine Developer Guide.

template<typename AttributeType>
class PropagateThroughPrecisionPreserved : public ov::pass::MatcherPass
#include <propagate_through_precision_preserved.hpp>

PropagateThroughPrecisionPreserved transformation propagates AttributeType attribute instances through precision preserved operations.

For more details about the transformation, refer to PropagateThroughPrecisionPreserved page in the Inference Engine Developer Guide.

template<typename AttributeType>
class PropagateToInput : public ov::pass::MatcherPass
#include <propagate_to_input.hpp>

PropagateToInput transformation propagates AttributeType shared value attribute instances from parent output ports to consumers input ports.

For more details about the transformation, refer to PropagateToInput page in the Inference Engine Developer Guide.

class PullReshapeThroughDequantization : public ov::pass::MatcherPass
#include <pull_reshape_through_dequantization.hpp>

PullReshapeThroughDequantization propagates dequantization operations through Reshape operations. The transformation is used on constant subgraph weights to prepare a model for the next low precision transformations.

For more details about the transformation, refer to PullReshapeThroughDequantization page in the Inference Engine Developer Guide.

class PullTransposeThroughDequantization : public ov::pass::MatcherPass
#include <pull_transpose_through_dequantization.hpp>

PullTransposeThroughDequantization propagates dequantization operations through Transpose operations. The transformation is used on constant subgraph weights to prepare a model for the next low precision transformations.

For more details about the transformation, refer to PullTransposeThroughDequantization page in the Inference Engine Developer Guide.

class ReduceBaseTransformation : public ov::pass::low_precision::LayerTransformation
#include <reduce_base_transformation.hpp>

ReduceBaseTransformation: base class for Reduce*Transformation, detects dequantization operations in front of the Reduce* operation and propagates them through the Reduce* if possible.

Subclassed by ov::pass::low_precision::ReduceMaxTransformation, ov::pass::low_precision::ReduceMeanTransformation, ov::pass::low_precision::ReduceMinTransformation, ov::pass::low_precision::ReduceSumTransformation

class ReduceMaxTransformation : public ov::pass::low_precision::ReduceBaseTransformation
#include <reduce_max.hpp>

ReduceMaxTransformation propagates dequantization operations through ReduceMax operation.

For more details about the transformation, refer to ReduceMaxTransformation page in the Inference Engine Developer Guide.

class ReduceMeanTransformation : public ov::pass::low_precision::ReduceBaseTransformation
#include <reduce_mean.hpp>

ReduceMeanTransformation propagates dequantization operations through ReduceMean operation.

For more details about the transformation, refer to ReduceMeanTransformation page in the Inference Engine Developer Guide.

class ReduceMinTransformation : public ov::pass::low_precision::ReduceBaseTransformation
#include <reduce_min.hpp>

ReduceMinTransformation propagates dequantization operations through ReduceMin operation.

For more details about the transformation, refer to ReduceMinTransformation page in the Inference Engine Developer Guide.

class ReduceSumTransformation : public ov::pass::low_precision::ReduceBaseTransformation
#include <reduce_sum.hpp>

ReduceSumTransformation propagates dequantization operations through ReduceSum operation.

For more details about the transformation, refer to ReduceSumTransformation page in the Inference Engine Developer Guide.

class ReluTransformation : public ov::pass::low_precision::LayerTransformation
#include <relu.hpp>

ReluTransformation propagates dequantization operations through Relu operation.

For more details about the transformation, refer to ReluTransformation page in the Inference Engine Developer Guide.

class ReshapeTransformation : public ov::pass::low_precision::LayerTransformation
#include <reshape.hpp>

ReshapeTransformation propagates dequantization operations through Reshape operation.

For more details about the transformation, refer to ReshapeTransformation page in the Inference Engine Developer Guide.

class AvgPoolPrecisionPreservedAttribute : public ov::PrecisionPreservedAttribute
#include <avg_pool_precision_preserved_attribute.hpp>

AvgPoolPrecisionPreservedAttribute is utility attribute which is used only during AvgPool operation precision preserved property definition.

For more details about the attribute, refer to AvgPoolPrecisionPreservedAttribute page in the Inference Engine Developer Guide.

class IntervalsAlignmentSharedValue
#include <intervals_alignment_attribute.hpp>

IntervalsAlignmentSharedValue is used by IntervalsAlignmentAttribute as attribute shared value.

class Interval
#include <intervals_alignment_attribute.hpp>
class IntervalsAlignmentAttribute : public SharedAttribute<IntervalsAlignmentSharedValue>
#include <intervals_alignment_attribute.hpp>

IntervalsAlignmentAttribute defines subgraph with the same quantization intervals alignment. FakeQuantize operations are included. The attribute is used by quantization operations.

For more details about the attribute, refer to IntervalsAlignmentAttribute page in the Inference Engine Developer Guide.

class PrecisionPreservedAttribute : public SharedAttribute<bool>
#include <precision_preserved_attribute.hpp>

PrecisionPreservedAttribute defines the precision preserved operation. If the attribute is absent, then an operation is not precision preserved.

For more details about the attribute, refer to PrecisionPreservedAttribute page in the Inference Engine Developer Guide.

Subclassed by ov::AvgPoolPrecisionPreservedAttribute

class PrecisionsAttribute : public SharedAttribute<std::vector<ov::element::Type>>
#include <precisions_attribute.hpp>

PrecisionsAttribute defines precision which is required for input/output port or an operation.

For more details about the attribute, refer to PrecisionsAttribute page in the Inference Engine Developer Guide.

class QuantizationAlignmentAttribute : public SharedAttribute<bool>
#include <quantization_alignment_attribute.hpp>

QuantizationAlignmentAttribute defines subgraph with the same quantization alignment. FakeQuantize operations are not included. The attribute is used by quantization operations.

For more details about the attribute, refer to QuantizationAlignmentAttribute page in the Inference Engine Developer Guide.

class QuantizationGranularityAttribute : public ov::RuntimeAttribute
#include <quantization_granularity_attribute.hpp>

QuantizationGranularityAttribute defines quantization granularity of operation inputs.

For more details about the attribute, refer to QuantizationGranularityAttribute page in the Inference Engine Developer Guide.

class SharedValueAttribute : public std::enable_shared_from_this<SharedValueAttribute>
#include <shared_value_attribute.hpp>

SharedValueAttribute type for shared value attributes. The attribute is used for attribute SharedValue value backward propagation.

struct SharedValue : public std::enable_shared_from_this<SharedValue>
#include <shared_value_attribute.hpp>
class ShuffleChannelsTransformation : public ov::pass::low_precision::LayerTransformation
#include <shuffle_channels.hpp>

ShuffleChannelsTransformation propagates dequantization operations through ShuffleChannels operation.

For more details about the transformation, refer to ShuffleChannelsTransformation page in the Inference Engine Developer Guide.

class SpaceToBatchTransformation : public ov::pass::low_precision::LayerTransformation
#include <space_to_batch.hpp>

SpaceToBatchTransformation propagates dequantization operations through SpaceToBatch operation.

For more details about the transformation, refer to SpaceToBatchTransformation page in the Inference Engine Developer Guide.

class SplitTransformation : public ov::pass::low_precision::LayerTransformation
#include <split.hpp>

SplitTransformation propagates dequantization operations through Split operation.

For more details about the transformation, refer to SplitTransformation page in the Inference Engine Developer Guide.

Subclassed by ov::pass::low_precision::VariadicSplitTransformation

class SqueezeTransformation : public ov::pass::low_precision::LayerTransformation
#include <squeeze.hpp>

SqueezeTransformation propagates dequantization operations through Squeeze operation.

For more details about the transformation, refer to SqueezeTransformation page in the Inference Engine Developer Guide.

class StridedSliceTransformation : public ov::pass::low_precision::LayerTransformation
#include <strided_slice.hpp>

StridedSliceTransformation propagates dequantization operations through StridedSlice operation.

For more details about the transformation, refer to StridedSliceTransformation page in the Inference Engine Developer Guide.

class SubtractTransformation : public ov::pass::low_precision::LayerTransformation
#include <subtract.hpp>

SubtractTransformation propagates dequantization operations through Subtract operation.

For more details about the transformation, refer to SubtractTransformation page in the Inference Engine Developer Guide.

class TransformationContext
#include <transformation_context.hpp>

TransformationContext instance is used to pass model transformation context data between transformations.

class TransparentBaseTransformation : public ov::pass::low_precision::LayerTransformation
#include <transparent_base_transformation.hpp>

TransparentBaseTransformation is base type for precision preserved operation transformation.

Subclassed by ov::pass::low_precision::DepthToSpaceTransformation

class TransposeTransformation : public ov::pass::low_precision::LayerTransformation
#include <transpose.hpp>

TransposeTransformation propagates dequantization operations through Transpose operation.

For more details about the transformation, refer to TransposeTransformation page in the Inference Engine Developer Guide.

class UnsqueezeTransformation : public ov::pass::low_precision::LayerTransformation
#include <unsqueeze.hpp>

UnsqueezeTransformation propagates dequantization operations through Unsqueeze operation.

For more details about the transformation, refer to UnsqueezeTransformation page in the Inference Engine Developer Guide.

template<typename AttributeType, typename ExpectedAttributeType = AttributeType>
class UpdateSharedPrecisionPreserved : public ov::pass::MatcherPass
#include <update_shared_precision_preserved.hpp>

UpdateSharedPrecisionPreserved transformation updates shared AttributeType attribute instance value to true for precision preserved operations if ExpectedAttributeType exist.

For more details about the transformation, refer to UpdateSharedPrecisionPreserved page in the Inference Engine Developer Guide.

class VariadicSplitTransformation : public ov::pass::low_precision::SplitTransformation
#include <variadic_split.hpp>

VariadicSplitTransformation propagates dequantization operations through VariadicSplit operation.

For more details about the transformation, refer to VariadicSplitTransformation page in the Inference Engine Developer Guide.

class WeightableLayerTransformation : public ov::pass::low_precision::LayerTransformation
#include <weightable_layer_transformation.hpp>

WeightableLayerTransformation is base type for weightable operation transformation.

Subclassed by ov::pass::low_precision::ConvolutionBackpropDataTransformation, ov::pass::low_precision::ConvolutionTransformation, ov::pass::low_precision::MultiplyTransformation

struct CanBeTransformedParams
#include <weightable_layer_transformation.hpp>
class InitMasks : public ov::pass::GraphRewrite
#include <pruning.hpp>

Initialising masks for pruned operations.

class InitConstMask : public ov::pass::MatcherPass
#include <pruning.hpp>

Check Constant operation values by given dimensions and set masks according to results that are bases on condition lambda function. Works for Constant with floating point type (f16, f32, f64).

class PropagateMasks : public ov::pass::GraphRewrite
#include <pruning.hpp>

Contains several MatcherPasses that initialize and propagate masks from Constant operation to the network output.

class ShrinkWeights : public ov::pass::ModelPass
#include <pruning.hpp>

Based on masks in Constant operation it inserts Gather operations to shrink them. After this pass execution ConstantFolding is required.

class Pruning : public ov::pass::ModelPass
#include <pruning.hpp>

This is just a sequence of passes that performs pruning transformations pipeline.

class AdaptivePoolToReduce : public ov::pass::MatcherPass
#include <adaptive_pool_to_reduce.hpp>

AdaptivePoolToReduce transformation replaces AdaptiveXXXPool with ReduceXXX when possible.

class AddFakeQuantizeFusion : public ov::pass::MatcherPass
#include <add_fake_quantize_fusion.hpp>

AddFakeQuantizeFusion transformation replaces following graph: Add->FakeQuantize to a single FakeQuantize Restrictions:

  • second input to Add is a Constant

class AUGRUCellFusion : public ov::pass::MatcherPass
#include <augru_cell_fusion.hpp>

AUGRUCellFusion transformation replaces a sequence of operations with AUGRUCell op.

Supported activations: 1st is Sigmoid, 2nd is Tanh Clip attribute is not supported. Linear_before_reset attribute is not supported. Supported weights format: ‘rzh’

class BatchToSpaceFusion : public ov::pass::MatcherPass
#include <batch_to_space_fusion.hpp>

BatchToSpaceFusion transformation replaces following graph: Transpose (or Reshape) -> DepthToSpace -> StridedSlice -> Transpose (or Reshape) to BatchToSpace Restrictions:

  • input rank must be 4

  • Transpose permutation must be [1, 0, 2, 3]

  • DepthToSpaceMode must be BLOCKS_FIRST

class BinarizeWeights : public ov::pass::MatcherPass
#include <binarize_weights.hpp>

This transformation converts weights to -1/+1 form and applies normalization factors to output low/high and after Convolution. For example, following graph.

    .... ....  out_low  out_high           weights ..    ..  out_low out_high
      |    |      |        |                  |     |    |      |     |
     +--------------------------+           +--------------------------+
     | FakeQuantize (levels==2) |           | FakeQuantize (levels==2) |
     |     (on activations)     |           |       (on weights)       |
     +--------------------------+           +--------------------------+
                   |                                      |
                   |                                      |
                   -----------------    -------------------
                                   |    |
                                   v    v
                              +-------------+
                              | Convolution |
                              +-------------+
                                     |
                                     v
is transformed to:
             normalized normalized
    .... ....  out_low   out_high
      |    |      |         |
     +--------------------------+           +--------------------------+
     | FakeQuantize (levels==2) |           |         Constant         |
     |     (on activations)     |           | (with converted weights) |
     +--------------------------+           +--------------------------+
                   |                                      |
                   |                                      |
                   -----------------    -------------------
                                   |    |
                                   v    v
                              +-------------+
                              | Convolution |
                              +-------------+
                                     |
                                     v
                              +------------+     +---------------------------------------------------------------+
                              |  Multiply  | <---| Constant (normalization factor coming from FQ on activations) |
                              +------------+     +---------------------------------------------------------------+
                                     |
                                     v
                              +------------+     +-----------------------------------------------------------+
                              |  Multiply  | <---| Constant (normalization factor coming from FQ on weights) |
                              +------------+     +------------------------------------------------------------
                                     |
                                     v
Normalization factors are chosen based output_high value. If it’s zero - norm factor is equal to output_low and output_high otherwise

class BroadcastElementwiseFusion : public ov::pass::MatcherPass
#include <broadcast_elementwise_fusion.hpp>

Removing Broadcast OP before ElementWise if output shape of Broadcast are equal neighboring input shape of ElementWise.

class BroadcastTransition : public ov::pass::MatcherPass
#include <broadcast_transition.hpp>

BroadcastTransition transformation moves broadcast through binary eltwise operation.

class ClampFusion : public ov::pass::MatcherPass
#include <clamp_fusion.hpp>

ClampFusion transformation replaces following graph: Maximum->Minimum to Clamp Restrictions:

  • one of the parameters to Maximum is a scalar constant

  • one of the parameters to Minimum is a scalar constant

class CompressFloatConstantsImpl : public ov::pass::MatcherPass
#include <compress_float_constants.hpp>

CompressFloatConstantsImpl transformation replaces FP32/FP64 Constants with FP16 ones.

Public Functions

CompressFloatConstantsImpl(bool postponed = false)

Transformation constructor.

Parameters

postponed – If true then the transformation won’t compress the constants keeping them in the original type but still will insert Converts. This is a special mode of operation that requires another transformation to apply a real compression on constants. Constants eligible for postponed compression are marked with a special rt_info tag.

class AddOldApiMapToParameters : public ov::pass::MatcherPass
#include <compress_float_constants.hpp>

AddOldApiMapToParameters transformation adds OldApiMap to each float input to the model.

class CompressFloatConstants : public ov::pass::GraphRewrite
#include <compress_float_constants.hpp>

CompressFloatConstants transformation replaces FP32/FP64 Constants with FP16 ones.

Public Functions

inline CompressFloatConstants(bool postponed = false)

Transformation constructor.

Parameters

postponed – Postponed compression, see ov::pass::CompressFloatConstantsImpl for details.

class ConcatFusion : public ov::pass::MatcherPass
#include <concat_fusion.hpp>

ConcatFusion transformation fuses sequence of Concats.

class ReplaceConcatReduceByMinOrMax : public ov::pass::MatcherPass
#include <concat_reduce_fusion.hpp>

ReplaceConcatReduceByMinOrMax transformation replaces Concat with 2 inputs and ReduceMin/Max by a single Minimum/Maximum with 2 inputs and inserts squeeze in case when Reduce has keep_dims = false.

class PullSqueezeThroughEltwise : public ov::pass::MatcherPass
#include <concat_reduce_fusion.hpp>

PullSqueezeThroughEltwise transformation propagates Squeeze up through binary elementwise operations:

class ConcatReduceFusion : public ov::pass::GraphRewrite
#include <concat_reduce_fusion.hpp>

ConcatReduceFusion pass replaces the following graph:

          +---------------+            +---------------+
          │               │            |               |
          │     input     │            |     input     |
          │               │            |               |
          +---------------+            +----------------
                  |                            |
                  |                            |
                  \                            /
                   \                          /
                    \                        /
                     \                      /
                      \                    /
                       \                  /
                        \                /
                         \              /
                          \            /
                         +---------------+
                         |               |
                         |     Concat    |
                         |               |
                         +----------------
                                 |
                                 v
                         +---------------+
                         |               |
                         |   ReduceMin/  |
                         |   ReduceMax   |
                         +----------------
by a single Minimum/Maximum with 2 inputs and tries to eliminate Squeeze/Unsqueeze layers before and after Min/Max.

class ConvToBinaryConv : public ov::pass::MatcherPass
#include <conv_to_binary_conv.hpp>

This transformation converts Convolution to BinaryConvolution under following conditions:

  • first input to Convolution is a FakeQuantize with levels==2 with output low,high being either (0, 1) or (-1, 1)

  • second input (weights) is a constant with values -1 or 1 The transformation also converts weights to binary Constant (with ‘u1’ type) For example, when output_low is equal to 0 and output_high is equal to 1, following graph

     .... ....  out_low   out_high
       |    |      |         |
      +--------------------------+           +-------------------------------------+
      | FakeQuantize (levels==2) |           |               Constant              |
      |     (on activations)     |           | (weights containing -1 or 1 values) |
      +--------------------------+           +-------------------------------------+
                    |                                      |
                    |                                      |
                    -----------------    -------------------
                                    |    |
                                    v    v
                               +-------------+
                               | Convolution |
                               +-------------+
                                      |
                                      v
    
    is transformed to:
     .... ....  out_low   out_high
       |    |      |         |
      +--------------------------+           +---------------------------------+
      | FakeQuantize (levels==2) |           |     Constant (with u1 type)     |
      |     (on activations)     |           | (with u1 type - binary weights) |
      +--------------------------+           +---------------------------------+
                    |                                      |
                    |                                      |
                    -----------------    -------------------
                                    |    |
                                    v    v
                            +-------------------+
                            | BinaryConvolution |
                            +-------------------+
                                      |
                                      v
                               +------------+     +----------------------------------------------------+
                               |            |     |                   Constant                         |
                               |     Add    | <---|          (weights from original graph,             |
                               |            |     |  sum-reduced over [1,..., len(weights.shape)] axes |
                               +------------+     +----------------------------------------------------+
                                      |
                                      v
                               +------------+     +-----+
                               |  Multiply  | <---| 0.5 |
                               +------------+     +-----+
                                      |
                                      v
    

class ConvertNmsGatherPathToUnsigned : public ov::pass::GraphRewrite
#include <convert_nms_gather_path_to_unsigned.hpp>

Converts Gather indices to unsigned if indices are from NMS selected indices output. NMS returns -1 for not selected boxes, old version of Gather fill corresponding output for such indices with zero. But new Gather-8 has support of negative indices indicating counting from the end. In order to keep such behaviour (until dynamism is not supported) instead of -1 new Gather-8 will accept UINT32_MAX which is always outside of the bounds and corresponding output for such indices in gather always will be filled with zeros.

class ConvertQuantizeDequantize : public ov::pass::MatcherPass
#include <convert_quantize_dequantize.hpp>

ConvertQuantizeDequantize transformation replaces following graph: FakeQuantize->Convert->Convert->Subtract->Multiply with a single FakeQuantize. Restrictions:

  • quantized data type must be i8 or u8

  • ’levels’ attribute to FakeQuantize must be equal to 256

  • (output_low, output_high) must be (-128, 127) or (0, 256) (depends on sign of quantized data type)

  • ’zero_point’ and ‘scale’ must be broadcastable to FakeQuantize’s output

class ConvertU4WeightsZeroPointToScalar : public ov::pass::MatcherPass
#include <convert_u4_weights_zero_point_to_scalar.hpp>

Converts U4 weights zero point to scalar if all values are equal.

class ConvolutionToGroupConvolutionFusion : public ov::pass::MatcherPass
#include <convolution_to_group_convolution_fusion.hpp>

ConvolutionToGroupConvolutionFusion transformation replaces following graph: Split (or VariadicSplit) / \ Conv … Conv \ / \ / Concat.

to GroupConvolution

class DepthToSpaceFusion : public ov::pass::MatcherPass
#include <depth_to_space_fusion.hpp>

DepthToSpaceFusion transformation detects Reshape-Transpose-Reshape pattern and tries to fuse it into a single DepthToSpace layer.

DepthToSpaceFusion transformation is optional and disabled by default. The transformation can be enabled with callback using setCallback method. See the example below.

Callback example:

// This callback enables DepthToSpaceFusion transformation
auto callback = [](const std::shared_ptr<const ov::Node> & node) -> bool {
    return std::dynamic_pointer_cast<const ov::opset3::DepthToSpace>(node) != nullptr;
};

auto p = ov::pass::DepthToSpaceFusion();
p.setCallback(callback);
p.run_on_function(f);

class DilatedConvolutionConverter : public ov::pass::MatcherPass
#include <dilated_convolution_converter.hpp>

DilatedConvolutionConverter transformation replaces following graph: SpaceToBatch -> Convolution(GroupConvolution) -> BatchToSpace to a single Convolution(GroupConvolution) node with updated pads and dilations Restrictions:

  • pads in SpaceToBatch must have 0 on first and second position

class DisableRandomUniformConstantFolding : public ov::pass::MatcherPass
#include <disable_random_uniform_constant_folding.hpp>

Disables ConstantFolding for RandomUniform operation. It is required as RandomUniform should generate new sequence each run.

class DivideFusion : public ov::pass::MatcherPass
#include <divide_fusion.hpp>

DivideFusion transformation replaces a sub-graph Pow(y, -1) * x or x * Pow(y, -1) with Divide(x,y)

class DropoutWithRandomUniformReplacer : public ov::pass::MatcherPass
#include <dropout_with_random_uniform_replacer.hpp>

This transformation replaces possible Dropout block (in inference mode) with RandomUniform to Broadcast of half-ones in a sub-graph.

Dropout block: RandomUniform ——-&#8212;> Add &#8212;> Floor /\ /\ /\ | | | Const(0) Const(1) Const(1) min_val max_val

Resulted block: Broadcast —-&#8212;> Add &#8212;> Floor /\ /\ | | Const(0.5) Const(1)

class EliminateUnsqueezeGather : public ov::pass::MatcherPass
#include <eliminate_unsqueeze_gather.hpp>

Remove Unsqueeze + Gather pair, if Gather gathers data by dimension that was previously added by Unsqueeze.

class EliminateGatherUnsqueeze : public ov::pass::MatcherPass
#include <eliminate_unsqueeze_gather.hpp>

Matches Gather ->[Binary Operation]-> Unsqueeze If axis for Gather and Unsqueeze is the same and Gather indices are scalar Unsqueeze is being removed and indices become 1D. Must be executed after SharedOpOptimization &#8212; It is possible to have multiple similar Unsqueeze operations after Gather, so they must be optimized beforehand.

class EnableShapeOfConstantFolding : public ov::pass::MatcherPass
#include <enable_shapeof_constant_folding.hpp>

This transformation enables constfoldability for ShapeOf nodes that was disabled by DisableShapeOfConstantFolding.

class FakeQuantizeMulFusion : public ov::pass::MatcherPass
#include <fq_mul_fusion.hpp>

This transformation looks for a FQ + Mul pair in the graph and moves the Mul operation above the FQ node. The last two inputs of FQ are multiplied by the value that was originally below the FQ node.

class FakeQuantizeReshapeFusion : public ov::pass::MatcherPass
#include <fq_reshape_fusion.hpp>

This transformation looks for a FQ + Reshape pair in the graph and moves the Reshape operation above the FQ node. Shapes of limit inputs are updated following FQ broadcasting semantics.

class RPE_Fusion : public ov::pass::MatcherPass
#include <fuse_rotary_positional_embeddings.hpp>

Fuses special sub-graph into an internal Rotary Positional Embedding operation.

class FusedNamesCleanup : public ov::pass::ModelPass
#include <fused_names_cleanup.hpp>

FusedNamesCleanup removes fused_names attribute.

class GeluFusionWithErfOne : public ov::pass::MatcherPass
#include <gelu_fusion.hpp>

GeluFusion transformation replaces a sub-graph (0.5 * x) * (1 + erf(x / sqrt(2))) with a Gelu op.

class GeluFusionWithErfTwo : public ov::pass::MatcherPass
#include <gelu_fusion.hpp>

GeluFusion transformation replaces a sub-graph 0.5 * (x * (1 + erf(x / sqrt(2)))) with a Gelu op.

class GeluFusionWithErfThree : public ov::pass::MatcherPass
#include <gelu_fusion.hpp>

GeluFusion transformation replaces a sub-graph x * (0.5 * (1 + erf(x / sqrt(2)))) with a Gelu op.

class GeluFusionWithErfFour : public ov::pass::MatcherPass
#include <gelu_fusion.hpp>

GeluFusion transformation replaces a sub-graph x * (0.5 + 0.5 * erf(x * (1 / sqrt(2)))) with a Gelu op.

class GeluFusionWithTanh : public ov::pass::MatcherPass
#include <gelu_fusion.hpp>

GeluFusion transformation replaces a sub-graph x * (0.5 * (1 + tanh([sqrt(2 / pi)] * [x + 0.044715^3]))) with a Gelu (Tanh) op.

class GeluFusionWithTanhNoPower : public ov::pass::MatcherPass
#include <gelu_fusion.hpp>

GeluFusion transformation replaces a sub-graph x * 0.5 * (1 + tanh((x * 0.044715 * x + 1) * x * sqrt(2 / pi))) with a Gelu (Tanh) op.

class GeluFusion : public ov::pass::GraphRewrite
#include <gelu_fusion.hpp>

GeluFusion transformation replaces various sub-graphs with a Gelu op.

class GRUCellFusion : public ov::pass::MatcherPass
#include <gru_cell_fusion.hpp>

GRUCellFusion transformation replaces a sequence of operations with GRUCell op.

If BiasAdds are not present in the pattern, then Constants with zero values will be created to match the specification.

Supported activations: Relu, Sigmoid, Tanh Clip attribute is not supported. Linear_before_reset attribute is not supported. Supported weights formats: zr, rz

class HSigmoidFusionWithReluDiv : public ov::pass::MatcherPass
#include <hsigmoid_fusion.hpp>

HSigmoidFusion transformation replaces a sub-graph ((min(Relu(x + 3), 6)) / 6) with a HSigmoid op.

class HSigmoidFusionWithReluMul : public ov::pass::MatcherPass
#include <hsigmoid_fusion.hpp>

HSigmoidFusion transformation replaces a sub-graph ((min(Relu(x + 3), 6)) * const(1/6)) with a HSigmoid op.

class HSigmoidFusionWithoutRelu : public ov::pass::MatcherPass
#include <hsigmoid_fusion.hpp>

HSigmoidFusion transformation replaces a sub-graph (min(max(x + 3, 0), 6) / 6) with a HSigmoid op.

class HSigmoidFusionWithClampMul : public ov::pass::MatcherPass
#include <hsigmoid_fusion.hpp>

HSigmoidFusion transformation replaces a sub-graph (Clamp(x + 3, 0, 6) * const(1/6)) with a HSigmoid op.

class HSigmoidFusionWithClampDiv : public ov::pass::MatcherPass
#include <hsigmoid_fusion.hpp>

HSigmoidFusion transformation replaces a sub-graph (Clamp(x + 3, 0, 6) * / 6) with a HSigmoid op.

class HSigmoidFusion : public ov::pass::GraphRewrite
#include <hsigmoid_fusion.hpp>

HSigmoidFusion transformation replaces various sub-graphs with a HSigmoid op.

class HSwishFusionWithReluDiv : public ov::pass::MatcherPass
#include <hswish_fusion.hpp>

HSwishFusion transformation replaces a sub-graph (x * (min(Relu(x + 3), 6))) / 6 with a HSwish op.

class HSwishFusionWithReluMul : public ov::pass::MatcherPass
#include <hswish_fusion.hpp>

HSwishFusion transformation replaces a sub-graph (x * (min(Relu(x + 3), 6)) * const(1/6) with a HSwish op.

class HSwishFusionWithHSigmoid : public ov::pass::MatcherPass
#include <hswish_fusion.hpp>

HSwishFusion transformation replaces a sub-graph x * HSigmoid(x) with a HSwish op.

class HSwishFusionWithClamp : public ov::pass::MatcherPass
#include <hswish_fusion.hpp>

HSwishFusion transformation replaces a sub-graph (Clamp(x + 3, 0, 6) * x) with a HSwish * 6.

class HSwishFusion : public ov::pass::GraphRewrite
#include <hswish_fusion.hpp>

HSwishFusion transformation replaces various sub-graphs with a HSwish op.

class InterpolateSequenceFusion : public ov::pass::MatcherPass
#include <interpolate_sequence_fusion.hpp>

InterpolateSequenceFusion transformation replaces a sequence of operations to Interpolate op.

class LeakyReluFusion : public ov::pass::MatcherPass
#include <leaky_relu_fusion.hpp>

LeakyReluFusion transformation replaces following graph: Multiply->Maximum to LeakyRelu.

class LinOpSequenceFusion : public ov::pass::GraphRewrite
#include <lin_op_sequence_fusion.hpp>

LinOpSequenceFusion transformation fuses linear operation sequence.

class LSTMCellFusion : public ov::pass::MatcherPass
#include <lstm_cell_fusion.hpp>

LSTMCellFusion transformation replaces a sequence of operations with LSTMCell op.

class MarkPrecisionSensitiveShapeOfSubgraphs : public ov::pass::ModelPass
#include <mark_precision_sensitive_shapeof_subgraphs.hpp>

MarkPrecisionSensitiveShapeOfSubgraphs marks entirely all shape subgraphs starting from precision-sensitive inputs and ending at the ShapeOf node as disabled for FP16 compression.

Subclassed by ov::pass::MarkDividesInShapeSubgraphs, ov::pass::MarkPrecisionSensitiveConstants, ov::pass::MarkShapeOfSubgraphs

class MarkShapeOfSubgraphs : public ov::pass::MarkPrecisionSensitiveShapeOfSubgraphs
#include <mark_precision_sensitive_shapeof_subgraphs.hpp>

MarkShapeOfSubgraphs marks shape subgraphs. Information whether the node belongs to the shape path or to the data path is needed during evaluate and CF.

class MarkPrecisionSensitiveConstants : public ov::pass::MarkPrecisionSensitiveShapeOfSubgraphs
#include <mark_precision_sensitive_shapeof_subgraphs.hpp>

MarkPrecisionSensitiveConstants marks the constants inside of all shape subgraphs starting from precision-sensitive inputs and ending at the ShapeOf node as disabled for FP16 compression.

class MarkDividesInShapeSubgraphs : public ov::pass::MarkPrecisionSensitiveShapeOfSubgraphs
#include <mark_precision_sensitive_shapeof_subgraphs.hpp>

MarkDividesInShapeSubgraphs marks the Divide layers inside of all shape subgraphs starting from precision-sensitive input and ending at the ShapeOf node as disabled for ConvertDivide transformation.

class MatMulMultiplyFusion : public ov::pass::MatcherPass
#include <matmul_multiply_fusion.hpp>

MatMulMultiplyFusion transformation matches following graph:

    +----------+            +----------+
    |    A     |            |    B     |
    +----------+            +----------+
         |                       |
         -----------    ----------
                   |    |
                   v    v
                 +--------+
                 | MatMul |
                 +--------+
                     |
                     v
                +----------+     +----------+
                | Multiply |<----| Constant |
                +----------+     +----------+

and replaces with:

                      +-------+   +----------+
                      |   B   |   | Constant |
                      +-------+   +----------+
                           |            |
                           ------  ------
                                |  |
                                v  v
    +----------+            +----------+
    |    A     |            | Multiply |
    +----------+            +----------+
         |                       |
         -----------    ----------
                   |    |
                   v    v
                 +--------+
                 | MatMul |
                 +--------+

class MishFusion : public ov::pass::MatcherPass
#include <mish_fusion.hpp>

MishFusion transformation replaces group of operations: x * tanh(log(exp(x) + 1)) to Mish op.

class MultiplyConvolutionFusion : public ov::pass::MatcherPass
#include <mul_conv_fusion.hpp>

Multiply->Convolution fusion replaces following graph:

+—-&#8212;+ +——-&#8212;+ | Input

| | Constant | +—-&#8212;+ +——-&#8212;+ | |

| | v v +——-

&#8212;+ +——&#8212;+ | Multiply | | Weights | +——-&#8212;+ +——&#8212;+ | |

| | v v +————-

&#8212;+ | Convolution Op | +————-&#8212;+

to following:

                      +---------+   +----------+
                      | Weights |   | Constant |
                      +---------+   +----------+
                           |            |
                           ------  ------
                                |  |
                                v  v
     +-------+              +----------+
     | Input |              | Multiply |
     +-------+              +----------+
         |                       |
         -----------    ----------
                   |    |
                   v    v
              +----------------+
              | Convolution Op |
              +----------------+
where ‘Convolution Op’ is one of:
  • Convolution

  • ConvolutionBackpropData

  • GroupConvolution

  • GroupConvolutionBackpropData

Restrictions:

  • weights’ shape is static

  • if the constant input to Multiply has the same rank as ‘input’, the constant first dimension has to be 1

  • constant input to Multiply has to be broadcastable to weights when ‘Convolution Op’ is either Convolution or GroupConvolution

  • shape of a constant input to Multiply has to be in one of following forms: (1), (1, 1, …, 1), (C, 1, …, 1), (1, C, 1, …, 1) when ‘Convolution Op’ is either ConvolutionBackpropData or GroupConvolutionBackpropData

class MulFakeQuantizeFusion : public ov::pass::MatcherPass
#include <mul_fake_quantize_fusion.hpp>

MulFakeQuantizeFusion transformation replaces following graph: Mul->FakeQuantize to a single FakeQuantize Restrictions:

  • second input to Mul is a Constant

class MVNFusionWithoutConstants : public ov::pass::MatcherPass
#include <mvn_fusion.hpp>

MVNFusion transformation replaces group of operations: (x - ReduceMean(x, axes)) / (Sqrt(ReduceMean((x - ReduceMean(x, axes)) ^ 2)) + eps) to MVN op.

class MVNFusionWithConstantsInside : public ov::pass::MatcherPass
#include <mvn_fusion.hpp>

MVNFusion transformation replaces group of operations: gamma * (x - ReduceMean(x, axes)) / (Sqrt(ReduceMean((x - ReduceMean(x, axes)) ^ 2)) + eps) + beta to MVN op.

class MVNFusion : public ov::pass::GraphRewrite
#include <mvn_fusion.hpp>

MVNFusion transformation replaces various sub-graphs with a MVN op.

class NearestNeighborUpsamplingFusion : public ov::pass::MatcherPass
#include <nearest_neighbor_upsampling_fusion.hpp>

NearestNeighborUpsamplingFusion transformation fuses subgraph that uses the simpler operations, as ShapeOf, StridedSlice, Concat, Reshape, Mul to calculate Interpolate with mode=’nearest’.

class NonZeroHorizontalFusion : public ov::pass::MatcherPass
#include <nonzero_horizontal_fusion.hpp>

NonZeroHorizontalFusion transformation makes horizontal fusion for equal NonZero layers.

class EliminatePad : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminatePad eliminates pad that does nothing.

class EliminateConvert : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateConvert eliminates convert that does nothing.

class EliminateConvertNonZero : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateConvertNonZero eliminates convert before NonZero.

class EliminateConcat : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateConcat eliminates concat that does nothing.

class EliminateSplit : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateSplit eliminates split that does nothing.

class EliminateSqueeze : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateSqueeze eliminates squeeze that does nothing.

class EliminateTranspose : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateTranspose eliminates transpose that does nothing.

class EliminateEltwise : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateEltwise eliminates eltwise ops that do nothing.

class EliminateScatterUpdate : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateScatterUpdate eliminates scatter ops that do nothing (updates/indices are empty)

class EliminateSplitConcat : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateSplit eliminates split+concat pairs which do nothing.

class EliminateNopBroadcast : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

EliminateNopBroadcast eliminates broadcast or tile with all ones on the second input.

class NopSliceBeforeGatherElements : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

NopSliceBeforeGatherElements eliminates slice before GElements if slicing from 0 It is valid since GatherElements doesn’t support negative indices and Slice won’t affect indexing of elements in the original tensor that GatherElements would like to take.

class PrepareShapeOpsForEliminationAroundBE : public ov::pass::MatcherPass
#include <nop_elimination.hpp>

PrepareShapeOpsForEliminationAroundBE works on the subgraph like Reshape/Squeeze/Unsqueeze -> BinaryElementwiseOperation -> Reshape/Squeeze/Unsqueeze and prepares it for the following optimizations by moving bottom op up through Binary op.

class NormalizeL2Fusion : public ov::pass::MatcherPass
#include <normalize_l2_fusion.hpp>

NormalizeL2Fusion transformation replaces sub-graphs: x/(sqrt(max(reduce_sum(x[j0, …, jN]**2, axes), eps)) x/(sqrt(add(reduce_sum(x[j0, …, jN]**2, axes), eps)) x/(pow(max(reduce_sum(x[j0, …, jN]**2, axes), eps), 0.5) x/(pow(add(reduce_sum(x[j0, …, jN]**2, axes), eps), 0.5) x*(pow(max(reduce_sum(x[j0, …, jN]**2, axes), eps), -0.5) x*(pow(add(reduce_sum(x[j0, …, jN]**2, axes), eps), -0.5) with a NormalizeL2(x, axes, eps, eps_mode[MAX|ADD]) op.

class UselessSliceEraser : public ov::pass::ModelPass
#include <optimize_strided_slice.hpp>

UselessSliceEraser transformation removes Slice/StridedSlice operations with equal input and output shapes.

class SharedStridedSliceEraser : public ov::pass::ModelPass
#include <optimize_strided_slice.hpp>

SharedStridedSliceEraser transformation replaces group of StridedSlice operations with first StridedSlice in this group. All SrtideSlices in this group must be equal and consume the same output port.

class GroupedStridedSliceOptimizer : public ov::pass::ModelPass
#include <optimize_strided_slice.hpp>

GroupedStridedSliceOptimizer transformation replaces group of StridedSlice operations with VariadicSplit. All StridedSlice operations must slice data with the same axis and stride = 1.

class GroupedSliceToVSplitOptimization : public ov::pass::ModelPass
#include <optimize_strided_slice.hpp>

GroupedSliceToVSplitOptimization transformation replaces group of Slice operations with VariadicSplit. All Slice operations must slice data with the same axis and step = 1.

class StridedSliceOptimization : public ov::pass::ModelPass
#include <optimize_strided_slice.hpp>

StridedSliceOptimization transformation executes all transformations related to StridedSlice optimizations.

class PadFusionAvgPool : public ov::pass::MatcherPass
#include <pad_fusion.hpp>

PadFusion transformation replaces following graph: Pad -> AvgPool to AvgPool, under following conditions.

  • pad mode is op::PadMode::CONSTANT

  • pad value is 0

  • exclude_pad in AvgPool is set to false or pads_begin, pads_end are set to zero

class