From d0213301a55eb6cbda4352ffca0136a95e815cd7 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Wed, 13 Sep 2023 16:30:31 +0400 Subject: [PATCH] Transformations: API 2.0 transition part 3 for LPT transformations (#19610) * lpt transformations: transition to api 2.0, ngraph -> openvino * use ov namespace for lpt transformations * fix low_precision usings * includes refactoring * delete RecurrentGraphRewrite and RecurrentMatcher as unused classes * use ov header for itt; delete the disabled test * delete the unused function * suppress doxygen warning * fix link in the documentation --- .../pipeline/step2_markup.md | 2 +- .../convert_subtract_constant.md | 2 +- .../pull_reshape_through_dequantization.md | 2 +- .../pull_transpose_through_dequantization.md | 2 +- .../align_quantization_intervals.md | 2 +- .../align_quantization_parameters.md | 2 +- .../step2_markup/create_attribute.md | 2 +- .../create_precisions_dependent_attribute.md | 2 +- .../markup_avg_pool_precision_preserved.md | 2 +- .../step2_markup/markup_bias.md | 2 +- .../step2_markup/markup_can_be_quantized.md | 2 +- .../markup_per_tensor_quantization.md | 2 +- .../step2_markup/markup_precisions.md | 2 +- .../step2_markup/propagate_precisions.md | 2 +- .../step2_markup/propagate_shared_value.md | 2 +- .../propagate_through_precision_preserved.md | 2 +- .../step2_markup/propagate_to_input.md | 2 +- .../update_shared_precision_preserved.md | 2 +- .../step3_main/activation/clamp.md | 2 +- .../step3_main/activation/prelu.md | 2 +- .../step3_main/activation/relu.md | 2 +- .../step3_main/arithmetic/add.md | 2 +- .../step3_main/arithmetic/multiply.md | 2 +- .../step3_main/arithmetic/subtract.md | 2 +- .../step3_main/convolution/convolution.md | 2 +- .../convolution/convolution_backprop_data.md | 2 +- .../convolution/group_convolution.md | 2 +- .../step3_main/image/interpolate.md | 2 +- .../step3_main/matrix/mat_mul.md | 2 +- .../step3_main/movement/concat.md | 2 +- .../step3_main/movement/depth_to_space.md | 2 +- .../step3_main/movement/gather.md | 2 +- .../step3_main/movement/pad.md | 2 +- .../step3_main/movement/shuffle_channels.md | 2 +- .../step3_main/movement/split.md | 2 +- .../step3_main/movement/strided_slice.md | 2 +- .../step3_main/movement/transpose.md | 2 +- .../step3_main/movement/variadic_split.md | 2 +- .../step3_main/normalization/mvn.md | 2 +- .../step3_main/normalization/normalize_l2.md | 2 +- .../step3_main/pooling/avg_pool.md | 2 +- .../step3_main/pooling/max_pool.md | 2 +- .../step3_main/quantization/fake_quantize.md | 2 +- .../quantization/fold_fake_quantize.md | 2 +- .../step3_main/reduction/reduce_max.md | 2 +- .../step3_main/reduction/reduce_mean.md | 2 +- .../step3_main/reduction/reduce_min.md | 2 +- .../step3_main/reduction/reduce_sum.md | 2 +- .../step3_main/shape/reshape.md | 2 +- .../step3_main/shape/squeeze.md | 2 +- .../step3_main/shape/unsqueeze.md | 2 +- .../step4_cleanup/eliminate_fake_quantize.md | 2 +- .../fake_quantize_decomposition.md | 2 +- .../step4_cleanup/fold_convert.md | 2 +- .../step4_cleanup/fuse_convert.md | 2 +- .../fuse_multiply_to_fake_quantize.md | 2 +- .../fuse_subtract_to_fake_quantize.md | 2 +- .../multiply_to_group_convolution.md | 2 +- docs/snippets/lpt_intel_cpu_plugin.cpp | 30 ++-- docs/suppress_warnings.txt | 1 + .../include/itt.hpp | 8 +- .../include/low_precision/add.hpp | 8 +- .../align_quantization_intervals.hpp | 10 +- .../align_quantization_parameters.hpp | 14 +- .../low_precision/assign_and_read_value.hpp | 12 +- .../include/low_precision/avg_pool.hpp | 4 +- .../low_precision/base_matcher_pass.hpp | 10 +- .../include/low_precision/clamp.hpp | 8 +- .../common/fake_quantize_dequantization.hpp | 14 +- .../low_precision/common/ie_lpt_exception.hpp | 12 +- ...t_quantization_granularity_restriction.hpp | 4 +- .../common/precisions_restriction.hpp | 24 +-- .../quantization_granularity_restriction.hpp | 18 +- .../include/low_precision/concat.hpp | 8 +- .../include/low_precision/convert.hpp | 8 +- .../convert_subtract_constant.hpp | 10 +- .../include/low_precision/convolution.hpp | 10 +- .../convolution_backprop_data.hpp | 10 +- .../low_precision/create_attribute.hpp | 16 +- .../create_precisions_dependent_attribute.hpp | 22 +-- .../include/low_precision/depth_to_space.hpp | 4 +- .../low_precision/eliminate_fake_quantize.hpp | 8 +- .../eltwise_base_transformation.hpp | 6 +- .../include/low_precision/fake_quantize.hpp | 4 +- .../fake_quantize_decomposition.hpp | 8 +- .../include/low_precision/fold_convert.hpp | 8 +- .../low_precision/fold_fake_quantize.hpp | 10 +- .../include/low_precision/fuse_convert.hpp | 8 +- .../fuse_multiply_to_fake_quantize.hpp | 8 +- .../fuse_subtract_to_fake_quantize.hpp | 8 +- .../include/low_precision/gather.hpp | 4 +- .../low_precision/group_convolution.hpp | 14 +- .../include/low_precision/interpolate.hpp | 6 +- .../low_precision/layer_transformation.hpp | 52 +++--- .../include/low_precision/low_precision.hpp | 40 ++--- .../include/low_precision/lpt_itt.hpp | 6 +- .../markup_avg_pool_precision_preserved.hpp | 12 +- .../include/low_precision/markup_bias.hpp | 10 +- .../low_precision/markup_can_be_quantized.hpp | 14 +- .../low_precision/markup_precisions.hpp | 10 +- .../markup_quantization_granularity.hpp | 10 +- .../include/low_precision/mat_mul.hpp | 4 +- .../include/low_precision/max_pool.hpp | 8 +- .../low_precision/move_fake_quantize.hpp | 8 +- .../include/low_precision/multiply.hpp | 8 +- .../multiply_to_group_convolution.hpp | 6 +- .../include/low_precision/mvn.hpp | 4 +- .../include/low_precision/network_helper.hpp | 52 +++--- .../include/low_precision/normalize_l2.hpp | 4 +- .../include/low_precision/pad.hpp | 6 +- .../include/low_precision/prelu.hpp | 8 +- .../low_precision/propagate_precisions.hpp | 8 +- .../low_precision/propagate_shared_value.hpp | 20 +-- .../propagate_through_precision_preserved.hpp | 26 +-- .../low_precision/propagate_to_input.hpp | 24 +-- .../pull_reshape_through_dequantization.hpp | 12 +- .../pull_transpose_through_dequantization.hpp | 12 +- .../low_precision/quantization_details.hpp | 6 +- .../include/low_precision/recurrent_cell.hpp | 8 +- .../reduce_base_transformation.hpp | 8 +- .../include/low_precision/reduce_max.hpp | 6 +- .../include/low_precision/reduce_mean.hpp | 6 +- .../include/low_precision/reduce_min.hpp | 6 +- .../include/low_precision/reduce_sum.hpp | 6 +- .../include/low_precision/relu.hpp | 8 +- .../include/low_precision/reshape.hpp | 12 +- .../rt_info/attribute_parameters.hpp | 10 +- ...avg_pool_precision_preserved_attribute.hpp | 6 +- .../low_precision/rt_info/bias_attribute.hpp | 6 +- .../rt_info/intervals_alignment_attribute.hpp | 8 +- .../rt_info/precision_preserved_attribute.hpp | 6 +- .../rt_info/precisions_attribute.hpp | 10 +- .../quantization_alignment_attribute.hpp | 8 +- .../quantization_granularity_attribute.hpp | 6 +- .../rt_info/quantization_mode_attribute.hpp | 6 +- .../rt_info/shared_value_attribute.hpp | 4 +- .../rt_info/skip_cleanup_attribute.hpp | 8 +- .../low_precision/shuffle_channels.hpp | 8 +- .../include/low_precision/split.hpp | 10 +- .../include/low_precision/squeeze.hpp | 8 +- .../include/low_precision/strided_slice.hpp | 8 +- .../include/low_precision/subtract.hpp | 8 +- .../low_precision/transformation_context.hpp | 8 +- .../transparent_base_transformation.hpp | 8 +- .../include/low_precision/transpose.hpp | 8 +- .../include/low_precision/unsqueeze.hpp | 8 +- .../update_shared_precision_preserved.hpp | 20 +-- .../include/low_precision/variadic_split.hpp | 6 +- .../weightable_layer_transformation.hpp | 18 +- .../low_precision_transformations/src/add.cpp | 18 +- .../src/align_quantization_intervals.cpp | 12 +- .../src/align_quantization_parameters.cpp | 8 +- .../src/assign_and_read_value.cpp | 35 ++-- .../src/avg_pool.cpp | 16 +- .../src/base_matcher_pass.cpp | 8 +- .../src/clamp.cpp | 15 +- .../src/concat.cpp | 35 ++-- .../src/convert.cpp | 14 +- .../src/convert_subtract_constant.cpp | 28 +-- .../src/convolution.cpp | 28 +-- .../src/convolution_backprop_data.cpp | 28 +-- .../src/depth_to_space.cpp | 8 +- .../src/eliminate_fake_quantize.cpp | 14 +- .../src/eltwise_base_transformation.cpp | 6 +- .../src/fake_quantize.cpp | 14 +- .../src/fake_quantize_decomposition.cpp | 38 ++--- .../src/fake_quantize_dequantization.cpp | 46 ++--- .../src/fold_convert.cpp | 16 +- .../src/fold_fake_quantize.cpp | 16 +- .../src/fuse_convert.cpp | 24 +-- .../src/fuse_multiply_to_fake_quantize.cpp | 13 +- .../src/fuse_subtract_to_fake_quantize.cpp | 14 +- .../src/gather.cpp | 53 +++--- .../src/group_convolution.cpp | 18 +- .../src/interpolate.cpp | 22 +-- .../src/layer_transformation.cpp | 46 ++--- .../src/low_precision.cpp | 72 ++++---- .../markup_avg_pool_precision_preserved.cpp | 8 +- .../src/markup_bias.cpp | 6 +- .../src/markup_can_be_quantized.cpp | 20 +-- .../src/markup_precisions.cpp | 30 ++-- .../src/markup_quantization_granularity.cpp | 8 +- .../src/mat_mul.cpp | 18 +- .../src/max_pool.cpp | 16 +- .../src/move_fake_quantize.cpp | 54 +++--- .../src/multiply.cpp | 16 +- .../src/multiply_to_group_convolution.cpp | 16 +- .../low_precision_transformations/src/mvn.cpp | 54 +++--- .../src/network_helper.cpp | 104 ++++++------ .../src/normalize_l2.cpp | 34 ++-- .../low_precision_transformations/src/pad.cpp | 16 +- .../src/prelu.cpp | 12 +- .../src/propagate_precisions.cpp | 12 +- .../pull_reshape_through_dequantization.cpp | 46 ++--- .../pull_transpose_through_dequantization.cpp | 46 ++--- .../src/quantization_details.cpp | 14 +- .../src/recurrent_cell.cpp | 108 ++++++------ .../src/reduce_base_transformation.cpp | 13 +- .../src/reduce_max.cpp | 12 +- .../src/reduce_mean.cpp | 12 +- .../src/reduce_min.cpp | 11 +- .../src/reduce_sum.cpp | 12 +- .../src/relu.cpp | 12 +- .../src/reshape.cpp | 26 +-- ...avg_pool_precision_preserved_attribute.cpp | 2 +- .../src/rt_info/bias_attribute.cpp | 4 +- .../rt_info/intervals_alignment_attribute.cpp | 6 +- .../rt_info/precision_preserved_attribute.cpp | 2 +- .../src/rt_info/precisions_attribute.cpp | 8 +- .../quantization_alignment_attribute.cpp | 8 +- .../quantization_granularity_attribute.cpp | 2 +- .../rt_info/quantization_mode_attribute.cpp | 2 +- .../src/rt_info/skip_cleanup_attribute.cpp | 4 +- .../src/shuffle_channels.cpp | 20 +-- .../src/split.cpp | 20 +-- .../src/squeeze.cpp | 22 +-- .../src/strided_slice.cpp | 10 +- .../src/subtract.cpp | 20 +-- .../src/transformation_context.cpp | 8 +- .../src/transparent_base_transformation.cpp | 8 +- .../src/transpose.cpp | 15 +- .../src/unsqueeze.cpp | 22 +-- .../src/variadic_split.cpp | 10 +- .../src/weightable_layer_transformation.cpp | 20 +-- .../tests/add_transformation.cpp | 26 +-- ...quantization_parameters_transformation.cpp | 32 ++-- .../assign_and_read_value_transformation.cpp | 18 +- .../tests/avg_pool_transformation.cpp | 22 +-- .../avg_pool_with_child_transformation.cpp | 20 +-- .../tests/clamp_transformation.cpp | 24 +-- .../compose_fake_quantize_transformation.cpp | 8 +- ...ction_with_intermediate_transformation.cpp | 20 +-- .../tests/concat_transformation.cpp | 4 +- ...t_with_different_precision_on_children.cpp | 28 +-- .../tests/concat_with_fq_tranformation.cpp | 160 +++++++++--------- ...ate_precision_selection_transformation.cpp | 38 ++--- ...th_intermediate_reshape_transformation.cpp | 14 +- ...oncat_with_intermediate_transformation.cpp | 30 ++-- ...ermediate_with_constant_transformation.cpp | 34 ++-- .../concat_with_neighbors_transformation.cpp | 44 ++--- ...ghbors_transformation_with_convolution.cpp | 48 +++--- ...th_not_quantized_parent_transformation.cpp | 66 ++++---- ...with_reshape_at_the_end_transformation.cpp | 20 +-- .../concat_with_split_transformation.cpp | 46 ++--- ...ncat_with_strided_slice_transformation.cpp | 38 ++--- ...nvert_subtract_constant_transformation.cpp | 6 +- ...nvolution_backprop_data_transformation.cpp | 28 +-- .../tests/convolution_qdq_transformation.cpp | 22 +-- .../tests/convolution_transformation.cpp | 30 ++-- .../convolution_with_incorrect_weights.cpp | 16 +- .../tests/depth_to_space_transformation.cpp | 20 +-- ...i_parent_dequantization_transformation.cpp | 8 +- ...eliminate_fake_quantize_transformation.cpp | 10 +- ...ise_transformation_is_broadcasted_test.cpp | 2 +- ...d_two_output_branches_with_convolution.cpp | 8 +- ...tize_on_weights_with_unsupported_child.cpp | 12 +- ...ize_precision_selection_transformation.cpp | 20 +-- .../tests/fake_quantize_transformation.cpp | 28 +-- ...ize_with_dq_not_optimal_transformation.cpp | 16 +- ..._with_dynamic_intervals_transformation.cpp | 12 +- .../tests/fold_convert_transformation.cpp | 20 +-- .../fold_fake_quantize_in_transformations.cpp | 8 +- .../tests/fuse_convert_transformation.cpp | 16 +- ...antize_to_fake_quantize_transformation.cpp | 14 +- ...ntize_with_multi_inputs_transformation.cpp | 8 +- ...ltiply_to_fake_quantize_transformation.cpp | 16 +- ...btract_to_fake_quantize_transformation.cpp | 14 +- .../tests/gather_transformation.cpp | 18 +- ...et_dequantization_below_transformation.cpp | 6 +- .../tests/get_dequantization_test.cpp | 4 +- .../get_dequantization_transformation.cpp | 8 +- .../group_convolution_transformation.cpp | 22 +-- .../tests/interpolate_transformation.cpp | 12 +- ...s_asymmetric_on_weights_dequantization.cpp | 20 +-- .../tests/is_asymmetric_on_weights_fq.cpp | 20 +-- .../tests/is_constant_path_transformation.cpp | 32 ++-- .../is_function_quantized_transformation.cpp | 4 +- .../tests/layer_transformation.cpp | 18 +- .../tests/layer_transformation.hpp | 22 +-- .../low_precision_transformations_test.cpp | 12 +- .../lpt_avoid_shapeof_propagation_test.cpp | 126 +++++++------- .../tests/lpt_public_methods_test.cpp | 35 ---- ...dequantization_subgraph_transformation.cpp | 10 +- ...kup_avg_pool_precisions_transformation.cpp | 48 +++--- .../tests/markup_bias_transformation.cpp | 6 +- .../tests/mat_mul_transformation.cpp | 20 +-- .../mat_mul_with_constant_transformation.cpp | 20 +-- .../tests/max_pool_transformation.cpp | 18 +- ...ve_dequantization_after_transformation.cpp | 10 +- .../move_fake_quantize_transformation.cpp | 56 +++--- ...ly_to_group_convolution_transformation.cpp | 12 +- .../tests/multiply_transformation.cpp | 6 +- .../tests/mvn_transformation.cpp | 18 +- ...ormalize_dequantization_transformation.cpp | 12 +- .../tests/normalize_l2_transformation.cpp | 16 +- .../tests/pad_transformation.cpp | 20 +-- .../tests/precision_details_test.cpp | 2 +- .../tests/prelu_transformation.cpp | 14 +- ..._through_dequantization_transformation.cpp | 14 +- ..._through_dequantization_transformation.cpp | 14 +- ...ntization_granularity_restriction_test.cpp | 20 +-- .../tests/recurrent_cell_transformation.cpp | 40 ++--- .../tests/reduce_max_transformation.cpp | 10 +- .../tests/reduce_mean_transformation.cpp | 10 +- .../tests/reduce_min_transformation.cpp | 10 +- .../tests/reduce_sum_transformation.cpp | 10 +- .../tests/reduce_transformation.hpp | 8 +- .../tests/relu_transformation.cpp | 14 +- .../tests/reshape_transformation.cpp | 10 +- .../tests/round_transformation.cpp | 8 +- ...te_in_standalone_branch_transformation.cpp | 16 +- .../tests/shuffle_channels_transformation.cpp | 18 +- .../simple_low_precision_transformer.cpp | 38 ++--- .../simple_low_precision_transformer.hpp | 10 +- .../tests/split_transformation.cpp | 10 +- .../tests/squeeze_transformation.cpp | 10 +- .../tests/strided_slice_transformation.cpp | 18 +- ...fq_decomposition_with_shared_constants.cpp | 10 +- ...sformations_after_split_transformation.cpp | 6 +- .../transformer_is_function_quantized.cpp | 6 +- .../tests/transpose_transformation.cpp | 22 +-- .../tests/unit/calclulate_levels_test.cpp | 14 +- .../tests/unit/data_precision_check.cpp | 6 +- ...ayer_transformation_get_data_precision.cpp | 40 ++--- .../tests/unit/reshape_test.cpp | 38 ++--- .../tests/unit/shared_attribute_add.cpp | 6 +- .../tests/unit/update_reshape_values.cpp | 2 +- .../tests/unsqueeze_transformation.cpp | 10 +- .../tests/variadic_split_transformation.cpp | 10 +- .../include/ngraph/pass/graph_rewrite.hpp | 64 +------ src/core/include/ngraph/pattern/matcher.hpp | 1 - .../include/openvino/pass/graph_rewrite.hpp | 1 - .../include/openvino/pass/pattern/matcher.hpp | 82 --------- src/core/src/pattern/matcher.cpp | 53 ------ src/core/tests/pattern.cpp | 145 ---------------- src/plugins/intel_cpu/src/exec_network.cpp | 2 +- .../transformation_pipeline.cpp | 30 ++-- .../assign_and_read_value_transformation.cpp | 2 +- .../clamp_transformation.cpp | 2 +- .../concat_with_child_and_output.cpp | 2 +- ...t_with_different_precision_on_children.cpp | 2 +- ...oncat_with_intermediate_transformation.cpp | 2 +- .../concat_with_neighbors_transformation.cpp | 2 +- .../concat_with_split_transformation.cpp | 2 +- ...nvolution_backprop_data_transformation.cpp | 2 +- .../convolution_qdq_transformation.cpp | 2 +- .../convolution_transformation.cpp | 2 +- .../fq_and_avg_pool_transformation.cpp | 2 +- .../fq_and_max_pool_transformation.cpp | 2 +- ...d_two_output_branches_with_convolution.cpp | 4 +- .../fq_precision_selection_transformation.cpp | 2 +- .../fq_transformation.cpp | 2 +- .../fq_with_dq_not_optimal_transformation.cpp | 2 +- .../fully_connected_transformation.cpp | 2 +- ...fuse_fq_and_scale_shift_transformation.cpp | 2 +- .../gemm_transformation.cpp | 2 +- .../group_convolution_transformation.cpp | 2 +- .../groupconvolution_qdq_transformation.cpp | 2 +- .../move_fake_quantize_transformation.cpp | 2 +- .../output_layers.cpp | 2 +- .../output_layers_concat.cpp | 2 +- .../output_layers_concat_multi_channel.cpp | 2 +- .../pad_transformation.cpp | 2 +- .../pull_reshape_through_dequantization.cpp | 2 +- .../recurrent_cell_transformation.cpp | 2 +- .../reduce_max_transformation.cpp | 2 +- .../reduce_mean_transformation.cpp | 2 +- .../reduce_min_transformation.cpp | 2 +- .../reduce_sum_transformation.cpp | 2 +- .../reshape_transformation.cpp | 2 +- .../shuffle_channels_transformation.cpp | 2 +- .../split_transformation.cpp | 2 +- .../squeeze_transformation.cpp | 2 +- .../strided_slice_transformation.cpp | 2 +- .../subtract_transformation.cpp | 2 +- .../transpose_after_matmul_transformation.cpp | 2 +- .../unsqueeze_transformation.cpp | 2 +- .../variadic_split_transformation.cpp | 2 +- .../src/plugin/transformations_pipeline.cpp | 13 +- .../assign_and_read_value_transformation.cpp | 2 +- .../clamp_transformation.cpp | 2 +- .../concat_with_child_and_output.cpp | 2 +- ...t_with_different_precision_on_children.cpp | 2 +- ...oncat_with_intermediate_transformation.cpp | 2 +- ...at_with_neighbors_graph_transformation.cpp | 2 +- .../concat_with_split_transformation.cpp | 2 +- ...nvolution_backprop_data_transformation.cpp | 2 +- .../convolution_qdq_transformation.cpp | 2 +- .../convolution_transformation.cpp | 2 +- .../fq_and_avg_pool_transformation.cpp | 2 +- .../fq_and_max_pool_transformation.cpp | 2 +- ...d_two_output_branches_with_convolution.cpp | 2 +- .../fq_precision_selection_transformation.cpp | 2 +- .../fq_transformation.cpp | 2 +- .../fq_with_dq_not_optimal_transformation.cpp | 2 +- .../fully_connected_transformation.cpp | 2 +- ...fuse_fq_and_scale_shift_transformation.cpp | 2 +- .../gemm_transformation.cpp | 2 +- .../group_convolution_transformation.cpp | 2 +- .../groupconvolution_qdq_transformation.cpp | 2 +- .../move_fake_quantize_transformation.cpp | 2 +- .../output_layers.cpp | 2 +- .../output_layers_concat.cpp | 2 +- .../output_layers_concat_multi_channel.cpp | 2 +- .../pad_transformation.cpp | 2 +- .../pull_reshape_through_dequantization.cpp | 2 +- .../recurrent_cell_transformation.cpp | 2 +- .../reduce_max_transformation.cpp | 2 +- .../reduce_mean_transformation.cpp | 2 +- .../reduce_min_transformation.cpp | 2 +- .../reduce_sum_transformation.cpp | 2 +- .../reshape_transformation.cpp | 2 +- .../shuffle_channels_transformation.cpp | 2 +- .../split_transformation.cpp | 2 +- .../squeeze_transformation.cpp | 2 +- .../strided_slice_transformation.cpp | 2 +- .../subtract_transformation.cpp | 2 +- .../transpose_after_matmul_transformation.cpp | 2 +- .../unsqueeze_transformation.cpp | 2 +- .../variadic_split_transformation.cpp | 2 +- .../assign_and_read_value_transformation.hpp | 2 +- .../clamp_transformation.hpp | 2 +- .../concat_with_child_and_output.hpp | 2 +- ...t_with_different_precision_on_children.hpp | 2 +- ...oncat_with_intermediate_transformation.hpp | 2 +- ...at_with_neighbors_graph_transformation.hpp | 2 +- .../concat_with_split_transformation.hpp | 2 +- ...nvolution_backprop_data_transformation.hpp | 2 +- .../convolution_qdq_transformation.hpp | 2 +- .../convolution_transformation.hpp | 2 +- .../convolution_with_incorrect_weights.hpp | 2 +- ...eliminate_fake_quantize_transformation.hpp | 2 +- ...e_quantize_and_avg_pool_transformation.hpp | 2 +- ...e_quantize_and_max_pool_transformation.hpp | 2 +- ...d_two_output_branches_with_convolution.hpp | 2 +- ...ize_precision_selection_transformation.hpp | 2 +- .../fake_quantize_transformation.hpp | 2 +- ...ize_with_dq_not_optimal_transformation.hpp | 2 +- .../fully_connected_transformation.hpp | 2 +- ...antize_to_fake_quantize_transformation.hpp | 2 +- ...uantize_and_scale_shift_transformation.hpp | 2 +- ...ltiply_to_fake_quantize_transformation.hpp | 2 +- ...btract_to_fake_quantize_transformation.hpp | 2 +- .../gather_transformation.hpp | 2 +- .../gemm_transformation.hpp | 2 +- .../group_convolution_transformation.hpp | 2 +- .../groupconvolution_qdq_transformation.hpp | 2 +- .../move_fake_quantize_transformation.hpp | 2 +- .../output_layers_concat_multi_channel.hpp | 2 +- .../pad_transformation.hpp | 2 +- ..._through_dequantization_transformation.hpp | 2 +- .../recurrent_cell_transformation.hpp | 2 +- .../reduce_max_transformation.hpp | 2 +- .../reduce_mean_transformation.hpp | 2 +- .../reduce_min_transformation.hpp | 2 +- .../reduce_sum_transformation.hpp | 2 +- .../reshape_transformation.hpp | 2 +- .../shuffle_channels_transformation.hpp | 2 +- .../split_transformation.hpp | 2 +- .../squeeze_transformation.hpp | 2 +- .../strided_slice_transformation.hpp | 2 +- .../subtract_transformation.hpp | 2 +- .../transpose_after_matmul_transformation.hpp | 2 +- .../transpose_transformation.hpp | 2 +- .../unsqueeze_transformation.hpp | 2 +- .../variadic_split_transformation.hpp | 2 +- .../assign_and_read_value_transformation.cpp | 4 +- .../clamp_transformation.cpp | 4 +- .../concat_with_child_and_output.cpp | 4 +- ...t_with_different_precision_on_children.cpp | 6 +- ...oncat_with_intermediate_transformation.cpp | 6 +- ...at_with_neighbors_graph_transformation.cpp | 6 +- .../concat_with_split_transformation.cpp | 6 +- ...nvolution_backprop_data_transformation.cpp | 4 +- .../convolution_qdq_transformation.cpp | 4 +- .../convolution_transformation.cpp | 4 +- .../convolution_with_incorrect_weights.cpp | 4 +- ...e_quantize_and_avg_pool_transformation.cpp | 4 +- ...e_quantize_and_max_pool_transformation.cpp | 4 +- ...d_two_output_branches_with_convolution.cpp | 4 +- ...ize_precision_selection_transformation.cpp | 4 +- .../fake_quantize_transformation.cpp | 4 +- ...ize_with_dq_not_optimal_transformation.cpp | 4 +- .../fully_connected_transformation.cpp | 4 +- ...uantize_and_scale_shift_transformation.cpp | 4 +- .../gemm_transformation.cpp | 4 +- .../group_convolution_transformation.cpp | 4 +- .../groupconvolution_qdq_transformation.cpp | 4 +- .../mat_mul_with_optimized_constant_fq.cpp | 4 +- .../move_fake_quantize_transformation.cpp | 4 +- ...ultiply_with_one_parent_transformation.cpp | 2 +- .../output_layers_concat.cpp | 6 +- .../output_layers_concat_multi_channel.cpp | 6 +- ...put_layers_handling_in_transformations.cpp | 6 +- .../pad_transformation.cpp | 4 +- ..._through_dequantization_transformation.cpp | 4 +- .../recurrent_cell_transformation.cpp | 4 +- .../reduce_max_transformation.cpp | 4 +- .../reduce_mean_transformation.cpp | 4 +- .../reduce_min_transformation.cpp | 4 +- .../reduce_sum_transformation.cpp | 4 +- .../reshape_transformation.cpp | 4 +- .../shuffle_channels_transformation.cpp | 4 +- .../split_transformation.cpp | 6 +- .../squeeze_transformation.cpp | 6 +- .../strided_slice_transformation.cpp | 4 +- .../subtract_transformation.cpp | 4 +- .../transpose_after_matmul_transformation.cpp | 4 +- .../unsqueeze_transformation.cpp | 6 +- .../variadic_split_transformation.cpp | 6 +- .../layer_transformation.hpp | 16 +- .../layer_transformation.cpp | 24 +-- .../lpt_ngraph_functions/add_function.hpp | 4 +- .../lpt_ngraph_functions/common/builders.hpp | 4 +- .../convolution_function.hpp | 2 +- ...h_multi_parent_dequantization_function.hpp | 2 +- ...put_branches_with_convolution_function.hpp | 2 +- .../fake_quantize_function.hpp | 4 +- .../get_dequantization_function.hpp | 4 +- .../lpt_ngraph_functions/src/add_function.cpp | 6 +- ...oncat_quantization_parameters_function.cpp | 4 +- .../src/clamp_function.cpp | 2 +- .../src/common/builders.cpp | 4 +- .../src/compose_fake_quantize_function.cpp | 2 +- .../src/concat_function.cpp | 68 ++++---- .../convolution_backprop_data_function.cpp | 2 +- .../src/convolution_function.cpp | 8 +- .../src/depth_to_space_function.cpp | 2 +- .../src/elementwise_function.cpp | 2 +- ...h_multi_parent_dequantization_function.cpp | 4 +- ...put_branches_with_convolution_function.cpp | 10 +- .../src/fake_quantize_function.cpp | 10 +- ..._quantize_precision_selection_function.cpp | 8 +- .../src/get_dequantization_function.cpp | 8 +- .../src/group_convolution_function.cpp | 4 +- .../src/mat_mul_function.cpp | 2 +- .../src/max_pool_function.cpp | 2 +- .../move_dequantization_after_function.cpp | 4 +- .../src/multiply_function.cpp | 2 +- .../src/precision_propagation_function.cpp | 6 +- .../src/relu_function.cpp | 2 +- .../src/round_function.cpp | 2 +- .../src/shuffle_channels_function.cpp | 2 +- .../src/strided_slice_function.cpp | 2 +- .../src/subtract_function.cpp | 2 +- ...ract_multiply_to_multiply_add_function.cpp | 2 +- .../src/transpose_after_mat_mul_function.cpp | 2 +- 547 files changed, 2797 insertions(+), 3176 deletions(-) delete mode 100644 src/common/low_precision_transformations/tests/lpt_public_methods_test.cpp diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/pipeline/step2_markup.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/pipeline/step2_markup.md index 92f444a6aac..426c37c8879 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/pipeline/step2_markup.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/pipeline/step2_markup.md @@ -105,7 +105,7 @@ Model display features (here and below): The transformation is required and includes 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 ``:ref:`ngraph::pass::low_precision::LowPrecision ``` constructor. +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 ``:ref:`ov::pass::low_precision::LowPrecision ``` constructor. 2. Mark precision preserved operations. No attributes are required before the transformation. Changes in the example model after ``MarkupPrecisions`` transformation: diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/convert_subtract_constant.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/convert_subtract_constant.md index c2d0def3b1d..fcf51226301 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/convert_subtract_constant.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/convert_subtract_constant.md @@ -1,3 +1,3 @@ # ConvertSubtractConstant transformation {#openvino_docs_OV_UG_lpt_ConvertSubtractConstant} -ngraph::pass::low_precision::ConvertSubtractConstant class represents the `ConvertSubtractConstant` transformation. +ov::pass::low_precision::ConvertSubtractConstant class represents the `ConvertSubtractConstant` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md index 877fe7802b0..b9078b79e06 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_reshape_through_dequantization.md @@ -1,3 +1,3 @@ # PullReshapeThroughDequantization transformation {#openvino_docs_OV_UG_lpt_PullReshapeThroughDequantization} -ngraph::pass::low_precision::PullReshapeThroughDequantization class represents the `PullReshapeThroughDequantization` transformation. \ No newline at end of file +ov::pass::low_precision::PullReshapeThroughDequantization class represents the `PullReshapeThroughDequantization` transformation. \ No newline at end of file diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md index 6724c9e8070..7860b3c94a3 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step1_prerequisites/pull_transpose_through_dequantization.md @@ -1,3 +1,3 @@ # PullTransposeThroughDequantization transformation {#openvino_docs_OV_UG_lpt_PullTransposeThroughDequantization} -ngraph::pass::low_precision::PullTransposeThroughDequantization class represents the `PullTransposeThroughDequantization` transformation. +ov::pass::low_precision::PullTransposeThroughDequantization class represents the `PullTransposeThroughDequantization` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md index a09c7ff6d9f..8451e0638be 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_intervals.md @@ -1,3 +1,3 @@ # AlignQuantizationIntervals transformation {#openvino_docs_OV_UG_lpt_AlignQuantizationIntervals} -ngraph::pass::low_precision::AlignQuantizationIntervals class represents the `AlignQuantizationIntervals` transformation. +ov::pass::low_precision::AlignQuantizationIntervals class represents the `AlignQuantizationIntervals` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_parameters.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_parameters.md index 81a679abe20..d3244d08350 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_parameters.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/align_quantization_parameters.md @@ -1,3 +1,3 @@ # AlignQuantizationParameters transformation {#openvino_docs_OV_UG_lpt_AlignQuantizationParameters} -ngraph::pass::low_precision::AlignQuantizationParameters class represents the `AlignQuantizationParameters` transformation. +ov::pass::low_precision::AlignQuantizationParameters class represents the `AlignQuantizationParameters` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_attribute.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_attribute.md index 0661b095298..2e431051cc7 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_attribute.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_attribute.md @@ -1,3 +1,3 @@ # CreateAttribute transformation {#openvino_docs_OV_UG_lpt_CreateAttribute} -ngraph::pass::low_precision::CreateAttribute class represents the `CreateAttribute` transformation. \ No newline at end of file +ov::pass::low_precision::CreateAttribute class represents the `CreateAttribute` transformation. \ No newline at end of file diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md index 7051e8055d7..a8c62ee533a 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/create_precisions_dependent_attribute.md @@ -1,3 +1,3 @@ # CreatePrecisionsDependentAttribute transformation {#openvino_docs_OV_UG_lpt_CreatePrecisionsDependentAttribute} -ngraph::pass::low_precision::CreatePrecisionsDependentAttribute class represents the `CreatePrecisionsDependentAttribute` transformation. +ov::pass::low_precision::CreatePrecisionsDependentAttribute class represents the `CreatePrecisionsDependentAttribute` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md index 7f5c4379979..f457c39422c 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_avg_pool_precision_preserved.md @@ -1,3 +1,3 @@ # MarkupAvgPoolPrecisionPreserved transformation {#openvino_docs_OV_UG_lpt_MarkupAvgPoolPrecisionPreserved} -ngraph::pass::low_precision::MarkupAvgPoolPrecisionPreserved class represents the `MarkupAvgPoolPrecisionPreserved` transformation. +ov::pass::low_precision::MarkupAvgPoolPrecisionPreserved class represents the `MarkupAvgPoolPrecisionPreserved` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_bias.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_bias.md index 632d50cee6c..275a3e1b0fd 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_bias.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_bias.md @@ -1,3 +1,3 @@ # MarkupBias transformation {#openvino_docs_OV_UG_lpt_MarkupBias} -ngraph::pass::low_precision::MarkupBias class represents the `MarkupBias` transformation. +ov::pass::low_precision::MarkupBias class represents the `MarkupBias` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md index e40b874d1ac..b848eeb377c 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_can_be_quantized.md @@ -1,3 +1,3 @@ # MarkupCanBeQuantized transformation {#openvino_docs_OV_UG_lpt_MarkupCanBeQuantized} -ngraph::pass::low_precision::MarkupCanBeQuantized class represents the `MarkupCanBeQuantized` transformation. +ov::pass::low_precision::MarkupCanBeQuantized class represents the `MarkupCanBeQuantized` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md index ff9a5ddf902..1b783fb49fa 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_per_tensor_quantization.md @@ -1,3 +1,3 @@ # MarkupPerTensorQuantization transformation {#openvino_docs_OV_UG_lpt_MarkupPerTensorQuantization} -ngraph::pass::low_precision::MarkupPerTensorQuantization class represents the `MarkupPerTensorQuantization` transformation. +ov::pass::low_precision::MarkupPerTensorQuantization class represents the `MarkupPerTensorQuantization` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_precisions.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_precisions.md index fde72949132..b34364f6761 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_precisions.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/markup_precisions.md @@ -1,3 +1,3 @@ # MarkupPrecisions transformation {#openvino_docs_OV_UG_lpt_MarkupPrecisions} -ngraph::pass::low_precision::MarkupPrecisions class represents the `MarkupPrecisions` transformation. +ov::pass::low_precision::MarkupPrecisions class represents the `MarkupPrecisions` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_precisions.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_precisions.md index eea689d8549..f88812b63bd 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_precisions.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_precisions.md @@ -1,3 +1,3 @@ # PropagatePrecisions transformation {#openvino_docs_OV_UG_lpt_PropagatePrecisions} -ngraph::pass::low_precision::PropagatePrecisions class represents the `PropagatePrecisions` transformation. +ov::pass::low_precision::PropagatePrecisions class represents the `PropagatePrecisions` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_shared_value.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_shared_value.md index 4d0598af6ab..679fec1758a 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_shared_value.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_shared_value.md @@ -1,3 +1,3 @@ # PropagateSharedValue transformation {#openvino_docs_OV_UG_lpt_PropagateSharedValue} -ngraph::pass::low_precision::PropagateSharedValue class represents the `PropagateSharedValue` transformation. +ov::pass::low_precision::PropagateSharedValue class represents the `PropagateSharedValue` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md index 518d8c3298a..dfc974e7457 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_through_precision_preserved.md @@ -1,3 +1,3 @@ # PropagateThroughPrecisionPreserved transformation {#openvino_docs_OV_UG_lpt_PropagateThroughPrecisionPreserved} -ngraph::pass::low_precision::PropagateThroughPrecisionPreserved class represents the `PropagateThroughPrecisionPreserved` transformation. +ov::pass::low_precision::PropagateThroughPrecisionPreserved class represents the `PropagateThroughPrecisionPreserved` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_to_input.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_to_input.md index 8f8a67da080..06f6e610538 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_to_input.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/propagate_to_input.md @@ -1,3 +1,3 @@ # PropagateToInput transformation {#openvino_docs_OV_UG_lpt_PropagateToInput} -ngraph::pass::low_precision::PropagateToInput class represents the `PropagateToInput` transformation. +ov::pass::low_precision::PropagateToInput class represents the `PropagateToInput` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md index a39a04eeda4..539daadeea1 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step2_markup/update_shared_precision_preserved.md @@ -1,3 +1,3 @@ # UpdateSharedPrecisionPreserved transformation {#openvino_docs_OV_UG_lpt_UpdateSharedPrecisionPreserved} -ngraph::pass::low_precision::UpdateSharedPrecisionPreserved class represents the `UpdateSharedPrecisionPreserved` transformation. +ov::pass::low_precision::UpdateSharedPrecisionPreserved class represents the `UpdateSharedPrecisionPreserved` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/clamp.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/clamp.md index 8be61520cca..aaf9985efea 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/clamp.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/clamp.md @@ -1,3 +1,3 @@ # ClampTransformation transformation {#openvino_docs_OV_UG_lpt_ClampTransformation} -ngraph::pass::low_precision::ClampTransformation class represents the `Clamp` operation transformation. +ov::pass::low_precision::ClampTransformation class represents the `Clamp` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/prelu.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/prelu.md index 73dbdaca297..8b64f1c3033 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/prelu.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/prelu.md @@ -1,3 +1,3 @@ # PReluTransformation transformation {#openvino_docs_OV_UG_lpt_PReluTransformation} -ngraph::pass::low_precision::PReluTransformation class represents the `PRelu` operation transformation. +ov::pass::low_precision::PReluTransformation class represents the `PRelu` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/relu.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/relu.md index e276b97cb21..ddece6729e0 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/relu.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/activation/relu.md @@ -1,3 +1,3 @@ # ReluTransformation transformation {#openvino_docs_OV_UG_lpt_ReluTransformation} -ngraph::pass::low_precision::ReluTransformation class represents the `Relu` operation transformation. +ov::pass::low_precision::ReluTransformation class represents the `Relu` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/add.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/add.md index 988430b73e2..4b948afa33e 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/add.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/add.md @@ -1,6 +1,6 @@ # AddTransformation transformation {#openvino_docs_OV_UG_lpt_AddTransformation} -ngraph::pass::low_precision::AddTransformation class represents the `Add` operation transformation. +ov::pass::low_precision::AddTransformation class represents the `Add` operation transformation. The transformation propagates dequantization subtraction from one input branch to another and propagates dequantization multiplication from the same branch through `Add` operation. In transformation result, one `Add` operation input branch is in low precision without dequantization operations (empty branch), another input branch is in original precision with updated dequantization operations (full branch). diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md index 191503813d3..d71522468a8 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/multiply.md @@ -1,3 +1,3 @@ # MultiplyTransformation transformation {#openvino_docs_OV_UG_lpt_MultiplyTransformation} -ngraph::pass::low_precision::MultiplyTransformation class represents the `Multiply` operation transformation. \ No newline at end of file +ov::pass::low_precision::MultiplyTransformation class represents the `Multiply` operation transformation. \ No newline at end of file diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/subtract.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/subtract.md index 1e3508dde52..7f9780af147 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/subtract.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/arithmetic/subtract.md @@ -1,3 +1,3 @@ # SubtractTransformation transformation {#openvino_docs_OV_UG_lpt_SubtractTransformation} -ngraph::pass::low_precision::SubtractTransformation class represents the `Subtract` operation transformation. \ No newline at end of file +ov::pass::low_precision::SubtractTransformation class represents the `Subtract` operation transformation. \ No newline at end of file diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution.md index 4c2c8641198..11af43ce9f1 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution.md @@ -1,6 +1,6 @@ # ConvolutionTransformation transformation {#openvino_docs_OV_UG_lpt_ConvolutionTransformation} -ngraph::pass::low_precision::ConvolutionTransformation class represents the `Convolution` operation transformation. +ov::pass::low_precision::ConvolutionTransformation class represents the `Convolution` operation transformation. The transformation propagates dequantization operations on activations and weights through the `Convolution` operation. The transformation supports several weights quantization approaches: * quantized weights in low precision with dequantization operations, diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md index e826fe99001..b07acee4731 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/convolution_backprop_data.md @@ -1,3 +1,3 @@ # ConvolutionBackpropDataTransformation transformation {#openvino_docs_OV_UG_lpt_ConvolutionBackpropDataTransformation} -ngraph::pass::low_precision::ConvolutionBackpropDataTransformation class represents the `ConvolutionBackpropData` operation transformation. +ov::pass::low_precision::ConvolutionBackpropDataTransformation class represents the `ConvolutionBackpropData` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md index 9d901f49c54..b0890d790f1 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/convolution/group_convolution.md @@ -1,3 +1,3 @@ # GroupConvolutionTransformation transformation {#openvino_docs_OV_UG_lpt_GroupConvolutionTransformation} -ngraph::pass::low_precision::GroupConvolutionTransformation class represents the `GroupConvolution` operation transformation. +ov::pass::low_precision::GroupConvolutionTransformation class represents the `GroupConvolution` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/image/interpolate.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/image/interpolate.md index 262efba6a83..4ba9ed164f5 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/image/interpolate.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/image/interpolate.md @@ -1,3 +1,3 @@ # InterpolateTransformation transformation {#openvino_docs_OV_UG_lpt_InterpolateTransformation} -ngraph::pass::low_precision::InterpolateTransformation class represents the `Interpolate` operation transformation. +ov::pass::low_precision::InterpolateTransformation class represents the `Interpolate` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md index e4ba145c742..1d71d9c94e5 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/matrix/mat_mul.md @@ -1,3 +1,3 @@ # MatMulTransformation transformation {#openvino_docs_OV_UG_lpt_MatMulTransformation} -ngraph::pass::low_precision::MatMulTransformation class represents the `MatMul` operation transformation. +ov::pass::low_precision::MatMulTransformation class represents the `MatMul` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/concat.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/concat.md index dfca44da7e3..931f88ed21e 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/concat.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/concat.md @@ -1,3 +1,3 @@ # ConcatTransformation transformation {#openvino_docs_OV_UG_lpt_ConcatTransformation} -ngraph::pass::low_precision::ConcatTransformation class represents the `Concat` operation transformation. +ov::pass::low_precision::ConcatTransformation class represents the `Concat` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md index 4b738ad29c5..8942b8e9367 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/depth_to_space.md @@ -1,3 +1,3 @@ # DepthToSpaceTransformation transformation {#openvino_docs_OV_UG_lpt_DepthToSpaceTransformation} -ngraph::pass::low_precision::DepthToSpaceTransformation class represents the `DepthToSpace` operation transformation. +ov::pass::low_precision::DepthToSpaceTransformation class represents the `DepthToSpace` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/gather.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/gather.md index 7e4f5904254..60809393b08 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/gather.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/gather.md @@ -1,3 +1,3 @@ # GatherTransformation transformation {#openvino_docs_OV_UG_lpt_GatherTransformation} -ngraph::pass::low_precision::GatherTransformation class represents the `Gather` operation transformation. +ov::pass::low_precision::GatherTransformation class represents the `Gather` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/pad.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/pad.md index dc00d2ada7d..e868049bb0e 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/pad.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/pad.md @@ -1,3 +1,3 @@ # PadTransformation transformation {#openvino_docs_OV_UG_lpt_PadTransformation} -ngraph::pass::low_precision::PadTransformation class represents the `Pad` operation transformation. +ov::pass::low_precision::PadTransformation class represents the `Pad` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md index b3c9394b601..3cfee85b07c 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/shuffle_channels.md @@ -1,3 +1,3 @@ # ShuffleChannelsTransformation transformation {#openvino_docs_OV_UG_lpt_ShuffleChannelsTransformation} -ngraph::pass::low_precision::ShuffleChannelsTransformation class represents the `ShuffleChannels` operation transformation. +ov::pass::low_precision::ShuffleChannelsTransformation class represents the `ShuffleChannels` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/split.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/split.md index 19027de150b..45e6044e39c 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/split.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/split.md @@ -1,3 +1,3 @@ # SplitTransformation transformation {#openvino_docs_OV_UG_lpt_SplitTransformation} -ngraph::pass::low_precision::SplitTransformation class represents the `Split` operation transformation. +ov::pass::low_precision::SplitTransformation class represents the `Split` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/strided_slice.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/strided_slice.md index 6b27f4d63b8..a0f7aee2082 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/strided_slice.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/strided_slice.md @@ -1,3 +1,3 @@ # StridedSliceTransformation transformation {#openvino_docs_OV_UG_lpt_StridedSliceTransformation} -ngraph::pass::low_precision::StridedSliceTransformation class represents the `StridedSlice` operation transformation. +ov::pass::low_precision::StridedSliceTransformation class represents the `StridedSlice` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/transpose.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/transpose.md index 09b062a33fa..9ad220086ff 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/transpose.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/transpose.md @@ -1,3 +1,3 @@ # TransposeTransformation transformation {#openvino_docs_OV_UG_lpt_TransposeTransformation} -ngraph::pass::low_precision::TransposeTransformation class represents the `Transpose` operation transformation. +ov::pass::low_precision::TransposeTransformation class represents the `Transpose` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/variadic_split.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/variadic_split.md index 9d0fdbd91f5..3eaf258e9b8 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/variadic_split.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/movement/variadic_split.md @@ -1,3 +1,3 @@ # VariadicSplitTransformation transformation {#openvino_docs_OV_UG_lpt_VariadicSplitTransformation} -ngraph::pass::low_precision::VariadicSplitTransformation class represents the `VariadicSplit` operation transformation. +ov::pass::low_precision::VariadicSplitTransformation class represents the `VariadicSplit` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/mvn.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/mvn.md index 33db4898fb5..bf271e7e49f 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/mvn.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/mvn.md @@ -1,3 +1,3 @@ # MVNTransformation transformation {#openvino_docs_OV_UG_lpt_MVNTransformation} -ngraph::pass::low_precision::MVNTransformation class represents the `MVN` operation transformation. +ov::pass::low_precision::MVNTransformation class represents the `MVN` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md index 110e0ae89e2..987869cb5ae 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/normalization/normalize_l2.md @@ -1,3 +1,3 @@ # NormalizeL2Transformation transformation {#openvino_docs_OV_UG_lpt_NormalizeL2Transformation} -ngraph::pass::low_precision::NormalizeL2Transformation class represents the `NormalizeL2` operation transformation. +ov::pass::low_precision::NormalizeL2Transformation class represents the `NormalizeL2` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md index 21a14dc0df9..98a2cb2723c 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/avg_pool.md @@ -1,3 +1,3 @@ # AvgPoolTransformation transformation {#openvino_docs_OV_UG_lpt_AvgPoolTransformation} -ngraph::pass::low_precision::AvgPoolTransformation class represents the `AvgPool` operation transformation. +ov::pass::low_precision::AvgPoolTransformation class represents the `AvgPool` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/max_pool.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/max_pool.md index cec75b0eba0..20aa77d6fbf 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/max_pool.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/pooling/max_pool.md @@ -1,3 +1,3 @@ # MaxPoolTransformation transformation {#openvino_docs_OV_UG_lpt_MaxPoolTransformation} -ngraph::pass::low_precision::MaxPoolTransformation class represents the `MaxPool` operation transformation. +ov::pass::low_precision::MaxPoolTransformation class represents the `MaxPool` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md index 8191df23c35..cfa6568c1d7 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fake_quantize.md @@ -1,3 +1,3 @@ # FakeQuantizeTransformation transformation {#openvino_docs_OV_UG_lpt_FakeQuantizeTransformation} -ngraph::pass::low_precision::FakeQuantizeTransformation class represents the `FakeQuantize` operation transformation. +ov::pass::low_precision::FakeQuantizeTransformation class represents the `FakeQuantize` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md index b1abc1229c0..911b3e85bca 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/quantization/fold_fake_quantize.md @@ -1,3 +1,3 @@ # FoldFakeQuantizeTransformation transformation {#openvino_docs_OV_UG_lpt_FoldFakeQuantizeTransformation} -ngraph::pass::low_precision::FoldFakeQuantizeTransformation class represents the `FoldFakeQuantize` operation transformation. +ov::pass::low_precision::FoldFakeQuantizeTransformation class represents the `FoldFakeQuantize` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md index 74de35e8548..5e091b766aa 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_max.md @@ -1,3 +1,3 @@ # ReduceMaxTransformation transformation {#openvino_docs_OV_UG_lpt_ReduceMaxTransformation} -ngraph::pass::low_precision::ReduceMaxTransformation class represents the `ReduceMax` operation transformation. +ov::pass::low_precision::ReduceMaxTransformation class represents the `ReduceMax` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md index 56597a9076c..2570ecf9af4 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_mean.md @@ -1,3 +1,3 @@ # ReduceMeanTransformation transformation {#openvino_docs_OV_UG_lpt_ReduceMeanTransformation} -ngraph::pass::low_precision::ReduceMeanTransformation class represents the `ReduceMean` operation transformation. +ov::pass::low_precision::ReduceMeanTransformation class represents the `ReduceMean` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md index 77228a1f3f5..0592a67726e 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_min.md @@ -1,3 +1,3 @@ # ReduceMinTransformation transformation {#openvino_docs_OV_UG_lpt_ReduceMinTransformation} -ngraph::pass::low_precision::ReduceMinTransformation class represents the `ReduceMin` operation transformation. +ov::pass::low_precision::ReduceMinTransformation class represents the `ReduceMin` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md index ad5a82eddb1..d458f10bd90 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/reduction/reduce_sum.md @@ -1,3 +1,3 @@ # ReduceSumTransformation transformation {#openvino_docs_OV_UG_lpt_ReduceSumTransformation} -ngraph::pass::low_precision::ReduceSumTransformation class represents the `ReduceSum` operation transformation. +ov::pass::low_precision::ReduceSumTransformation class represents the `ReduceSum` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/reshape.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/reshape.md index f155b0883ad..49402761aea 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/reshape.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/reshape.md @@ -1,3 +1,3 @@ # ReshapeTransformation transformation {#openvino_docs_OV_UG_lpt_ReshapeTransformation} -ngraph::pass::low_precision::ReshapeTransformation class represents the `Reshape` operation transformation. +ov::pass::low_precision::ReshapeTransformation class represents the `Reshape` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/squeeze.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/squeeze.md index e71a649fd8f..adf955f9ba3 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/squeeze.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/squeeze.md @@ -1,3 +1,3 @@ # SqueezeTransformation transformation {#openvino_docs_OV_UG_lpt_SqueezeTransformation} -ngraph::pass::low_precision::SqueezeTransformation class represents the `Squeeze` operation transformation. +ov::pass::low_precision::SqueezeTransformation class represents the `Squeeze` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md index 475a62c4568..b845f2bd844 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step3_main/shape/unsqueeze.md @@ -1,3 +1,3 @@ # UnsqueezeTransformation transformation {#openvino_docs_OV_UG_lpt_UnsqueezeTransformation} -ngraph::pass::low_precision::UnsqueezeTransformation class represents the `Unsqueeze` operation transformation. +ov::pass::low_precision::UnsqueezeTransformation class represents the `Unsqueeze` operation transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/eliminate_fake_quantize.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/eliminate_fake_quantize.md index 55d254a4ab2..75fc82d15ed 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/eliminate_fake_quantize.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/eliminate_fake_quantize.md @@ -1,3 +1,3 @@ # EliminateFakeQuantizeTransformation transformation {#openvino_docs_OV_UG_lpt_EliminateFakeQuantizeTransformation} -ngraph::pass::low_precision::EliminateFakeQuantizeTransformation class represents the `EliminateFakeQuantizeTransformation` transformation. +ov::pass::low_precision::EliminateFakeQuantizeTransformation class represents the `EliminateFakeQuantizeTransformation` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md index 82edb11df1a..6a63908a521 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fake_quantize_decomposition.md @@ -1,3 +1,3 @@ # FakeQuantizeDecompositionTransformation transformation {#openvino_docs_OV_UG_lpt_FakeQuantizeDecompositionTransformation} -ngraph::pass::low_precision::FakeQuantizeDecompositionTransformation class represents the `FakeQuantizeDecompositionTransformation` transformation. +ov::pass::low_precision::FakeQuantizeDecompositionTransformation class represents the `FakeQuantizeDecompositionTransformation` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fold_convert.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fold_convert.md index 9e620447ec6..85ba83d0870 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fold_convert.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fold_convert.md @@ -1,3 +1,3 @@ # FoldConvertTransformation transformation {#openvino_docs_OV_UG_lpt_FoldConvertTransformation} -ngraph::pass::low_precision::FoldConvertTransformation class represents the `FoldConvertTransformation` transformation. +ov::pass::low_precision::FoldConvertTransformation class represents the `FoldConvertTransformation` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md index 6e3f551e8af..684cf2754fa 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_convert.md @@ -1,3 +1,3 @@ # FuseConvertTransformation transformation {#openvino_docs_OV_UG_lpt_FuseConvertTransformation} -ngraph::pass::low_precision::FuseConvertTransformation class represents the `FuseConvertTransformation` transformation. +ov::pass::low_precision::FuseConvertTransformation class represents the `FuseConvertTransformation` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md index e029ffa8d1b..73767a46184 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_multiply_to_fake_quantize.md @@ -1,3 +1,3 @@ # FuseMultiplyToFakeQuantizeTransformation transformation {#openvino_docs_OV_UG_lpt_FuseMultiplyToFakeQuantizeTransformation} -ngraph::pass::low_precision::FuseMultiplyToFakeQuantizeTransformation class represents the `FuseMultiplyToFakeQuantizeTransformation` transformation. +ov::pass::low_precision::FuseMultiplyToFakeQuantizeTransformation class represents the `FuseMultiplyToFakeQuantizeTransformation` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md index e5683cf01fe..b6e98eaff4e 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/fuse_subtract_to_fake_quantize.md @@ -1,3 +1,3 @@ # FuseSubtractToFakeQuantizeTransformation transformation {#openvino_docs_OV_UG_lpt_FuseSubtractToFakeQuantizeTransformation} -ngraph::pass::low_precision::FuseSubtractToFakeQuantizeTransformation class represents the `FuseSubtractToFakeQuantizeTransformation` transformation. +ov::pass::low_precision::FuseSubtractToFakeQuantizeTransformation class represents the `FuseSubtractToFakeQuantizeTransformation` transformation. diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md index 4309b2cec90..9517a219c54 100644 --- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md +++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/transformations/step4_cleanup/multiply_to_group_convolution.md @@ -1,3 +1,3 @@ # MultiplyToGroupConvolutionTransformation transformation {#openvino_docs_OV_UG_lpt_MultiplyToGroupConvolutionTransformation} -ngraph::pass::low_precision::MultiplyToGroupConvolutionTransformation class represents the `MultiplyToGroupConvolutionTransformation` transformation. +ov::pass::low_precision::MultiplyToGroupConvolutionTransformation class represents the `MultiplyToGroupConvolutionTransformation` transformation. diff --git a/docs/snippets/lpt_intel_cpu_plugin.cpp b/docs/snippets/lpt_intel_cpu_plugin.cpp index 5d491346aa2..3cd3f06430e 100644 --- a/docs/snippets/lpt_intel_cpu_plugin.cpp +++ b/docs/snippets/lpt_intel_cpu_plugin.cpp @@ -33,9 +33,9 @@ ov::pass::Manager manager; auto pass_config = manager.get_pass_config(); //! [lpt_common] // check if the function is quantized to ignore LPT transformations for not quantized function to speed up model loading -const bool useLpt = ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(nGraphFunc); +const bool useLpt = ov::pass::low_precision::LowPrecision::isFunctionQuantized(nGraphFunc); auto defaultPrecisions = - useLpt ? ngraph::pass::low_precision::precision_set::int8_support : std::vector{}; + useLpt ? ov::pass::low_precision::precision_set::int8_support : std::vector{}; if (useLpt) { // disable constant folding on dequantization subgraphs so they can be processed by LPT manager.register_pass(defaultPrecisions); @@ -45,7 +45,7 @@ if (useLpt) { if (useLpt) { // convert subtract constant to INT8 to prevent unnecessary FP16 to FP32 conversion - manager.register_pass(defaultPrecisions); + manager.register_pass(defaultPrecisions); } // nGraph common transformations happen here @@ -53,12 +53,12 @@ if (useLpt) { if (useLpt) { // convert not supported cases FakeQuantize -> Convert -> Convert -> Subtract -> Multiply to a single FakeQuantize pass_config->set_callback([&defaultPrecisions](const std::shared_ptr &node) -> bool { - return ngraph::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(node, defaultPrecisions); + return ov::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(node, defaultPrecisions); }); // convert not supported cases FakeQuantize -> Convert -> Convert -> Subtract -> Multiply to a single FakeQuantize pass_config->set_callback([&defaultPrecisions](const std::shared_ptr &node) -> bool { - return ngraph::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForSubtract(node, defaultPrecisions); + return ov::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForSubtract(node, defaultPrecisions); }); } @@ -66,7 +66,7 @@ manager.run_passes(nGraphFunc); //! [lpt_common] //! [lpt_execution] -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; if (useLpt) { // Low precision transformations plugin specific configuration: restrictions definition auto supportedPrecisions = std::vector({ @@ -96,7 +96,7 @@ if (useLpt) { // Low precision transformations instantiation and registration in pass manager ov::pass::Manager lptManager; - lptManager.register_pass(supportedPrecisions, perTensorQuantization); + lptManager.register_pass(supportedPrecisions, perTensorQuantization); // Low precision transformations plugin specific configuration: transformation callbacks definition lptManager.get_pass_config()->set_callback([](const std::shared_ptr& node) -> bool { @@ -130,7 +130,7 @@ int lpt_supported_precisions() { std::shared_ptr nGraphFunc; ov::pass::Manager manager; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; //! [lpt_supported_precisions] auto supportedPrecisions = std::vector({ PrecisionsRestriction::create({ @@ -140,7 +140,7 @@ auto supportedPrecisions = std::vector({ }); ov::pass::Manager lptManager; -lptManager.register_pass(supportedPrecisions); +lptManager.register_pass(supportedPrecisions); lptManager.run_passes(nGraphFunc); //! [lpt_supported_precisions] @@ -154,7 +154,7 @@ return 0; int per_tensor_quantization() { std::shared_ptr nGraphFunc; //! [per_tensor_quantization] -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; const std::vector emptyRestrictions; @@ -163,7 +163,7 @@ auto perTensorQuantization = std::vector({ }); ov::pass::Manager lptManager; -lptManager.register_pass(emptyRestrictions, perTensorQuantization); +lptManager.register_pass(emptyRestrictions, perTensorQuantization); lptManager.run_passes(nGraphFunc); //! [per_tensor_quantization] @@ -177,10 +177,10 @@ auto pass_config = manager.get_pass_config(); //! [asymmetric_quantization] -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; ov::pass::Manager lptManager; -lptManager.register_pass(); +lptManager.register_pass(); lptManager.get_pass_config()->set_callback([&defaultPrecisions](const std::shared_ptr& node) -> bool { return LayerTransformation::isAsymmetricQuantization(node, defaultPrecisions) || WeightableLayerTransformation::isAsymmetricOnWeights(node); }); @@ -194,7 +194,7 @@ int lpt_markup_pipeline() { std::shared_ptr nGraphFunc; ov::pass::Manager manager; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; //! [lpt_markup_pipeline] auto supportedPrecisions = std::vector({ PrecisionsRestriction::create({ @@ -208,7 +208,7 @@ auto perTensorQuantization = std::vector({ }); ov::pass::Manager lptManager; -lptManager.register_pass(supportedPrecisions, perTensorQuantization); +lptManager.register_pass(supportedPrecisions, perTensorQuantization); lptManager.run_passes(nGraphFunc); //! [lpt_markup_pipeline] diff --git a/docs/suppress_warnings.txt b/docs/suppress_warnings.txt index b741960b8fc..5a88c3b6f7e 100644 --- a/docs/suppress_warnings.txt +++ b/docs/suppress_warnings.txt @@ -16,6 +16,7 @@ no uniquely matching class member found for example was already documented\. ignoring documentation found here\. documentation for unknown define detected potential recursive class relation between class +no matching class member found for no matching file member found for documented empty return type of documented symbol diff --git a/src/common/low_precision_transformations/include/itt.hpp b/src/common/low_precision_transformations/include/itt.hpp index 3636415fc89..37e01b9cfc4 100644 --- a/src/common/low_precision_transformations/include/itt.hpp +++ b/src/common/low_precision_transformations/include/itt.hpp @@ -9,11 +9,11 @@ #pragma once -#include -#include -#include +#include "openvino/cc/selective_build.h" +#include "openvino/itt.hpp" +#include "openvino/cc/pass/itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { namespace itt { diff --git a/src/common/low_precision_transformations/include/low_precision/add.hpp b/src/common/low_precision_transformations/include/low_precision/add.hpp index f98e4545a0b..493d4150998 100644 --- a/src/common/low_precision_transformations/include/low_precision/add.hpp +++ b/src/common/low_precision_transformations/include/low_precision/add.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "low_precision/eltwise_base_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,10 +24,10 @@ class LP_TRANSFORMATIONS_API AddTransformation : public EltwiseBaseTransformatio public: OPENVINO_RTTI("AddTransformation", "0"); AddTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp b/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp index e25a3244082..20d4593ba18 100644 --- a/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp +++ b/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp @@ -9,7 +9,7 @@ #include "low_precision/layer_transformation.hpp" #include "openvino/pass/pass.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -17,7 +17,7 @@ class LP_TRANSFORMATIONS_API AlignQuantizationIntervals; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -28,11 +28,11 @@ class LP_TRANSFORMATIONS_API AlignQuantizationIntervals; * [AlignQuantizationIntervals](@ref openvino_docs_OV_UG_lpt_AlignQuantizationIntervals) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::AlignQuantizationIntervals : public ov::pass::ModelPass { +class ov::pass::low_precision::AlignQuantizationIntervals : public ov::pass::ModelPass { public: OPENVINO_RTTI("AlignQuantizationIntervals", "0"); - AlignQuantizationIntervals(const std::vector& defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_support); + AlignQuantizationIntervals(const std::vector& defaultPrecisions = ov::pass::low_precision::precision_set::int8_support); bool run_on_model(const std::shared_ptr& m) override; private: - const std::vector defaultPrecisions; + const std::vector defaultPrecisions; }; diff --git a/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp b/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp index 1059d85f5a0..3431f6b35b5 100644 --- a/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp +++ b/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp @@ -6,11 +6,11 @@ #include -#include +#include "openvino/pass/pass.hpp" #include "low_precision/lpt_visibility.hpp" #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -18,7 +18,7 @@ class LP_TRANSFORMATIONS_API AlignQuantizationParameters; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -29,11 +29,11 @@ class LP_TRANSFORMATIONS_API AlignQuantizationParameters; * [AlignQuantizationParameters](@ref openvino_docs_OV_UG_lpt_AlignQuantizationParameters) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::AlignQuantizationParameters : public ov::pass::ModelPass { +class ov::pass::low_precision::AlignQuantizationParameters : public ov::pass::ModelPass { public: OPENVINO_RTTI("AlignQuantizationParameters", "0"); - AlignQuantizationParameters(const std::vector defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_support); - bool run_on_model(const std::shared_ptr& m) override; + AlignQuantizationParameters(const std::vector defaultPrecisions = ov::pass::low_precision::precision_set::int8_support); + bool run_on_model(const std::shared_ptr& m) override; private: - const std::vector defaultPrecisions; + const std::vector defaultPrecisions; }; diff --git a/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp b/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp index 0f9fca728d1..a1a25b40155 100644 --- a/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp +++ b/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp @@ -4,24 +4,24 @@ #pragma once -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { class LP_TRANSFORMATIONS_API AssignAndReadValueTransformation : public LayerTransformation { public: OPENVINO_RTTI("AssignAndReadValueTransformation", "0"); - AssignAndReadValueTransformation(const std::shared_ptr function, const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher& m) override; + AssignAndReadValueTransformation(const std::shared_ptr model, const Params& params = Params()); + bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; private: - std::shared_ptr function; + std::shared_ptr model; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp b/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp index f2a5465586d..47c7ae244cc 100644 --- a/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp +++ b/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp @@ -7,7 +7,7 @@ #include #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -30,4 +30,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp b/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp index 99daa1403a7..7a7359b79a5 100644 --- a/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp +++ b/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp @@ -3,11 +3,11 @@ // #pragma once -#include -#include +#include "openvino/core/node.hpp" +#include "openvino/pass/graph_rewrite.hpp" #include "rt_info/attribute_parameters.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -15,9 +15,9 @@ class LP_TRANSFORMATIONS_API BaseMatcherPass; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov -class LP_TRANSFORMATIONS_API ngraph::pass::low_precision::BaseMatcherPass : public ov::pass::MatcherPass { +class LP_TRANSFORMATIONS_API ov::pass::low_precision::BaseMatcherPass : public ov::pass::MatcherPass { public: BaseMatcherPass(const AttributeParameters& params = AttributeParameters()); AttributeParameters params; diff --git a/src/common/low_precision_transformations/include/low_precision/clamp.hpp b/src/common/low_precision_transformations/include/low_precision/clamp.hpp index 6973ccd2b17..5056d41a78c 100644 --- a/src/common/low_precision_transformations/include/low_precision/clamp.hpp +++ b/src/common/low_precision_transformations/include/low_precision/clamp.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API ClampTransformation : public LayerTransformation { public: OPENVINO_RTTI("ClampTransformation", "0"); ClampTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher& m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/common/fake_quantize_dequantization.hpp b/src/common/low_precision_transformations/include/low_precision/common/fake_quantize_dequantization.hpp index 774e0ac26c9..91352bda535 100644 --- a/src/common/low_precision_transformations/include/low_precision/common/fake_quantize_dequantization.hpp +++ b/src/common/low_precision_transformations/include/low_precision/common/fake_quantize_dequantization.hpp @@ -6,11 +6,11 @@ #include #include -#include +#include "low_precision/lpt_visibility.hpp" #include "openvino/core/node.hpp" #include "openvino/opsets/opset1.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -35,17 +35,17 @@ public: bool isLowPrecision() const; std::shared_ptr copyWithNewInput(const std::shared_ptr& input) const; - bool checkElementwise(const std::shared_ptr& elementwise) const; + bool checkElementwise(const std::shared_ptr& elementwise) const; - static bool checkShape(const std::shared_ptr& elementwise); + static bool checkShape(const std::shared_ptr& elementwise); static int fillDequantizationParams( - const std::shared_ptr& elementwise, + const std::shared_ptr& elementwise, std::shared_ptr& convert, std::shared_ptr& constant); static int fillDequantizationParams( - const std::shared_ptr& elementwise, + const std::shared_ptr& elementwise, std::shared_ptr& constant); size_t channelDimIndex; @@ -60,4 +60,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/common/ie_lpt_exception.hpp b/src/common/low_precision_transformations/include/low_precision/common/ie_lpt_exception.hpp index 89d9c197552..99798f78061 100644 --- a/src/common/low_precision_transformations/include/low_precision/common/ie_lpt_exception.hpp +++ b/src/common/low_precision_transformations/include/low_precision/common/ie_lpt_exception.hpp @@ -6,16 +6,16 @@ #include #include -#include -#include +#include "openvino/core/node.hpp" +#include "low_precision/lpt_visibility.hpp" /** * @def THROW_TRANSFORMATION_EXCEPTION_LPT * @brief A macro used to throw the exception with a notable description for low precision transformations */ -#define THROW_IE_LPT_EXCEPTION(node) throw ::ngraph::pass::low_precision::InferenceEngineLptException(__FILE__, __LINE__, node) +#define THROW_IE_LPT_EXCEPTION(node) throw ::ov::pass::low_precision::InferenceEngineLptException(__FILE__, __LINE__, node) -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -39,7 +39,7 @@ public: } }; -#define THROW_TRANSFORMATION_EXCEPTION throw ::ngraph::pass::low_precision::Exception() << __FILE__ << ":" << __LINE__ << " " +#define THROW_TRANSFORMATION_EXCEPTION throw ::ov::pass::low_precision::Exception() << __FILE__ << ":" << __LINE__ << " " class LP_TRANSFORMATIONS_API InferenceEngineLptException : public Exception { @@ -53,4 +53,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/common/port_quantization_granularity_restriction.hpp b/src/common/low_precision_transformations/include/low_precision/common/port_quantization_granularity_restriction.hpp index 388aa8d7609..af23277f75d 100644 --- a/src/common/low_precision_transformations/include/low_precision/common/port_quantization_granularity_restriction.hpp +++ b/src/common/low_precision_transformations/include/low_precision/common/port_quantization_granularity_restriction.hpp @@ -11,7 +11,7 @@ #include "low_precision/lpt_visibility.hpp" #include "low_precision/rt_info/quantization_granularity_attribute.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -27,4 +27,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/common/precisions_restriction.hpp b/src/common/low_precision_transformations/include/low_precision/common/precisions_restriction.hpp index 241d1bcb38b..31d820d1eb4 100644 --- a/src/common/low_precision_transformations/include/low_precision/common/precisions_restriction.hpp +++ b/src/common/low_precision_transformations/include/low_precision/common/precisions_restriction.hpp @@ -9,10 +9,10 @@ #include #include -#include +#include "low_precision/lpt_visibility.hpp" #include "openvino/core/node.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { /** @@ -21,30 +21,30 @@ namespace low_precision { * the same precision for mentioned * * // One restriction for each port -* PrecisionsRestriction::create({ -* {{0}, {ngraph::element::u8}}, -* {{1}, {ngraph::element::i8}}, +* PrecisionsRestriction::create({ +* {{0}, {ov::element::u8}}, +* {{1}, {ov::element::i8}}, * }), * * // Common precision restriction for several ports: * // both inputs will have the same precision -* PrecisionsRestriction::create({ -* {{0, 1}, {ngraph::element::u8, ngraph::element::i8}} +* PrecisionsRestriction::create({ +* {{0, 1}, {ov::element::u8, ov::element::i8}} * }), */ class PrecisionsRestriction { public: - using PrecisionsByPorts = std::vector, std::vector>>; + using PrecisionsByPorts = std::vector, std::vector>>; using PrecisionsByPortsFunction = std::function&)>; - ngraph::Node::type_info_t operationType; + ov::Node::type_info_t operationType; bool specifyVersion; PrecisionsByPorts precisionsByPorts; PrecisionsByPortsFunction precisionsByPortsFunction; PrecisionsRestriction() = default; PrecisionsRestriction( - const ngraph::Node::type_info_t& operationType, + const ov::Node::type_info_t& operationType, const bool specifyVersion, const PrecisionsByPorts& precisionsByPorts) : operationType(operationType), @@ -52,7 +52,7 @@ public: precisionsByPorts(precisionsByPorts) {} PrecisionsRestriction( - const ngraph::Node::type_info_t& operationType, + const ov::Node::type_info_t& operationType, const bool specifyVersion, const PrecisionsByPortsFunction& precisionsByPortsFunction) : operationType(operationType), @@ -86,4 +86,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/common/quantization_granularity_restriction.hpp b/src/common/low_precision_transformations/include/low_precision/common/quantization_granularity_restriction.hpp index 1345e8951bb..927932e2d0d 100644 --- a/src/common/low_precision_transformations/include/low_precision/common/quantization_granularity_restriction.hpp +++ b/src/common/low_precision_transformations/include/low_precision/common/quantization_granularity_restriction.hpp @@ -6,26 +6,26 @@ #include -#include +#include "openvino/core/node.hpp" -#include -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "low_precision/rt_info/quantization_granularity_attribute.hpp" +#include "low_precision/common/port_quantization_granularity_restriction.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { class LP_TRANSFORMATIONS_API QuantizationGranularityRestriction { public: - ngraph::Node::type_info_t operationType; + ov::Node::type_info_t operationType; bool specifyVersion; std::vector restrictions; QuantizationGranularityRestriction() = default; QuantizationGranularityRestriction( - const ngraph::Node::type_info_t operationType, + const ov::Node::type_info_t operationType, const bool specifyVersion, const std::vector& restrictions) : operationType(operationType), @@ -48,7 +48,7 @@ public: for (auto i = 0ul; i < restrictedPorts.size(); ++i) { restrictions.push_back(PortQuantizationGranularityRestriction( restrictedPorts[i], - ngraph::QuantizationGranularityAttribute::Granularity::PerTensor)); + ov::QuantizationGranularityAttribute::Granularity::PerTensor)); } return QuantizationGranularityRestriction(T::get_type_info_static(), specifyVersion, restrictions); } @@ -66,4 +66,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/concat.hpp b/src/common/low_precision_transformations/include/low_precision/concat.hpp index 14a1ab4e00c..57a5440bb02 100644 --- a/src/common/low_precision_transformations/include/low_precision/concat.hpp +++ b/src/common/low_precision_transformations/include/low_precision/concat.hpp @@ -10,12 +10,12 @@ #include #include -#include + #include "layer_transformation.hpp" #include "common/fake_quantize_dequantization.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -31,7 +31,7 @@ class LP_TRANSFORMATIONS_API ConcatTransformation : public LayerTransformation { public: OPENVINO_RTTI("ConcatTransformation", "0"); ConcatTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; static bool isQuantizedStatic(const std::shared_ptr& layer); @@ -39,4 +39,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/convert.hpp b/src/common/low_precision_transformations/include/low_precision/convert.hpp index 0329eccdf5b..58dcbdff0f2 100644 --- a/src/common/low_precision_transformations/include/low_precision/convert.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convert.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -15,10 +15,10 @@ class LP_TRANSFORMATIONS_API ConvertTransformation : public LayerTransformation public: OPENVINO_RTTI("ConvertTransformation", "0"); ConvertTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp b/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp index f1671a545ea..7eeab3a3b66 100644 --- a/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp @@ -7,10 +7,10 @@ #include #include -#include +#include "low_precision/lpt_visibility.hpp" #include "openvino/pass/graph_rewrite.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -18,7 +18,7 @@ class LP_TRANSFORMATIONS_API ConvertSubtractConstant; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -29,8 +29,8 @@ class LP_TRANSFORMATIONS_API ConvertSubtractConstant; * [ConvertSubtractConstant](@ref openvino_docs_OV_UG_lpt_ConvertSubtractConstant) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::ConvertSubtractConstant : public ov::pass::MatcherPass { +class ov::pass::low_precision::ConvertSubtractConstant : public ov::pass::MatcherPass { public: OPENVINO_RTTI("ConvertSubtractConstant", "0"); - ConvertSubtractConstant(const std::vector& constantPrecisions = {}); + ConvertSubtractConstant(const std::vector& constantPrecisions = {}); }; diff --git a/src/common/low_precision_transformations/include/low_precision/convolution.hpp b/src/common/low_precision_transformations/include/low_precision/convolution.hpp index bd093b065f6..fb7cd5c0aba 100644 --- a/src/common/low_precision_transformations/include/low_precision/convolution.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convolution.hpp @@ -6,7 +6,7 @@ #include "weightable_layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,14 +24,14 @@ public: ConvolutionTransformation(const Params& params = Params()); bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isQuantized(const std::shared_ptr& layer, - const std::vector&defaultPrecisions) const override; + const std::vector&defaultPrecisions) const override; static bool isQuantizedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions); + const std::vector& defaultPrecisions); protected: - size_t getInputChannels(const std::shared_ptr conv) const override; + size_t getInputChannels(const std::shared_ptr conv) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp b/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp index 39b15f46761..172fba38551 100644 --- a/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp @@ -6,7 +6,7 @@ #include "weightable_layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,14 +24,14 @@ public: bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; bool isQuantized(const std::shared_ptr& layer, - const std::vector&defaultPrecisions) const override; + const std::vector&defaultPrecisions) const override; static bool isQuantizedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions); + const std::vector& defaultPrecisions); protected: - size_t getInputChannels(const std::shared_ptr conv) const override; + size_t getInputChannels(const std::shared_ptr conv) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/create_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/create_attribute.hpp index c63543fbe50..09f29bf71ee 100644 --- a/src/common/low_precision_transformations/include/low_precision/create_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/create_attribute.hpp @@ -8,13 +8,13 @@ #include #include -#include -#include +#include "openvino/pass/graph_rewrite.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/lpt_visibility.hpp" #include "low_precision/base_matcher_pass.hpp" #include "low_precision/lpt_itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,7 +23,7 @@ class CreateAttribute; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov enum class AttributeSource { Node, @@ -37,8 +37,8 @@ enum class AttributeSource { * For more details about the transformation, refer to * [CreateAttribute](@ref openvino_docs_OV_UG_lpt_CreateAttribute) page in the Inference Engine Developer Guide. */ -template -class ngraph::pass::low_precision::CreateAttribute : public ngraph::pass::low_precision::BaseMatcherPass { +template +class ov::pass::low_precision::CreateAttribute : public ov::pass::low_precision::BaseMatcherPass { public: CreateAttribute(const AttributeParameters& params = AttributeParameters(), const AttributeSource source = AttributeSource::Node) : BaseMatcherPass(params) { assert((source == AttributeSource::Node) || (source == AttributeSource::OutputPort)); @@ -46,7 +46,7 @@ public: pattern::any_input() : pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [&](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -61,7 +61,7 @@ public: return true; }; - auto matcher = std::make_shared(operation, "CreateAttribute"); + auto matcher = std::make_shared(operation, "CreateAttribute"); this->register_matcher(matcher, callback); } }; diff --git a/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp index 0ca7a394a38..626774d79dd 100644 --- a/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp @@ -7,17 +7,17 @@ #include #include -#include -#include +#include "openvino/core/node.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" -#include -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "openvino/pass/graph_rewrite.hpp" +#include "openvino/opsets/opset1.hpp" #include "rt_info/precision_preserved_attribute.hpp" #include "network_helper.hpp" #include "lpt_itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -26,7 +26,7 @@ class CreatePrecisionsDependentAttribute; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -38,12 +38,12 @@ class CreatePrecisionsDependentAttribute; * in the Inference Engine Developer Guide. */ template -class ngraph::pass::low_precision::CreatePrecisionsDependentAttribute : public ov::pass::MatcherPass { +class ov::pass::low_precision::CreatePrecisionsDependentAttribute : public ov::pass::MatcherPass { public: CreatePrecisionsDependentAttribute() { auto operation = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [&](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) { auto node = m.get_match_root(); if (transformation_callback(node)) { return false; @@ -65,7 +65,7 @@ public: rt[AttributeType::get_type_info_static()] = attribute; // Step #3: assign the same shared value to enable PrecisionPreservedAttribute update during AttributeType propagation - ngraph::pass::low_precision::NetworkHelper::reassign( + ov::pass::low_precision::NetworkHelper::reassign( targetSharedValue, { attribute.attribute, @@ -75,7 +75,7 @@ public: return true; }; - auto matcher = std::make_shared(operation, "CreatePrecisionsDependentAttribute"); + auto matcher = std::make_shared(operation, "CreatePrecisionsDependentAttribute"); this->register_matcher(matcher, callback); } }; diff --git a/src/common/low_precision_transformations/include/low_precision/depth_to_space.hpp b/src/common/low_precision_transformations/include/low_precision/depth_to_space.hpp index 5fe23505553..5d0b4cd6205 100644 --- a/src/common/low_precision_transformations/include/low_precision/depth_to_space.hpp +++ b/src/common/low_precision_transformations/include/low_precision/depth_to_space.hpp @@ -6,7 +6,7 @@ #include "transparent_base_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -27,4 +27,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp index fa2d8c06338..2741d6b15cc 100644 --- a/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API EliminateFakeQuantizeTransformation : public LayerT public: OPENVINO_RTTI("EliminateFakeQuantizeTransformation", "0"); EliminateFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/eltwise_base_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/eltwise_base_transformation.hpp index 6d16158c1e5..000811a7597 100644 --- a/src/common/low_precision_transformations/include/low_precision/eltwise_base_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/eltwise_base_transformation.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -33,4 +33,4 @@ protected: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp index b1cf4695d58..759707b65f6 100644 --- a/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp @@ -7,7 +7,7 @@ #include #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -37,4 +37,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp b/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp index 8efaf638def..c9876e8c10b 100644 --- a/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -25,10 +25,10 @@ class LP_TRANSFORMATIONS_API FakeQuantizeDecompositionTransformation : public La public: OPENVINO_RTTI("FakeQuantizeDecompositionTransformation", "0"); FakeQuantizeDecompositionTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp b/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp index 256996fe7e8..e5fcfd639f7 100644 --- a/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API FoldConvertTransformation : public LayerTransformat public: OPENVINO_RTTI("FoldConvertTransformation", "0"); FoldConvertTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp index 8ea67f4bcc9..414d0e4f8b6 100644 --- a/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,12 +23,12 @@ class LP_TRANSFORMATIONS_API FoldFakeQuantizeTransformation : public LayerTransf public: OPENVINO_RTTI("FoldFakeQuantizeTransformation", "0"); FoldFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; - bool isConstantOutput(std::shared_ptr op) const; + bool isConstantOutput(std::shared_ptr op) const; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp b/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp index 1a7c7f3a53b..76e5a8e4195 100644 --- a/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp @@ -4,11 +4,11 @@ #pragma once -#include + #include "low_precision/layer_transformation.hpp" #include "low_precision/eltwise_base_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API FuseConvertTransformation : public LayerTransformat public: OPENVINO_RTTI("FuseConvertTransformation", "0"); FuseConvertTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp index 9e587cb34d4..34259bb87c9 100644 --- a/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API FuseMultiplyToFakeQuantizeTransformation : public L public: OPENVINO_RTTI("FuseMultiplyToFakeQuantizeTransformation", "0"); FuseMultiplyToFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp index 06031b03778..98527defe13 100644 --- a/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API FuseSubtractToFakeQuantizeTransformation : public L public: OPENVINO_RTTI("FuseSubtractToFakeQuantizeTransformation", "0"); FuseSubtractToFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/gather.hpp b/src/common/low_precision_transformations/include/low_precision/gather.hpp index 60e760e9eb6..16cf0fabd54 100644 --- a/src/common/low_precision_transformations/include/low_precision/gather.hpp +++ b/src/common/low_precision_transformations/include/low_precision/gather.hpp @@ -7,7 +7,7 @@ #include #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -22,4 +22,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp b/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp index 09c3057af23..f226b9963cc 100644 --- a/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp +++ b/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "convolution.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,16 +23,16 @@ class LP_TRANSFORMATIONS_API GroupConvolutionTransformation : public Convolution public: OPENVINO_RTTI("GroupConvolutionTransformation", "0"); GroupConvolutionTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isQuantized(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) const override; + const std::vector& defaultPrecisions) const override; static bool isQuantizedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions); + const std::vector& defaultPrecisions); protected: - size_t getInputChannels(const std::shared_ptr conv) const override; + size_t getInputChannels(const std::shared_ptr conv) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/interpolate.hpp b/src/common/low_precision_transformations/include/low_precision/interpolate.hpp index 99afb103107..0dfbdaf216a 100644 --- a/src/common/low_precision_transformations/include/low_precision/interpolate.hpp +++ b/src/common/low_precision_transformations/include/low_precision/interpolate.hpp @@ -6,7 +6,7 @@ #include "transparent_base_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -22,11 +22,11 @@ class LP_TRANSFORMATIONS_API InterpolateTransformation : public LayerTransformat public: OPENVINO_RTTI("InterpolateTransformation", "0"); InterpolateTransformation(const Params& params = Params()); - bool transform(TransformationContext &context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext &context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp index ae0b852930e..d6b60d2d22a 100644 --- a/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp @@ -34,17 +34,17 @@ // #define LPT_PRINT_DEQUANTIZATION_INFO // #define LPT_DISPLAY_PRECISION -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { namespace precision_set { const std::vector int8_support = { - ngraph::element::u8, ngraph::element::i8 + ov::element::u8, ov::element::i8 }; const std::vector int8_int16_int32_support = { - ngraph::element::u8, ngraph::element::i8, - ngraph::element::u16, ngraph::element::i16, - ngraph::element::u32, ngraph::element::i32 + ov::element::u8, ov::element::i8, + ov::element::u16, ov::element::i16, + ov::element::u32, ov::element::i32 }; } enum levels : size_t { @@ -151,9 +151,9 @@ public: case element::f32: return std::numeric_limits::lowest(); default: - NGRAPH_CHECK(false, "unexpected precision ", precision); + OPENVINO_ASSERT(false, "unexpected precision ", precision); } - NGRAPH_CHECK(false, "unexpected levels ", levels, " for precision ", precision); + OPENVINO_ASSERT(false, "unexpected levels ", levels, " for precision ", precision); } static float getMaxValue(const element::Type precision, const size_t levels) { @@ -189,7 +189,7 @@ public: case element::f32: return std::numeric_limits::max(); default: - NGRAPH_CHECK(false, "unexpected precision ", precision); + OPENVINO_ASSERT(false, "unexpected precision ", precision); } } @@ -258,8 +258,8 @@ public: Params( const bool updatePrecisions = true, element::Type deqPrecision = element::f32, - const std::vector defaultPrecisions = - { ngraph::element::u8, ngraph::element::i8 }, + const std::vector defaultPrecisions = + { ov::element::u8, ov::element::i8 }, const bool reshapeIgnorePerTensorQuantizationCheck = false) : updatePrecisions(updatePrecisions), deqPrecision(deqPrecision), @@ -276,14 +276,14 @@ public: return *this; } - Params& setDefaultPrecisions(const std::vector& defaultPrecisions) { + Params& setDefaultPrecisions(const std::vector& defaultPrecisions) { this->defaultPrecisions = defaultPrecisions; return *this; } bool updatePrecisions; element::Type deqPrecision; - std::vector defaultPrecisions; + std::vector defaultPrecisions; // to support GPU workarround to keep Reshape and MatMul in FP32 bool reshapeIgnorePerTensorQuantizationCheck; }; @@ -308,11 +308,11 @@ public: void setUpdatePrecisions(const bool updatePrecisions); - void setDefaultPrecisions(const std::vector& defaultPrecisions); + void setDefaultPrecisions(const std::vector& defaultPrecisions); virtual bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const; static bool canBeTransformedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions = precision_set::int8_support); + const std::vector& defaultPrecisions = precision_set::int8_support); bool canSubtractBeHandled(const std::shared_ptr& op, const FakeQuantizeDequantization& dequantization) const; @@ -326,13 +326,13 @@ public: static PrecisionDetails getPrecisionDetails(const QuantizationDetails& quantizationDetails); static bool isAsymmetricQuantization(const std::shared_ptr& node, - const std::vector& defaultPrecisions = precision_set::int8_support); + const std::vector& defaultPrecisions = precision_set::int8_support); // return true if operation can be quantized and false otherwise // for example: if convolution operation weights are not quantized, then isQuantize returns false and true otherwise // note: dequantization operations on activations are absent during method execution virtual bool isQuantized(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) const; + const std::vector& defaultPrecisions) const; // return true if operation can be preserved for precision // note: dequantization operations on activations are absent during method execution @@ -355,35 +355,35 @@ protected: bool updatePrecisions; element::Type deqPrecision; - std::vector defaultPrecisions; + std::vector defaultPrecisions; bool reshapeIgnorePerTensorQuantizationCheck; static constexpr char originalLayerPostfix[] = "_original"; TransformationContext* context; protected: - std::shared_ptr moveDequantizationAfter( + std::shared_ptr moveDequantizationAfter( TransformationContext &context, - const std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract = true) const; - std::shared_ptr moveDequantizationBefore( + std::shared_ptr moveDequantizationBefore( TransformationContext& context, - const std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract = true) const; void updateOutput( TransformationContext &context, - std::shared_ptr lastNode, - std::shared_ptr originalNode) const; + std::shared_ptr lastNode, + std::shared_ptr originalNode) const; void updateOutput( TransformationContext& context, - std::shared_ptr lastNode, + std::shared_ptr lastNode, std::string originalName) const; void addPattern(ov::pass::GraphRewrite& pass, TransformationContext& context, std::shared_ptr patternRoot); @@ -393,7 +393,7 @@ protected: template void addSingleNodePattern(ov::pass::GraphRewrite& pass, TransformationContext& context) const { - using namespace ngraph; + using namespace ov; auto is_op_type = [](std::shared_ptr n) { return !!as_type_ptr(n); @@ -408,4 +408,4 @@ typedef std::shared_ptr LayerTransformationPtr; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/low_precision.hpp b/src/common/low_precision_transformations/include/low_precision/low_precision.hpp index 9d5777f586f..9236113c731 100644 --- a/src/common/low_precision_transformations/include/low_precision/low_precision.hpp +++ b/src/common/low_precision_transformations/include/low_precision/low_precision.hpp @@ -7,27 +7,27 @@ #include #include -// one place to include all Low Precision Transformations from ngraph::pass::low_precision -#include -#include -#include -#include +// one place to include all Low Precision Transformations from ov::pass::low_precision +#include "low_precision/rt_info/intervals_alignment_attribute.hpp" +#include "low_precision/rt_info/quantization_alignment_attribute.hpp" +#include "low_precision/rt_info/precisions_attribute.hpp" +#include "low_precision/rt_info/precision_preserved_attribute.hpp" -#include -#include -#include -#include +#include "low_precision/markup_precisions.hpp" +#include "low_precision/markup_avg_pool_precision_preserved.hpp" +#include "low_precision/propagate_precisions.hpp" +#include "low_precision/align_quantization_intervals.hpp" -#include -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "low_precision/common/quantization_granularity_restriction.hpp" +#include "low_precision/common/precisions_restriction.hpp" #include "low_precision/layer_transformation.hpp" #include "low_precision/markup_precisions.hpp" #include "openvino/pass/graph_rewrite.hpp" #include "openvino/pass/pass.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -37,9 +37,9 @@ class LP_TRANSFORMATIONS_API LowPrecision; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov -class ngraph::pass::low_precision::MarkupOptimizations : public ov::pass::ModelPass { +class ov::pass::low_precision::MarkupOptimizations : public ov::pass::ModelPass { public: OPENVINO_RTTI("MarkupOptimizations", "0"); MarkupOptimizations( @@ -53,23 +53,23 @@ private: const AttributeParameters& params; }; -class ngraph::pass::low_precision::TypeRelaxedReplacer : public ov::pass::GraphRewrite { +class ov::pass::low_precision::TypeRelaxedReplacer : public ov::pass::GraphRewrite { public: OPENVINO_RTTI("TypeRelaxedReplacer", "0"); TypeRelaxedReplacer(); }; -class ngraph::pass::low_precision::LowPrecision : public ov::pass::ModelPass { +class ov::pass::low_precision::LowPrecision : public ov::pass::ModelPass { public: OPENVINO_RTTI("LowPrecision", "0"); LowPrecision( const std::vector& precisionRestrictions = {}, const std::vector& quantizationRestrictions = {}, const LayerTransformation::Params = LayerTransformation::Params()); - bool run_on_model(const std::shared_ptr& m) override; + bool run_on_model(const std::shared_ptr& m) override; - static bool isFunctionQuantized(const std::shared_ptr& function); - static bool isFQLevelsPresent(const std::shared_ptr& function, const std::set& levels); + static bool isFunctionQuantized(const std::shared_ptr& model); + static bool isFQLevelsPresent(const std::shared_ptr& model, const std::set& levels); protected: std::vector precisionRestrictions; diff --git a/src/common/low_precision_transformations/include/low_precision/lpt_itt.hpp b/src/common/low_precision_transformations/include/low_precision/lpt_itt.hpp index 7f72c09e662..c4314033a98 100644 --- a/src/common/low_precision_transformations/include/low_precision/lpt_itt.hpp +++ b/src/common/low_precision_transformations/include/low_precision/lpt_itt.hpp @@ -10,9 +10,9 @@ #pragma once -#include +#include "openvino/itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { namespace itt { @@ -25,4 +25,4 @@ OV_ITT_DOMAIN(LPT_LT); } // namespace itt } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp b/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp index e0b54f75e3f..85f5a300b0b 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp @@ -5,11 +5,11 @@ #pragma once #include -#include +#include "low_precision/lpt_visibility.hpp" #include "low_precision/layer_transformation.hpp" #include "openvino/pass/pass.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -17,7 +17,7 @@ class LP_TRANSFORMATIONS_API MarkupAvgPoolPrecisionPreserved; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -27,11 +27,11 @@ class LP_TRANSFORMATIONS_API MarkupAvgPoolPrecisionPreserved; * [MarkupAvgPoolPrecisionPreserved](@ref openvino_docs_OV_UG_lpt_MarkupAvgPoolPrecisionPreserved) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::MarkupAvgPoolPrecisionPreserved : public ov::pass::ModelPass { +class ov::pass::low_precision::MarkupAvgPoolPrecisionPreserved : public ov::pass::ModelPass { public: OPENVINO_RTTI("MarkupAvgPoolPrecisionPreserved", "0"); - MarkupAvgPoolPrecisionPreserved(const std::vector defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_support); + MarkupAvgPoolPrecisionPreserved(const std::vector defaultPrecisions = ov::pass::low_precision::precision_set::int8_support); bool run_on_model(const std::shared_ptr& m) override; private: - const std::vector defaultPrecisions; + const std::vector defaultPrecisions; }; diff --git a/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp b/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp index ce4b262075b..4bb8af39687 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp @@ -4,12 +4,12 @@ #pragma once -#include +#include "low_precision/lpt_visibility.hpp" #include -#include -#include +#include "openvino/pass/graph_rewrite.hpp" +#include "openvino/pass/pattern/matcher.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -29,4 +29,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph \ No newline at end of file +} // namespace ov \ No newline at end of file diff --git a/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp b/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp index ca2ed97531b..38b474cd9eb 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include +#include "openvino/pass/pass.hpp" #include "low_precision/lpt_visibility.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -16,7 +16,7 @@ class LP_TRANSFORMATIONS_API MarkupCanBeQuantized; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -28,11 +28,11 @@ class LP_TRANSFORMATIONS_API MarkupCanBeQuantized; * [MarkupCanBeQuantized](@ref openvino_docs_OV_UG_lpt_MarkupCanBeQuantized) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::MarkupCanBeQuantized : public ov::pass::ModelPass { +class ov::pass::low_precision::MarkupCanBeQuantized : public ov::pass::ModelPass { public: OPENVINO_RTTI("MarkupCanBeQuantized", "0"); - MarkupCanBeQuantized(const std::vector defaultPrecisions = { ngraph::element::u8, ngraph::element::i8 }); - bool run_on_model(const std::shared_ptr& m) override; + MarkupCanBeQuantized(const std::vector defaultPrecisions = { ov::element::u8, ov::element::i8 }); + bool run_on_model(const std::shared_ptr& m) override; private: - const std::vector defaultPrecisions; + const std::vector defaultPrecisions; }; diff --git a/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp b/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp index ebd227d181c..8ff029d0e9b 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp @@ -12,7 +12,7 @@ #include "low_precision/common/precisions_restriction.hpp" #include "openvino/pass/pass.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -20,7 +20,7 @@ class LP_TRANSFORMATIONS_API MarkupPrecisions; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov // Transformation is used to add customization options runtime /** @@ -34,7 +34,7 @@ class LP_TRANSFORMATIONS_API MarkupPrecisions; * [MarkupPrecisions](@ref openvino_docs_OV_UG_lpt_MarkupPrecisions) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::MarkupPrecisions : public ov::pass::ModelPass { +class ov::pass::low_precision::MarkupPrecisions : public ov::pass::ModelPass { public: class Restriction { public: @@ -67,12 +67,12 @@ public: OPENVINO_RTTI("MarkupPrecisions", "0"); explicit MarkupPrecisions(const std::vector& restrictions = {}, - const std::vector& defaultPrecisions = { ngraph::element::u8, ngraph::element::i8 }); + const std::vector& defaultPrecisions = { ov::element::u8, ov::element::i8 }); bool run_on_model(const std::shared_ptr& m) override; private: static bool isPrecisionPreserved(const std::shared_ptr& node); static bool isSupported(const std::shared_ptr& node); std::unordered_map restrictionsByOperation; - std::vector defaultPrecisions; + std::vector defaultPrecisions; }; diff --git a/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp b/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp index f94a30901a5..fe9949594c9 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp @@ -8,12 +8,12 @@ #include #include -#include +#include "openvino/pass/pass.hpp" #include "low_precision/common/port_quantization_granularity_restriction.hpp" #include "low_precision/common/quantization_granularity_restriction.hpp" #include "low_precision/lpt_visibility.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +21,7 @@ class LP_TRANSFORMATIONS_API MarkupQuantizationGranularity; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -32,7 +32,7 @@ class LP_TRANSFORMATIONS_API MarkupQuantizationGranularity; * [MarkupPerTensorQuantization](@ref openvino_docs_OV_UG_lpt_MarkupPerTensorQuantization) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::MarkupQuantizationGranularity : public ov::pass::ModelPass { +class ov::pass::low_precision::MarkupQuantizationGranularity : public ov::pass::ModelPass { public: class PerTensorQuantization { public: @@ -47,7 +47,7 @@ public: OPENVINO_RTTI("MarkupPerTensorQuantization", "0"); explicit MarkupQuantizationGranularity(const std::vector& restrictions = {}); - bool run_on_model(const std::shared_ptr& m) override; + bool run_on_model(const std::shared_ptr& m) override; private: std::unordered_map restrictionsByOperation; diff --git a/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp b/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp index 1d87647582b..e73135d064c 100644 --- a/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp +++ b/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp @@ -7,7 +7,7 @@ #include #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -30,4 +30,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/max_pool.hpp b/src/common/low_precision_transformations/include/low_precision/max_pool.hpp index 31f789b8b25..119c7831c22 100644 --- a/src/common/low_precision_transformations/include/low_precision/max_pool.hpp +++ b/src/common/low_precision_transformations/include/low_precision/max_pool.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -25,10 +25,10 @@ public: OPENVINO_RTTI("MaxPoolTransformation", "0"); MaxPoolTransformation(const Params& params = Params()); bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp index 75697d99707..bbe56d06bfa 100644 --- a/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -16,11 +16,11 @@ class LP_TRANSFORMATIONS_API MoveFakeQuantize : public LayerTransformation { public: OPENVINO_RTTI("MoveFakeQuantize", "0"); MoveFakeQuantize(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/multiply.hpp b/src/common/low_precision_transformations/include/low_precision/multiply.hpp index dd3b22337f7..3dc4a26d056 100644 --- a/src/common/low_precision_transformations/include/low_precision/multiply.hpp +++ b/src/common/low_precision_transformations/include/low_precision/multiply.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "low_precision/eltwise_base_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,10 +23,10 @@ class LP_TRANSFORMATIONS_API MultiplyTransformation : public EltwiseBaseTransfor public: OPENVINO_RTTI("MultiplyTransformation", "0"); MultiplyTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp b/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp index ea951bbb99f..b107b7de041 100644 --- a/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp +++ b/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp @@ -8,7 +8,7 @@ #include "low_precision/layer_transformation.hpp" #include "common/precisions_restriction.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -31,7 +31,7 @@ public: bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool isQuantized(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) const override; + const std::vector& defaultPrecisions) const override; static bool canBeTransformedToGroupConvolution(const std::shared_ptr& layer); static bool isDynamicOrScalar(const std::shared_ptr& node); @@ -44,4 +44,4 @@ private: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/mvn.hpp b/src/common/low_precision_transformations/include/low_precision/mvn.hpp index 88e39b11c76..d2f0d729cbc 100644 --- a/src/common/low_precision_transformations/include/low_precision/mvn.hpp +++ b/src/common/low_precision_transformations/include/low_precision/mvn.hpp @@ -6,7 +6,7 @@ #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -29,4 +29,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/network_helper.hpp b/src/common/low_precision_transformations/include/low_precision/network_helper.hpp index 687328a5a9d..b6ee34a9f8a 100644 --- a/src/common/low_precision_transformations/include/low_precision/network_helper.hpp +++ b/src/common/low_precision_transformations/include/low_precision/network_helper.hpp @@ -24,7 +24,7 @@ #include "layer_transformation.hpp" #include "openvino/opsets/opset1.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -97,7 +97,7 @@ public: static std::shared_ptr round(std::shared_ptr node, element::Type target_type); static std::shared_ptr composeFakeQuantize(const std::shared_ptr& fq, - const std::vector& defaultPrecisions = precision_set::int8_support); + const std::vector& defaultPrecisions = precision_set::int8_support); static std::tuple, std::shared_ptr> decomposeFakeQuantize( std::shared_ptr fq, @@ -119,26 +119,26 @@ public: static FakeQuantizeDequantization makeDequantization( const float dequantizationMul, const float dequantizationSub, - const ngraph::element::Type originalPrecision, - const ngraph::PartialShape& dataNodeOutputShape, + const ov::element::Type originalPrecision, + const ov::PartialShape& dataNodeOutputShape, element::Type precision, const element::Type deqPrecision = element::f32, - std::shared_ptr input = nullptr); + std::shared_ptr input = nullptr); - static std::shared_ptr makeDequantizationSubtract( - const ngraph::Output& parent, - const ngraph::Output& subtract_constant); + static std::shared_ptr makeDequantizationSubtract( + const ngraph::Output& parent, + const ngraph::Output& subtract_constant); - static bool areQuantizeAndDequantizeSupportedForSubtract(const std::shared_ptr& node, - const std::vector& defaultPrecisions = precision_set::int8_support); + static bool areQuantizeAndDequantizeSupportedForSubtract(const std::shared_ptr& node, + const std::vector& defaultPrecisions = precision_set::int8_support); - static bool areQuantizeAndDequantizeSupportedForMultiply(const std::shared_ptr& node, - const std::vector& _defaultPrecisions = precision_set::int8_support); + static bool areQuantizeAndDequantizeSupportedForMultiply(const std::shared_ptr& node, + const std::vector& _defaultPrecisions = precision_set::int8_support); static bool isQuantizeSupported(const std::shared_ptr& fakeQuantize); static FakeQuantizeDequantization getDequantization(const std::shared_ptr& node, - const std::vector _defaultPrecisions = precision_set::int8_support, + const std::vector _defaultPrecisions = precision_set::int8_support, const size_t parentIndex = 0ul, const bool inPlace = false); @@ -166,14 +166,14 @@ public: }; static InsertDequantizationResult moveDequantizationAfter( - const std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract, - const std::vector& defaultPrecisions = precision_set::int8_support); + const std::vector& defaultPrecisions = precision_set::int8_support); static InsertDequantizationResult moveDequantizationBefore( - const std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract); @@ -184,9 +184,9 @@ public: static bool checkConstantValuePrecision(const element::Type expectedPrecision, const std::shared_ptr& constant); - static size_t getChildInputIndex(const std::shared_ptr& parent, const std::shared_ptr& child); + static size_t getChildInputIndex(const std::shared_ptr& parent, const std::shared_ptr& child); - static size_t getParentOutputIndex(const std::shared_ptr& parent, const std::shared_ptr& child); + static size_t getParentOutputIndex(const std::shared_ptr& parent, const std::shared_ptr& child); static FakeQuantizeDequantizationValues createEmptyValues(const FakeQuantizeDequantization& dequantization, const element::Type precision); @@ -200,11 +200,11 @@ public: static FakeQuantizeDequantization foldDequantization(const std::shared_ptr& node, const size_t branchIndex, - const std::vector& defaultPrecisions = precision_set::int8_support, + const std::vector& defaultPrecisions = precision_set::int8_support, const bool inPlace = false); - static std::shared_ptr separateInStandaloneBranch(std::shared_ptr node, - const std::vector& defaultPrecisions = precision_set::int8_support); + static std::shared_ptr separateInStandaloneBranch(std::shared_ptr node, + const std::vector& defaultPrecisions = precision_set::int8_support); static std::shared_ptr fuseConvert(const std::shared_ptr& fakeQuantize); @@ -212,7 +212,7 @@ public: const std::vector& v1, const std::vector& v2) noexcept; - static bool isPrecisionPreserved(const std::shared_ptr& node); + static bool isPrecisionPreserved(const std::shared_ptr& node); static void insertDequantizationAfter( const std::shared_ptr& originalNode, @@ -266,7 +266,7 @@ std::shared_ptr NetworkHelper::setOutDataPrecisionForTypeRelaxed(std::shar // check if it already exteded operation node if (auto relaxed_layer = std::dynamic_pointer_cast(layer)) { relaxed_layer->set_overridden_output_type(precision); - std::dynamic_pointer_cast(layer)->validate_and_infer_types(); + std::dynamic_pointer_cast(layer)->validate_and_infer_types(); return layer; } else { THROW_IE_LPT_EXCEPTION(*layer) << "TypeRelaxed type is expected"; @@ -278,7 +278,7 @@ std::shared_ptr NetworkHelper::setOutDataPrecision(std::shared_ptr(layer)) { relaxed_layer->set_overridden_output_type(precision); - std::dynamic_pointer_cast(layer)->validate_and_infer_types(); + std::dynamic_pointer_cast(layer)->validate_and_infer_types(); return layer; } else { // Make such replacements in advance for all supported polymorphic layer types @@ -292,7 +292,7 @@ std::shared_ptr NetworkHelper::setOutDataPrecision(std::shared_ptr -std::shared_ptr make_op_pattern(const ngraph::NodeVector& args) { +std::shared_ptr make_op_pattern(const ov::NodeVector& args) { return std::make_shared(element::undefined, PartialShape{}, [](std::shared_ptr n) {return !!ov::as_type_ptr(n); }, args); } @@ -361,4 +361,4 @@ bool isDisabled(const std::shared_ptr& node); } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp b/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp index 4180c1dd265..421f05a9cfb 100644 --- a/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp +++ b/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp @@ -6,7 +6,7 @@ #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -29,4 +29,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/pad.hpp b/src/common/low_precision_transformations/include/low_precision/pad.hpp index 4d1083cf8c4..b0a9b157f5f 100644 --- a/src/common/low_precision_transformations/include/low_precision/pad.hpp +++ b/src/common/low_precision_transformations/include/low_precision/pad.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -31,4 +31,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/prelu.hpp b/src/common/low_precision_transformations/include/low_precision/prelu.hpp index 6481580f3e9..21d780bf84d 100644 --- a/src/common/low_precision_transformations/include/low_precision/prelu.hpp +++ b/src/common/low_precision_transformations/include/low_precision/prelu.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API PReluTransformation : public LayerTransformation { public: OPENVINO_RTTI("PReluTransformation", "0"); PReluTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp index 0b7016dbc57..30e7f3b98aa 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp @@ -7,11 +7,11 @@ #include #include -#include +#include "low_precision/lpt_visibility.hpp" #include "low_precision/rt_info/attribute_parameters.hpp" #include "openvino/pass/pass.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -19,7 +19,7 @@ class LP_TRANSFORMATIONS_API PropagatePrecisions; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -29,7 +29,7 @@ class LP_TRANSFORMATIONS_API PropagatePrecisions; * [PropagatePrecisions](@ref openvino_docs_OV_UG_lpt_PropagatePrecisions) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::PropagatePrecisions : public ov::pass::ModelPass { +class ov::pass::low_precision::PropagatePrecisions : public ov::pass::ModelPass { public: OPENVINO_RTTI("PropagatePrecisions", "0"); PropagatePrecisions(const AttributeParameters& params = AttributeParameters()); diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp index 9d0f1880f4e..a22bf28d877 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp @@ -8,14 +8,14 @@ #include #include -#include +#include "openvino/core/node.hpp" -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "openvino/pass/graph_rewrite.hpp" #include "low_precision/network_helper.hpp" #include "lpt_itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API PropagateSharedValue; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -36,12 +36,12 @@ class LP_TRANSFORMATIONS_API PropagateSharedValue; * in the Inference Engine Developer Guide. */ template -class ngraph::pass::low_precision::PropagateSharedValue : public ov::pass::ModelPass { +class ov::pass::low_precision::PropagateSharedValue : public ov::pass::ModelPass { public: - bool run_on_model(const std::shared_ptr& f) override { + bool run_on_model(const std::shared_ptr& f) override { OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::LPT_LT, "PropagateSharedValue"); - std::vector> nodes(f->get_ordered_ops()); + std::vector> nodes(f->get_ordered_ops()); for (auto it = nodes.begin(); it != nodes.end(); it++) { const std::shared_ptr node = *it; if (ov::is_type(node)) { @@ -103,7 +103,7 @@ public: private: std::vector getParentInputRestrictions( - const std::shared_ptr node) { + const std::shared_ptr node) { std::vector parentAttributes; for (size_t index = 0ul; index < node->get_input_size(); index++) { const Input& input = node->input(index); @@ -133,7 +133,7 @@ private: return parentAttributes; } - void handle(std::shared_ptr f, const std::shared_ptr& node) { + void handle(std::shared_ptr f, const std::shared_ptr& node) { const bool precisionPreserved = NetworkHelper::isPrecisionPreserved(node); if (precisionPreserved) { const auto parentRestrictions = getParentInputRestrictions(node); diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp index d3fe955170c..e4103ab98af 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp @@ -7,15 +7,15 @@ #include #include -#include -#include -#include +#include "openvino/core/node.hpp" +#include "openvino/pass/graph_rewrite.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/lpt_visibility.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/lpt_itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,7 +24,7 @@ class PropagateThroughPrecisionPreserved; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -36,10 +36,10 @@ class PropagateThroughPrecisionPreserved; * in the Inference Engine Developer Guide. */ template -class ngraph::pass::low_precision::PropagateThroughPrecisionPreserved : public ov::pass::MatcherPass { +class ov::pass::low_precision::PropagateThroughPrecisionPreserved : public ov::pass::MatcherPass { public: - PropagateThroughPrecisionPreserved(const std::vector& defaultPrecisions = precision_set::int8_support) { - ngraph::graph_rewrite_callback callback = [&](pattern::Matcher& m) { + PropagateThroughPrecisionPreserved(const std::vector& defaultPrecisions = precision_set::int8_support) { + ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) { auto node = m.get_match_root(); if (transformation_callback(node)) { return false; @@ -48,7 +48,7 @@ public: { OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::LPT_LT, "PropagateThroughPrecisionPreserved"); - if (!ngraph::pass::low_precision::NetworkHelper::isPrecisionPreserved(node)) { + if (!ov::pass::low_precision::NetworkHelper::isPrecisionPreserved(node)) { return false; } @@ -82,7 +82,7 @@ public: return true; }; - auto matcher = std::make_shared(pattern::any_input(), "PropagateThroughPrecisionPreserved"); + auto matcher = std::make_shared(pattern::any_input(), "PropagateThroughPrecisionPreserved"); this->register_matcher(matcher, callback); } @@ -98,10 +98,10 @@ private: } // TODO: possible duplicate: PropagateToInput::getSourceOutputAttribute - std::vector getParentInputRestrictions(const std::shared_ptr node, - const std::vector& defaultPrecisions) { + std::vector getParentInputRestrictions(const std::shared_ptr node, + const std::vector& defaultPrecisions) { std::vector parentAttributes; - auto getInput = [&defaultPrecisions](const std::shared_ptr& node, const size_t index) -> Input { + auto getInput = [&defaultPrecisions](const std::shared_ptr& node, const size_t index) -> Input { const auto dequantization = NetworkHelper::getDequantization(node, defaultPrecisions, index); if (!dequantization.empty() && ov::is_type(dequantization.data.get_node()) && diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp index caffaf05ebc..383ca08dcda 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp @@ -7,14 +7,14 @@ #include #include -#include -#include +#include "openvino/core/node.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "openvino/pass/graph_rewrite.hpp" #include "network_helper.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,7 +23,7 @@ class PropagateToInput; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -35,10 +35,10 @@ class PropagateToInput; * in the Inference Engine Developer Guide. */ template -class ngraph::pass::low_precision::PropagateToInput : public ov::pass::MatcherPass { +class ov::pass::low_precision::PropagateToInput : public ov::pass::MatcherPass { public: - PropagateToInput(const std::vector& defaultPrecisions = { ngraph::element::u8, ngraph::element::i8 }) { - ngraph::graph_rewrite_callback callback = [&](pattern::Matcher& m) { + PropagateToInput(const std::vector& defaultPrecisions = { ov::element::u8, ov::element::i8 }) { + ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) { auto node = m.get_match_root(); if (transformation_callback(node)) { return false; @@ -117,13 +117,13 @@ public: return true; }; - auto matcher = std::make_shared(pattern::any_input(), "PropagateThroughPrecisionPreserved"); + auto matcher = std::make_shared(pattern::any_input(), "PropagateThroughPrecisionPreserved"); this->register_matcher(matcher, callback); } private: // TODO: possible duplicate: PropagateThroughPrecisionPreserved::getParentInputRestrictions - ov::Any getSourceOutputAttribute(const Input& input, const std::vector& defaultPrecisions) { + ov::Any getSourceOutputAttribute(const Input& input, const std::vector& defaultPrecisions) { auto getInput = [&defaultPrecisions](const Input& input) { const auto dequantization = NetworkHelper::getDequantization(input.get_node()->shared_from_this(), defaultPrecisions, input.get_index()); if (!dequantization.empty() && @@ -146,7 +146,7 @@ private: } std::vector getParentInputRestrictions( - const std::shared_ptr node) { + const std::shared_ptr node) { std::vector parentAttributes; for (size_t index = 0ul; index < node->get_input_size(); index++) { const Input& input = node->input(index); diff --git a/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp b/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp index cf00a50c094..40c7dd556c0 100644 --- a/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp +++ b/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp @@ -6,10 +6,10 @@ #include #include -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "openvino/pass/graph_rewrite.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -17,7 +17,7 @@ class LP_TRANSFORMATIONS_API PullReshapeThroughDequantization; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -28,8 +28,8 @@ class LP_TRANSFORMATIONS_API PullReshapeThroughDequantization; * [PullReshapeThroughDequantization](@ref openvino_docs_OV_UG_lpt_PullReshapeThroughDequantization) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::PullReshapeThroughDequantization : public ov::pass::MatcherPass { +class ov::pass::low_precision::PullReshapeThroughDequantization : public ov::pass::MatcherPass { public: OPENVINO_RTTI("PullReshapeThroughDequantization", "0"); - PullReshapeThroughDequantization(const std::vector& inputPrecisions = {}); + PullReshapeThroughDequantization(const std::vector& inputPrecisions = {}); }; diff --git a/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp b/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp index 5ab4258fa67..e6a2d70d15b 100644 --- a/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp +++ b/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp @@ -6,10 +6,10 @@ #include #include -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "openvino/pass/graph_rewrite.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -17,7 +17,7 @@ class LP_TRANSFORMATIONS_API PullTransposeThroughDequantization; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -28,8 +28,8 @@ class LP_TRANSFORMATIONS_API PullTransposeThroughDequantization; * [PullTransposeThroughDequantization](@ref openvino_docs_OV_UG_lpt_PullTransposeThroughDequantization) page * in the Inference Engine Developer Guide. */ -class ngraph::pass::low_precision::PullTransposeThroughDequantization : public ov::pass::MatcherPass { +class ov::pass::low_precision::PullTransposeThroughDequantization : public ov::pass::MatcherPass { public: OPENVINO_RTTI("PullTransposeThroughDequantization", "0"); - PullTransposeThroughDequantization(const std::vector& inputPrecisions = {}); + PullTransposeThroughDequantization(const std::vector& inputPrecisions = {}); }; diff --git a/src/common/low_precision_transformations/include/low_precision/quantization_details.hpp b/src/common/low_precision_transformations/include/low_precision/quantization_details.hpp index 49cf84c7443..a34260b4f1a 100644 --- a/src/common/low_precision_transformations/include/low_precision/quantization_details.hpp +++ b/src/common/low_precision_transformations/include/low_precision/quantization_details.hpp @@ -8,10 +8,10 @@ #include #include -#include +#include "low_precision/lpt_visibility.hpp" #include "openvino/opsets/opset1.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -72,4 +72,4 @@ inline std::ostream &operator << (std::ostream &os, const QuantizationDetails& v } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp b/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp index d04319a6067..8a305db307c 100644 --- a/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp +++ b/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -16,7 +16,7 @@ class LP_TRANSFORMATIONS_API RecurrentCellTransformation : public LayerTransform public: OPENVINO_RTTI("RecurrentCellTransformation", "0"); RecurrentCellTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; void propagateSkipCleanupAttribute(std::shared_ptr dequantization_multiply); @@ -27,4 +27,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp index e73d1feeed9..feb4aa38392 100644 --- a/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -22,7 +22,7 @@ namespace low_precision { class LP_TRANSFORMATIONS_API ReduceBaseTransformation : public LayerTransformation { public: ReduceBaseTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher& m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr reduce) const override; protected: @@ -34,4 +34,4 @@ protected: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/reduce_max.hpp b/src/common/low_precision_transformations/include/low_precision/reduce_max.hpp index eb6249e153b..bcb23c3210d 100644 --- a/src/common/low_precision_transformations/include/low_precision/reduce_max.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reduce_max.hpp @@ -7,10 +7,10 @@ #include "low_precision/reduce_base_transformation.hpp" #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -35,4 +35,4 @@ protected: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/reduce_mean.hpp b/src/common/low_precision_transformations/include/low_precision/reduce_mean.hpp index 1d911c2edd7..1b647ba9f75 100644 --- a/src/common/low_precision_transformations/include/low_precision/reduce_mean.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reduce_mean.hpp @@ -7,10 +7,10 @@ #include "low_precision/reduce_base_transformation.hpp" #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -35,4 +35,4 @@ protected: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/reduce_min.hpp b/src/common/low_precision_transformations/include/low_precision/reduce_min.hpp index 562e70c32bd..80a58089fec 100644 --- a/src/common/low_precision_transformations/include/low_precision/reduce_min.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reduce_min.hpp @@ -7,10 +7,10 @@ #include "low_precision/reduce_base_transformation.hpp" #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -35,4 +35,4 @@ protected: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/reduce_sum.hpp b/src/common/low_precision_transformations/include/low_precision/reduce_sum.hpp index 916ce63afb4..0d85aad090b 100644 --- a/src/common/low_precision_transformations/include/low_precision/reduce_sum.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reduce_sum.hpp @@ -7,10 +7,10 @@ #include "low_precision/reduce_base_transformation.hpp" #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -38,4 +38,4 @@ protected: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/relu.hpp b/src/common/low_precision_transformations/include/low_precision/relu.hpp index f460f7e7747..166d9617673 100644 --- a/src/common/low_precision_transformations/include/low_precision/relu.hpp +++ b/src/common/low_precision_transformations/include/low_precision/relu.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API ReluTransformation : public LayerTransformation { public: OPENVINO_RTTI("ReluTransformation", "0"); ReluTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/reshape.hpp b/src/common/low_precision_transformations/include/low_precision/reshape.hpp index ce1fe3050e0..76f5e98f83f 100644 --- a/src/common/low_precision_transformations/include/low_precision/reshape.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reshape.hpp @@ -7,7 +7,7 @@ #include #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -28,12 +28,12 @@ public: bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; static bool canBeTransformed( - const ngraph::Shape& subtractShape, - const ngraph::Shape& multiplyShape, - const ngraph::PartialShape& inputShape, - const ngraph::PartialShape& outputShape); + const ov::Shape& subtractShape, + const ov::Shape& multiplyShape, + const ov::PartialShape& inputShape, + const ov::PartialShape& outputShape); }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/attribute_parameters.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/attribute_parameters.hpp index 402f88a015f..0ce6628ed88 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/attribute_parameters.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/attribute_parameters.hpp @@ -4,15 +4,15 @@ #pragma once -#include +#include "openvino/core/type/element_type.hpp" #include "low_precision/lpt_visibility.hpp" class LP_TRANSFORMATIONS_API AttributeParameters { public: AttributeParameters( - const ngraph::element::Type deqPrecision = ngraph::element::f32, - const std::vector defaultPrecisions = { ngraph::element::u8, ngraph::element::i8 }) + const ov::element::Type deqPrecision = ov::element::f32, + const std::vector defaultPrecisions = { ov::element::u8, ov::element::i8 }) : deqPrecision(deqPrecision), defaultPrecisions(defaultPrecisions) {} - ngraph::element::Type deqPrecision; - std::vector defaultPrecisions; + ov::element::Type deqPrecision; + std::vector defaultPrecisions; }; diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/avg_pool_precision_preserved_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/avg_pool_precision_preserved_attribute.hpp index c7c84e21229..45bb7784c25 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/avg_pool_precision_preserved_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/avg_pool_precision_preserved_attribute.hpp @@ -7,11 +7,11 @@ #include #include #include -#include +#include "openvino/core/node.hpp" #include "low_precision/lpt_visibility.hpp" #include "low_precision/rt_info/precision_preserved_attribute.hpp" -namespace ngraph { +namespace ov { /** * @ingroup ie_transformation_common_api @@ -30,4 +30,4 @@ public: std::string to_string() const override; }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/bias_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/bias_attribute.hpp index fdefec850ca..b1e02c310ca 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/bias_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/bias_attribute.hpp @@ -4,9 +4,9 @@ #pragma once -#include -#include -#include +#include "low_precision/lpt_visibility.hpp" +#include "openvino/core/node.hpp" +#include "openvino/core/runtime_attribute.hpp" namespace ov { LP_TRANSFORMATIONS_API void mark_as_bias(const std::shared_ptr& node); diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/intervals_alignment_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/intervals_alignment_attribute.hpp index 99d6e814c2a..d0009aa7ce6 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/intervals_alignment_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/intervals_alignment_attribute.hpp @@ -7,13 +7,13 @@ #include #include -#include +#include "openvino/core/node.hpp" #include "low_precision/rt_info/shared_value_attribute.hpp" #include "low_precision/rt_info/attribute_parameters.hpp" #include "low_precision/lpt_visibility.hpp" -namespace ngraph { +namespace ov { /** * @ingroup ie_transformation_common_api * @brief IntervalsAlignmentSharedValue is used by IntervalsAlignmentAttribute as attribute shared value. @@ -68,7 +68,7 @@ public: const size_t minLevels); static ov::Any create( - const std::shared_ptr& node, + const std::shared_ptr& node, const AttributeParameters& params = AttributeParameters()); void merge_attributes(std::vector& attributes); std::string to_string() const override; @@ -77,4 +77,4 @@ public: size_t levels; }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/precision_preserved_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/precision_preserved_attribute.hpp index f5d14342a8f..ba8287ad937 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/precision_preserved_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/precision_preserved_attribute.hpp @@ -7,11 +7,11 @@ #include #include -#include +#include "openvino/core/node.hpp" #include "low_precision/lpt_visibility.hpp" #include "low_precision/rt_info/shared_value_attribute.hpp" -namespace ngraph { +namespace ov { /** * @ingroup ie_transformation_common_api * @brief PrecisionPreservedAttribute defines the precision preserved operation. If the attribute is absent, then an operation is @@ -30,4 +30,4 @@ public: std::string to_string() const override; }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/precisions_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/precisions_attribute.hpp index 55b887d68d4..5ae071a116b 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/precisions_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/precisions_attribute.hpp @@ -13,7 +13,7 @@ #include "low_precision/rt_info/attribute_parameters.hpp" #include "low_precision/rt_info/shared_value_attribute.hpp" -namespace ngraph { +namespace ov { /** * @ingroup ie_transformation_common_api * @brief PrecisionsAttribute defines precision which is required for input/output port or an operation. @@ -21,17 +21,17 @@ namespace ngraph { * For more details about the attribute, refer to * [PrecisionsAttribute](@ref openvino_docs_OV_UG_lpt_Precisions) page in the Inference Engine Developer Guide. */ -class LP_TRANSFORMATIONS_API PrecisionsAttribute : public SharedAttribute> { +class LP_TRANSFORMATIONS_API PrecisionsAttribute : public SharedAttribute> { public: OPENVINO_RTTI("LowPrecision::Precisions", "", ov::RuntimeAttribute); - PrecisionsAttribute(const std::vector& precisions); + PrecisionsAttribute(const std::vector& precisions); static ov::Any create( - const std::shared_ptr& node, + const std::shared_ptr& node, const AttributeParameters& params); // merge attribute instances which can be got from different sources: node, input port or output port void merge_attributes(std::vector& attributes); // vizualize shared attributes details in VizualizeTree pass std::string to_string() const override; }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_alignment_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_alignment_attribute.hpp index 375c1ce1e1d..b69ac071df2 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_alignment_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_alignment_attribute.hpp @@ -9,11 +9,11 @@ #include #include -#include +#include "low_precision/lpt_visibility.hpp" #include "shared_value_attribute.hpp" #include "attribute_parameters.hpp" -namespace ngraph { +namespace ov { /** * @ingroup ie_transformation_common_api * @brief QuantizationAlignmentAttribute defines subgraph with the same quantization alignment. @@ -28,10 +28,10 @@ public: QuantizationAlignmentAttribute(const bool value = false); static ov::Any create( - const std::shared_ptr& node, + const std::shared_ptr& node, const AttributeParameters& params = AttributeParameters()); void merge_attributes(std::vector& attributes); std::string to_string() const override; }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_granularity_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_granularity_attribute.hpp index 053edb4fda2..77e74da5561 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_granularity_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_granularity_attribute.hpp @@ -4,12 +4,12 @@ #pragma once -#include +#include "low_precision/lpt_visibility.hpp" #include "low_precision/rt_info/shared_value_attribute.hpp" #include "low_precision/layer_transformation.hpp" #include "attribute_parameters.hpp" -namespace ngraph { +namespace ov { /** * @ingroup ie_transformation_common_api * @brief QuantizationGranularityAttribute defines quantization granularity of operation inputs. @@ -38,4 +38,4 @@ public: Granularity granularity; }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_mode_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_mode_attribute.hpp index 3c3a454e4b9..4b906130f27 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_mode_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/quantization_mode_attribute.hpp @@ -6,9 +6,9 @@ #include #include "openvino/core/runtime_attribute.hpp" -#include +#include "low_precision/lpt_visibility.hpp" -namespace ngraph { +namespace ov { class LP_TRANSFORMATIONS_API QuantizationModeAttribute : public ov::RuntimeAttribute { public: @@ -30,4 +30,4 @@ public: Mode mode; }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp index 0f120b46d4b..48dc1453b58 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp @@ -8,9 +8,9 @@ #include #include -#include +#include "openvino/core/node.hpp" -#include +#include "low_precision/lpt_visibility.hpp" template class LP_TRANSFORMATIONS_API SharedAttribute : public ov::RuntimeAttribute { diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/skip_cleanup_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/skip_cleanup_attribute.hpp index 1b323ee9424..39e0bf46e3a 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/skip_cleanup_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/skip_cleanup_attribute.hpp @@ -4,14 +4,14 @@ #pragma once -#include +#include "openvino/core/node.hpp" #include "low_precision/rt_info/attribute_parameters.hpp" -namespace ngraph { +namespace ov { class LP_TRANSFORMATIONS_API SkipCleanupAttribute : public ov::RuntimeAttribute { public: OPENVINO_RTTI("LowPrecision::SkipCleanup", "", ov::RuntimeAttribute); - static ov::Any create(const std::shared_ptr& node); + static ov::Any create(const std::shared_ptr& node); }; -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp b/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp index d57c69644bf..04aaba490c5 100644 --- a/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp +++ b/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,11 +23,11 @@ class LP_TRANSFORMATIONS_API ShuffleChannelsTransformation : public LayerTransfo public: OPENVINO_RTTI("ShuffleChannelsTransformation", "0"); ShuffleChannelsTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher& m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/split.hpp b/src/common/low_precision_transformations/include/low_precision/split.hpp index 575101299fb..c8b6a942b4a 100644 --- a/src/common/low_precision_transformations/include/low_precision/split.hpp +++ b/src/common/low_precision_transformations/include/low_precision/split.hpp @@ -7,9 +7,9 @@ #include #include "layer_transformation.hpp" -#include "ngraph/node.hpp" +#include "openvino/core/node.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -30,9 +30,9 @@ public: bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; void updateOutputs( TransformationContext& context, - std::vector> lastNodes, - std::shared_ptr originalNode) const; + std::vector> lastNodes, + std::shared_ptr originalNode) const; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/squeeze.hpp b/src/common/low_precision_transformations/include/low_precision/squeeze.hpp index 3c151e16ad8..9ed3b71129e 100644 --- a/src/common/low_precision_transformations/include/low_precision/squeeze.hpp +++ b/src/common/low_precision_transformations/include/low_precision/squeeze.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,11 +23,11 @@ class LP_TRANSFORMATIONS_API SqueezeTransformation : public LayerTransformation public: OPENVINO_RTTI("SqueezeTransformation", "0"); SqueezeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp b/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp index b4f10415ba6..1490522f4d5 100644 --- a/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp +++ b/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API StridedSliceTransformation : public LayerTransforma public: OPENVINO_RTTI("StridedSliceTransformation", "0"); StridedSliceTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher& m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/subtract.hpp b/src/common/low_precision_transformations/include/low_precision/subtract.hpp index 5f7edec6dca..a1e9424a185 100644 --- a/src/common/low_precision_transformations/include/low_precision/subtract.hpp +++ b/src/common/low_precision_transformations/include/low_precision/subtract.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,9 +23,9 @@ class LP_TRANSFORMATIONS_API SubtractTransformation : public LayerTransformation public: OPENVINO_RTTI("SubtractTransformation", "0"); SubtractTransformation(const Params& params); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/transformation_context.hpp b/src/common/low_precision_transformations/include/low_precision/transformation_context.hpp index 26ee65cc075..499685b58c6 100644 --- a/src/common/low_precision_transformations/include/low_precision/transformation_context.hpp +++ b/src/common/low_precision_transformations/include/low_precision/transformation_context.hpp @@ -8,7 +8,7 @@ #include #include "low_precision/quantization_details.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -19,8 +19,8 @@ namespace low_precision { class LP_TRANSFORMATIONS_API TransformationContext { public: TransformationContext(); - explicit TransformationContext(std::shared_ptr function); - std::shared_ptr function; + explicit TransformationContext(std::shared_ptr model); + std::shared_ptr model; // Used to store handled FakeQuantize operations. // ConcatTransformation and FakeQuantizeTransformation handle FakeQuantize operations. ConcatTransformation handles FakeQuantize operation first. @@ -36,4 +36,4 @@ public: } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp index ccfd116e892..008a62fda27 100644 --- a/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -20,11 +20,11 @@ class LP_TRANSFORMATIONS_API TransparentBaseTransformation : public LayerTransfo public: TransparentBaseTransformation(const Params& params) : LayerTransformation(params) {} ~TransparentBaseTransformation() override {}; - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/transpose.hpp b/src/common/low_precision_transformations/include/low_precision/transpose.hpp index 61cfcfd9e19..0db05f31a93 100644 --- a/src/common/low_precision_transformations/include/low_precision/transpose.hpp +++ b/src/common/low_precision_transformations/include/low_precision/transpose.hpp @@ -5,10 +5,10 @@ #pragma once #include -#include + #include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,11 +24,11 @@ class LP_TRANSFORMATIONS_API TransposeTransformation : public LayerTransformatio public: OPENVINO_RTTI("TransposeTransformation", "0"); TransposeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr op) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp b/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp index 0a6add8d7d4..1c928535fd0 100644 --- a/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp +++ b/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp @@ -4,10 +4,10 @@ #pragma once -#include + #include "layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -23,11 +23,11 @@ class LP_TRANSFORMATIONS_API UnsqueezeTransformation : public LayerTransformatio public: OPENVINO_RTTI("UnsqueezeTransformation", "0"); UnsqueezeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ngraph::pattern::Matcher &m) override; + bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp b/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp index 99f6ee0d583..b5770e63ac4 100644 --- a/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp +++ b/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp @@ -7,13 +7,13 @@ #include #include -#include +#include "openvino/pass/pass.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/lpt_itt.hpp" #include "low_precision/lpt_visibility.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -22,7 +22,7 @@ class UpdateSharedPrecisionPreserved; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov /** * @ingroup ie_transformation_common_api @@ -34,9 +34,9 @@ class UpdateSharedPrecisionPreserved; * in the Inference Engine Developer Guide. */ template -class ngraph::pass::low_precision::UpdateSharedPrecisionPreserved : public ov::pass::MatcherPass { +class ov::pass::low_precision::UpdateSharedPrecisionPreserved : public ov::pass::MatcherPass { public: - UpdateSharedPrecisionPreserved(const std::vector& defaultPrecisions = precision_set::int8_support) { + UpdateSharedPrecisionPreserved(const std::vector& defaultPrecisions = precision_set::int8_support) { ov::graph_rewrite_callback callback = [&](ov::pass::pattern::Matcher& m) { auto node = m.get_match_root(); @@ -50,7 +50,7 @@ public: } } - if (ngraph::pass::low_precision::NetworkHelper::isPrecisionPreserved(node) || ov::is_type(node)) { + if (ov::pass::low_precision::NetworkHelper::isPrecisionPreserved(node) || ov::is_type(node)) { return false; } @@ -95,7 +95,7 @@ public: } private: - Input getDequantizationInput(const Input& input, const std::vector& defaultPrecisions) { + Input getDequantizationInput(const Input& input, const std::vector& defaultPrecisions) { const auto dequantization = NetworkHelper::getDequantization(input.get_node()->shared_from_this(), defaultPrecisions, input.get_index()); if (!dequantization.empty() && (ov::is_type(dequantization.data.get_node())) && @@ -106,12 +106,12 @@ private: return input; } - ov::Any getSourceAttribute(const Input& input, const std::vector& defaultPrecisions) { + ov::Any getSourceAttribute(const Input& input, const std::vector& defaultPrecisions) { const auto dequantizationInput = getDequantizationInput(input, defaultPrecisions); const auto output = dequantizationInput.get_source_output(); - auto attribute = ngraph::pass::low_precision::getAttribute(output.get_node()->shared_from_this()); + auto attribute = ov::pass::low_precision::getAttribute(output.get_node()->shared_from_this()); if (attribute.empty()) { - attribute = ngraph::pass::low_precision::getAttribute(output.get_node_shared_ptr()); + attribute = ov::pass::low_precision::getAttribute(output.get_node_shared_ptr()); } return attribute; } diff --git a/src/common/low_precision_transformations/include/low_precision/variadic_split.hpp b/src/common/low_precision_transformations/include/low_precision/variadic_split.hpp index 6e8c9e426b3..e07f6a4db35 100644 --- a/src/common/low_precision_transformations/include/low_precision/variadic_split.hpp +++ b/src/common/low_precision_transformations/include/low_precision/variadic_split.hpp @@ -7,9 +7,9 @@ #include #include "split.hpp" -#include "ngraph/node.hpp" +#include "openvino/core/node.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -28,4 +28,4 @@ public: }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/weightable_layer_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/weightable_layer_transformation.hpp index fd9bf5b2eb7..7a6d6840a6a 100644 --- a/src/common/low_precision_transformations/include/low_precision/weightable_layer_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/weightable_layer_transformation.hpp @@ -9,7 +9,7 @@ #include "layer_transformation.hpp" #include "openvino/opsets/opset1.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -22,18 +22,18 @@ public: WeightableLayerTransformation(const Params& params); bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; bool canConvolutionBeTransformed(const TransformationContext& context, std::shared_ptr layer, - const std::vector& defaultPrecisions) const; + const std::vector& defaultPrecisions) const; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; static bool checkPrecisionOnActivation( - const std::shared_ptr& node, - const std::vector& supportedPrecisionsOnActivations) { + const std::shared_ptr& node, + const std::vector& supportedPrecisionsOnActivations) { return true; } static bool isQuantizedStatic(const std::shared_ptr& layer, const bool reshapeIsRequired, - const std::vector& defaultPrecisions = precision_set::int8_support); + const std::vector& defaultPrecisions = precision_set::int8_support); protected: std::tuple, std::shared_ptr> decomposeFakeQuantizeForWeightsPath( @@ -41,15 +41,15 @@ protected: size_t outChannelsShapeIndex = 0ul) const; static bool isGroup(const std::shared_ptr& node); static bool isDepthwise(const std::shared_ptr& node); - virtual size_t getInputChannels(const std::shared_ptr conv) const = 0; + virtual size_t getInputChannels(const std::shared_ptr conv) const = 0; public: static std::shared_ptr getFakeQuantizeOnWeights(const std::shared_ptr& node); - static DataPrecision getDataPrecisionOnWeights(const std::shared_ptr& node, const std::vector& defaultPrecisions); + static DataPrecision getDataPrecisionOnWeights(const std::shared_ptr& node, const std::vector& defaultPrecisions); static bool isAsymmetricOnWeights(const std::shared_ptr& node, - const std::vector& defaultPrecisions = precision_set::int8_support); + const std::vector& defaultPrecisions = precision_set::int8_support); }; } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/add.cpp b/src/common/low_precision_transformations/src/add.cpp index 2acabdbab85..a5b31b33284 100644 --- a/src/common/low_precision_transformations/src/add.cpp +++ b/src/common/low_precision_transformations/src/add.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "ov_ops/type_relaxed.hpp" #include "low_precision/common/ie_lpt_exception.hpp" @@ -18,7 +18,7 @@ #include "low_precision/rt_info/bias_attribute.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -87,9 +87,9 @@ std::shared_ptr fuseWithSubtract(const std::shared_ptr(); + auto matcher = ov::pass::pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -97,11 +97,11 @@ AddTransformation::AddTransformation(const Params& params) : EltwiseBaseTransfor return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool AddTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool AddTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr op = ov::as_type_ptr(m.get_match_root()); if ((op == nullptr) || (!canBeTransformed(context, op))) { return false; @@ -130,7 +130,7 @@ bool AddTransformation::transform(TransformationContext& context, ngraph::patter } newMultiply = NetworkHelper::swapMultiplyAndAdd(add, multiplyBranch.first); - ngraph::copy_runtime_info({ add, newMultiply }, newMultiply); + ov::copy_runtime_info({ add, newMultiply }, newMultiply); if (ov::is_type(newMultiply->get_input_node_shared_ptr(0))) { newAddOrSubtract = newMultiply->get_input_node_shared_ptr(0); @@ -227,7 +227,7 @@ bool AddTransformation::transform(TransformationContext& context, ngraph::patter NetworkHelper::insertDequantizationAfter(add, newMultiply, newAddOrSubtract); NetworkHelper::copyInfo(add, newAddOrSubtract); - ngraph::copy_runtime_info({ add, newMultiply }, newMultiply); + ov::copy_runtime_info({ add, newMultiply }, newMultiply); } updateOutput(context, newMultiply, newAddOrSubtract); @@ -256,4 +256,4 @@ bool AddTransformation::canBeTransformed(const TransformationContext& context, s } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/align_quantization_intervals.cpp b/src/common/low_precision_transformations/src/align_quantization_intervals.cpp index fdfdb52ea16..f1bc1dfe4f3 100644 --- a/src/common/low_precision_transformations/src/align_quantization_intervals.cpp +++ b/src/common/low_precision_transformations/src/align_quantization_intervals.cpp @@ -4,7 +4,7 @@ #include "low_precision/align_quantization_intervals.hpp" #include -#include +#include "openvino/opsets/opset1.hpp" #include "low_precision/create_attribute.hpp" #include "low_precision/propagate_through_precision_preserved.hpp" #include "low_precision/rt_info/intervals_alignment_attribute.hpp" @@ -12,19 +12,19 @@ #include "itt.hpp" #include "openvino/pass/manager.hpp" -using namespace ngraph; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass::low_precision; -ngraph::pass::low_precision::AlignQuantizationIntervals::AlignQuantizationIntervals(const std::vector& defaultPrecisions) +ov::pass::low_precision::AlignQuantizationIntervals::AlignQuantizationIntervals(const std::vector& defaultPrecisions) : defaultPrecisions(defaultPrecisions) {} -bool ngraph::pass::low_precision::AlignQuantizationIntervals::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::AlignQuantizationIntervals::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(AlignQuantizationIntervals); ov::pass::Manager manager; manager.set_per_pass_validation(false); std::shared_ptr intervalsAlignment = manager.register_pass(); intervalsAlignment->add_matcher>( - AttributeParameters(ngraph::element::f32, defaultPrecisions)); + AttributeParameters(ov::element::f32, defaultPrecisions)); intervalsAlignment->add_matcher>(defaultPrecisions); manager.run_passes(f); return false; diff --git a/src/common/low_precision_transformations/src/align_quantization_parameters.cpp b/src/common/low_precision_transformations/src/align_quantization_parameters.cpp index 01a0edf9309..ade4a900105 100644 --- a/src/common/low_precision_transformations/src/align_quantization_parameters.cpp +++ b/src/common/low_precision_transformations/src/align_quantization_parameters.cpp @@ -13,13 +13,13 @@ #include "itt.hpp" #include "openvino/pass/manager.hpp" -using namespace ngraph; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass::low_precision; -ngraph::pass::low_precision::AlignQuantizationParameters::AlignQuantizationParameters(const std::vector defaultPrecisions) +ov::pass::low_precision::AlignQuantizationParameters::AlignQuantizationParameters(const std::vector defaultPrecisions) : defaultPrecisions(defaultPrecisions) {} -bool ngraph::pass::low_precision::AlignQuantizationParameters::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::AlignQuantizationParameters::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(AlignQuantizationParameters); ov::pass::Manager manager; manager.set_per_pass_validation(false); diff --git a/src/common/low_precision_transformations/src/assign_and_read_value.cpp b/src/common/low_precision_transformations/src/assign_and_read_value.cpp index 46e73b17129..cae504705b1 100644 --- a/src/common/low_precision_transformations/src/assign_and_read_value.cpp +++ b/src/common/low_precision_transformations/src/assign_and_read_value.cpp @@ -3,28 +3,27 @@ // #include "low_precision/assign_and_read_value.hpp" -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" -#include -#include -#include -#include +#include "openvino/opsets/opset3.hpp" +#include "openvino/opsets/opset6.hpp" +#include "openvino/pass/pattern/op/or.hpp" +#include "openvino/op/util/assign_base.hpp" #include "low_precision/fake_quantize.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { -AssignAndReadValueTransformation::AssignAndReadValueTransformation(const std::shared_ptr function, const Params& params) : - LayerTransformation(params), function(function) { +AssignAndReadValueTransformation::AssignAndReadValueTransformation(const std::shared_ptr model, const Params& params) : + LayerTransformation(params), model(model) { MATCHER_SCOPE(AssignAndReadValueTransformation); auto assign3 = pattern::wrap_type({ pattern::wrap_type() }); auto assign6 = pattern::wrap_type({ pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [=](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [=](pattern::Matcher& m) { const auto& opsMap = m.get_pattern_value_map(); auto op = m.get_match_root(); auto assignIt = opsMap.find(assign3); @@ -43,13 +42,13 @@ AssignAndReadValueTransformation::AssignAndReadValueTransformation(const std::sh return transform(*context, m); }; - auto m = std::make_shared( - std::make_shared(OutputVector{ assign3, assign6 }), + auto m = std::make_shared( + std::make_shared(OutputVector{ assign3, assign6 }), matcher_name); this->register_matcher(m, callback); } -bool AssignAndReadValueTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool AssignAndReadValueTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -61,7 +60,7 @@ bool AssignAndReadValueTransformation::transform(TransformationContext& context, const auto assign = NetworkHelper::separateInStandaloneBranch(oldAssign, defaultPrecisions); const auto dequantization = NetworkHelper::getDequantization(assign, defaultPrecisions); - auto oldVar = ov::as_type_ptr(readValue)->get_variable(); + auto oldVar = ov::as_type_ptr(readValue)->get_variable(); auto variableInfo = oldVar->get_info(); // set new precision for oldVar to update precision in newReadValue oldVar->update({variableInfo.data_shape, dequantization.data.get_element_type(), variableInfo.variable_id}); @@ -74,8 +73,8 @@ bool AssignAndReadValueTransformation::transform(TransformationContext& context, // transform Assign part const auto newAssign = assign->copy_with_new_inputs({dequantization.data}); - function->remove_sink(as_type_ptr(oldAssign)); - function->add_sinks({as_type_ptr(newAssign)}); + model->remove_sink(as_type_ptr(oldAssign)); + model->add_sinks({as_type_ptr(newAssign)}); NetworkHelper::copyInfo(assign, newAssign); replace_node(assign, newAssign); @@ -110,7 +109,7 @@ bool AssignAndReadValueTransformation::canBeTransformed(const TransformationCont return false; } - const auto readValue = std::dynamic_pointer_cast(op->get_control_dependencies()[0]); + const auto readValue = std::dynamic_pointer_cast(op->get_control_dependencies()[0]); if (!readValue) { return false; } @@ -130,4 +129,4 @@ bool AssignAndReadValueTransformation::isPrecisionPreserved(std::shared_ptr -#include -#include -#include + +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/rt_info/precision_preserved_attribute.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +21,7 @@ AvgPoolTransformation::AvgPoolTransformation(const Params& params) : LayerTransf MATCHER_SCOPE(AvgPoolTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -29,11 +29,11 @@ AvgPoolTransformation::AvgPoolTransformation(const Params& params) : LayerTransf return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool AvgPoolTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool AvgPoolTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -60,4 +60,4 @@ bool AvgPoolTransformation::isPrecisionPreserved(std::shared_ptr layer) co } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/base_matcher_pass.cpp b/src/common/low_precision_transformations/src/base_matcher_pass.cpp index 6cd2c1a410c..f1b50d8d82f 100644 --- a/src/common/low_precision_transformations/src/base_matcher_pass.cpp +++ b/src/common/low_precision_transformations/src/base_matcher_pass.cpp @@ -3,11 +3,11 @@ // #include "low_precision/base_matcher_pass.hpp" -#include +#include "openvino/core/node.hpp" #include "low_precision/rt_info/attribute_parameters.hpp" -using namespace ngraph; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass::low_precision; -ngraph::pass::low_precision::BaseMatcherPass::BaseMatcherPass(const AttributeParameters& params) : params(params) { +ov::pass::low_precision::BaseMatcherPass::BaseMatcherPass(const AttributeParameters& params) : params(params) { } diff --git a/src/common/low_precision_transformations/src/clamp.cpp b/src/common/low_precision_transformations/src/clamp.cpp index 3f27c599d96..e0fb31a2c73 100644 --- a/src/common/low_precision_transformations/src/clamp.cpp +++ b/src/common/low_precision_transformations/src/clamp.cpp @@ -5,13 +5,12 @@ #include "low_precision/clamp.hpp" #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -19,7 +18,7 @@ ClampTransformation::ClampTransformation(const Params& params) : LayerTransforma MATCHER_SCOPE(ClampTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -27,11 +26,11 @@ ClampTransformation::ClampTransformation(const Params& params) : LayerTransforma return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ClampTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool ClampTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -75,7 +74,7 @@ bool ClampTransformation::transform(TransformationContext& context, ngraph::patt element::Type outputClampType = dequantization.multiply ? dequantization.multiply->get_output_element_type(0) : dequantization.subtract->get_output_element_type(0); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(replacement, outputClampType); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(replacement, outputClampType); return true; } @@ -98,4 +97,4 @@ bool ClampTransformation::isPrecisionPreserved(std::shared_ptr layer) cons } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/concat.cpp b/src/common/low_precision_transformations/src/concat.cpp index 01557a636e2..0658db33169 100644 --- a/src/common/low_precision_transformations/src/concat.cpp +++ b/src/common/low_precision_transformations/src/concat.cpp @@ -9,23 +9,24 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/opsets/opset1.hpp" #include "low_precision/common/fake_quantize_dequantization.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" +#include "openvino/core/validation_util.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { ConcatTransformation::ConcatTransformation(const Params& params) : LayerTransformation(params) { MATCHER_SCOPE(ConcatTransformation); - auto matcher = ngraph::pattern::wrap_type(); + auto matcher = ov::pass::pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -34,12 +35,12 @@ ConcatTransformation::ConcatTransformation(const Params& params) : LayerTransfor return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ConcatTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { - std::shared_ptr concat = ngraph::as_type_ptr(m.get_match_root()); +bool ConcatTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { + std::shared_ptr concat = ov::as_type_ptr(m.get_match_root()); if (!canBeTransformed(context, concat)) { return false; } @@ -84,7 +85,7 @@ bool ConcatTransformation::transform(TransformationContext& context, ngraph::pat // constant shape must be broadcastable to the shape on data. auto broadcastElementWiseConst = [](std::shared_ptr operation, const Shape targetShape) { auto targetShapeConst = std::make_shared(element::i64, Shape{ targetShape.size() }, targetShape); - auto broadcast = fold(operation, targetShapeConst); + auto broadcast = fold(operation, targetShapeConst); return broadcast; }; @@ -100,7 +101,7 @@ bool ConcatTransformation::transform(TransformationContext& context, ngraph::pat bool DqWithDifferentPrecision = someDqInLowPrecision && someDqInFpPrecision; OPENVINO_SUPPRESS_DEPRECATED_START - const auto axis = ngraph::normalize_axis(concat->get_friendly_name(), + const auto axis = ov::normalize_axis(concat->get_friendly_name(), concat->get_axis(), concat->get_output_partial_shape(0).rank()); OPENVINO_SUPPRESS_DEPRECATED_END @@ -128,7 +129,7 @@ bool ConcatTransformation::transform(TransformationContext& context, ngraph::pat if (!allDequantizationShiftAreZero) { auto subtractInput = dequantization.subtract == nullptr ? - std::make_shared( + std::make_shared( (allDequantizationShiftConvertAreNotZero ? PrecisionBeforeConvert : deqPrecision), @@ -148,14 +149,14 @@ bool ConcatTransformation::transform(TransformationContext& context, ngraph::pat if (!allDequantizationMultiplyAreZero) { mulConstants.push_back(dequantization.multiply == nullptr ? - std::make_shared(deqPrecision, targetShape, std::vector({ 1.0f })) : + std::make_shared(deqPrecision, targetShape, std::vector({ 1.0f })) : broadcastElementWiseConst(dequantization.multiplyConstant, targetShape)); } } const auto newConcat = concat->clone_with_new_inputs(dataNodes); - std::shared_ptr lastDequantization = newConcat; + std::shared_ptr lastDequantization = newConcat; if (!convertNodes.empty()) { const auto convert = convertNodes[0]->clone_with_new_inputs({ newConcat }); @@ -167,7 +168,7 @@ bool ConcatTransformation::transform(TransformationContext& context, ngraph::pat if (!subConstants.empty()) { std::shared_ptr subtractNode = subConstants.size() == 1ul ? subConstants[0] : - ngraph::pass::low_precision::fold(subConstants, axis); + ov::pass::low_precision::fold(subConstants, axis); if (subtractConvert != nullptr) subtractNode = subtractConvert->clone_with_new_inputs({subtractNode}); const auto subtract = std::make_shared( @@ -185,7 +186,7 @@ bool ConcatTransformation::transform(TransformationContext& context, ngraph::pat lastDequantization, NetworkHelper::toScalarIfPossible(mulConstants.size() == 1ul ? mulConstants[0] : - ngraph::pass::low_precision::fold(mulConstants, axis))), + ov::pass::low_precision::fold(mulConstants, axis))), layerDequantizations[0].multiply->get_output_element_type(0)); NetworkHelper::copyInfo({ concat, multiply }, multiply); @@ -217,7 +218,7 @@ bool ConcatTransformation::canBeTransformed(const TransformationContext& context } OPENVINO_SUPPRESS_DEPRECATED_START - const size_t normalizedAxis = ngraph::normalize_axis(concat->get_friendly_name(), axis, outRank); + const size_t normalizedAxis = ov::normalize_axis(concat->get_friendly_name(), axis, outRank); OPENVINO_SUPPRESS_DEPRECATED_END if (outPShape[normalizedAxis].is_dynamic()) { return false; @@ -288,4 +289,4 @@ bool ConcatTransformation::isQuantizedStatic(const std::shared_ptr& } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/convert.cpp b/src/common/low_precision_transformations/src/convert.cpp index b454f868061..24004c6b6cb 100644 --- a/src/common/low_precision_transformations/src/convert.cpp +++ b/src/common/low_precision_transformations/src/convert.cpp @@ -11,12 +11,12 @@ #include #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,7 +24,7 @@ ConvertTransformation::ConvertTransformation(const Params& params) : LayerTransf MATCHER_SCOPE(ConvertTransformation); auto matcher = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -32,11 +32,11 @@ ConvertTransformation::ConvertTransformation(const Params& params) : LayerTransf return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ConvertTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool ConvertTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr convert = ov::as_type_ptr(m.get_match_root()); if (!convert) { return false; @@ -46,7 +46,7 @@ bool ConvertTransformation::transform(TransformationContext& context, ngraph::pa return false; } - const ngraph::element::Type precisionBefore = convert->get_input_element_type(0); + const ov::element::Type precisionBefore = convert->get_input_element_type(0); std::shared_ptr subtract = std::make_shared>( convert->input_value(0), @@ -65,4 +65,4 @@ bool ConvertTransformation::isPrecisionPreserved(std::shared_ptr layer) co } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/convert_subtract_constant.cpp b/src/common/low_precision_transformations/src/convert_subtract_constant.cpp index f1aee8b7d9b..da7f97a1870 100644 --- a/src/common/low_precision_transformations/src/convert_subtract_constant.cpp +++ b/src/common/low_precision_transformations/src/convert_subtract_constant.cpp @@ -7,13 +7,13 @@ #include #include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "transformations/rt_info/disable_constant_folding.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -using namespace ngraph; +using namespace ov; // Original (FP16 as example, I8 in constantPrecisions): // @@ -35,16 +35,16 @@ using namespace ngraph; // \ FP16 / FP16 // Multiply // -ngraph::pass::low_precision::ConvertSubtractConstant::ConvertSubtractConstant(const std::vector& constantPrecisions) { +ov::pass::low_precision::ConvertSubtractConstant::ConvertSubtractConstant(const std::vector& constantPrecisions) { MATCHER_SCOPE(ConvertSubtractConstant); - auto weightsConstantWrapper = ngraph::pattern::wrap_type(pattern::consumers_count(1)); - auto weightsConvertWrapper = ngraph::pattern::wrap_type({ weightsConstantWrapper }, pattern::consumers_count(1)); - auto subtractConstantWrapper = ngraph::pattern::wrap_type(pattern::consumers_count(1)); - auto subtractWrapper = ngraph::pattern::wrap_type({ weightsConvertWrapper, subtractConstantWrapper }, pattern::consumers_count(1)); - auto multiplyConstantWrapper = ngraph::pattern::wrap_type(pattern::consumers_count(1)); - auto multiplyWrapper = ngraph::pattern::wrap_type({ subtractWrapper, multiplyConstantWrapper }, pattern::consumers_count(1)); + auto weightsConstantWrapper = ov::pass::pattern::wrap_type(pattern::consumers_count(1)); + auto weightsConvertWrapper = ov::pass::pattern::wrap_type({ weightsConstantWrapper }, pattern::consumers_count(1)); + auto subtractConstantWrapper = ov::pass::pattern::wrap_type(pattern::consumers_count(1)); + auto subtractWrapper = ov::pass::pattern::wrap_type({ weightsConvertWrapper, subtractConstantWrapper }, pattern::consumers_count(1)); + auto multiplyConstantWrapper = ov::pass::pattern::wrap_type(pattern::consumers_count(1)); + auto multiplyWrapper = ov::pass::pattern::wrap_type({ subtractWrapper, multiplyConstantWrapper }, pattern::consumers_count(1)); - ov::matcher_pass_callback callback = [=](ngraph::pattern::Matcher & m) -> bool { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher & m) -> bool { const auto& opsMap = m.get_pattern_value_map(); const auto weightsConvert = opsMap.at(weightsConvertWrapper).get_node_shared_ptr(); const auto quantizePrecision = weightsConvert->get_input_element_type(0); @@ -56,7 +56,7 @@ ngraph::pass::low_precision::ConvertSubtractConstant::ConvertSubtractConstant(co // validation by Convert operation input precisions if (!constantPrecisions.empty()) { - const ngraph::element::Type inputPrecision = quantizePrecision; + const ov::element::Type inputPrecision = quantizePrecision; if (std::find(constantPrecisions.begin(), constantPrecisions.end(), inputPrecision) == constantPrecisions.end()) { return false; } @@ -97,6 +97,6 @@ ngraph::pass::low_precision::ConvertSubtractConstant::ConvertSubtractConstant(co return true; }; - auto m = std::make_shared(multiplyWrapper, matcher_name); + auto m = std::make_shared(multiplyWrapper, matcher_name); this->register_matcher(m, callback); } diff --git a/src/common/low_precision_transformations/src/convolution.cpp b/src/common/low_precision_transformations/src/convolution.cpp index c46b84cd196..e6044b6d9ed 100644 --- a/src/common/low_precision_transformations/src/convolution.cpp +++ b/src/common/low_precision_transformations/src/convolution.cpp @@ -10,21 +10,21 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" -#include +#include "transformations/rt_info/disable_constant_folding.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { ConvolutionTransformation::ConvolutionTransformation(const Params& params) : WeightableLayerTransformation(params) { MATCHER_SCOPE(ConvolutionTransformation); - auto matcher = ngraph::pattern::wrap_type({ - ngraph::pattern::wrap_type(), - std::make_shared(OutputVector { + auto matcher = ov::pass::pattern::wrap_type({ + ov::pass::pattern::wrap_type(), + std::make_shared(OutputVector { pattern::wrap_type(), pattern::wrap_type() }) @@ -39,27 +39,27 @@ ConvolutionTransformation::ConvolutionTransformation(const Params& params) : Wei return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } bool ConvolutionTransformation::isQuantized(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) const { + const std::vector& defaultPrecisions) const { return ConvolutionTransformation::isQuantizedStatic(layer, defaultPrecisions); } bool ConvolutionTransformation::isQuantizedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { return WeightableLayerTransformation::isQuantizedStatic(layer, false, defaultPrecisions); } -size_t ConvolutionTransformation::getInputChannels(const std::shared_ptr conv) const { +size_t ConvolutionTransformation::getInputChannels(const std::shared_ptr conv) const { const auto channels = conv->get_input_partial_shape(1)[1]; assert(channels.is_static()); return channels.get_length(); } -bool ConvolutionTransformation::transform(TransformationContext &context, ngraph::pattern::Matcher &m) { +bool ConvolutionTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { auto convolution = m.get_match_root(); if (!canConvolutionBeTransformed(context, convolution, defaultPrecisions)) { @@ -70,7 +70,7 @@ bool ConvolutionTransformation::transform(TransformationContext &context, ngraph NetworkHelper::getDequantization(reshapeFromWeights, defaultPrecisions); if (dequantization.empty()) { const auto fqOnWeights = getFakeQuantizeOnWeights(convolution); - std::shared_ptr resultConstant = NetworkHelper::fold_fake_quantize(fqOnWeights); + std::shared_ptr resultConstant = NetworkHelper::fold_fake_quantize(fqOnWeights); if (reshapeFromWeights != nullptr) { resultConstant = fold_reshape( resultConstant, @@ -345,4 +345,4 @@ bool ConvolutionTransformation::transform(TransformationContext &context, ngraph } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/convolution_backprop_data.cpp b/src/common/low_precision_transformations/src/convolution_backprop_data.cpp index 122b831a9a7..890bff9d231 100644 --- a/src/common/low_precision_transformations/src/convolution_backprop_data.cpp +++ b/src/common/low_precision_transformations/src/convolution_backprop_data.cpp @@ -10,33 +10,33 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" -#include +#include "transformations/rt_info/disable_constant_folding.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { ConvolutionBackpropDataTransformation::ConvolutionBackpropDataTransformation(const Params& params) : WeightableLayerTransformation(params) { MATCHER_SCOPE(ConvolutionBackpropDataTransformation); - auto matcher = std::make_shared(OutputVector{ + auto matcher = std::make_shared(OutputVector{ pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }), - ngraph::pattern::wrap_type({ + ov::pass::pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }), - ngraph::pattern::wrap_type({ + ov::pass::pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type(), pattern::wrap_type() }), - ngraph::pattern::wrap_type({ + ov::pass::pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type(), pattern::wrap_type() @@ -51,27 +51,27 @@ ConvolutionBackpropDataTransformation::ConvolutionBackpropDataTransformation(con return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } bool ConvolutionBackpropDataTransformation::isQuantized(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) const { + const std::vector& defaultPrecisions) const { return ConvolutionBackpropDataTransformation::isQuantizedStatic(layer, defaultPrecisions); } bool ConvolutionBackpropDataTransformation::isQuantizedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { return WeightableLayerTransformation::isQuantizedStatic(layer, false, defaultPrecisions); } -size_t ConvolutionBackpropDataTransformation::getInputChannels(const std::shared_ptr conv) const { +size_t ConvolutionBackpropDataTransformation::getInputChannels(const std::shared_ptr conv) const { const auto channels = conv->get_input_partial_shape(1)[0]; assert(channels.is_static()); return channels.get_length(); } -bool ConvolutionBackpropDataTransformation::transform(TransformationContext &context, ngraph::pattern::Matcher &m) { +bool ConvolutionBackpropDataTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { auto convolutionBackpropData = m.get_match_root(); if (!canBeTransformed(context, convolutionBackpropData)) { @@ -238,4 +238,4 @@ bool ConvolutionBackpropDataTransformation::canBeTransformed(const Transformatio } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/depth_to_space.cpp b/src/common/low_precision_transformations/src/depth_to_space.cpp index 748d6c7e97b..fe7ea0977a4 100644 --- a/src/common/low_precision_transformations/src/depth_to_space.cpp +++ b/src/common/low_precision_transformations/src/depth_to_space.cpp @@ -5,17 +5,17 @@ #include "low_precision/depth_to_space.hpp" #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; DepthToSpaceTransformation::DepthToSpaceTransformation(const Params& params) : TransparentBaseTransformation(params) { MATCHER_SCOPE(DepthToSpaceTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -23,7 +23,7 @@ DepthToSpaceTransformation::DepthToSpaceTransformation(const Params& params) : T return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } diff --git a/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp b/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp index d1531674dc2..bfa83bb0f44 100644 --- a/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp @@ -6,12 +6,12 @@ #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "itt.hpp" #include "low_precision/network_helper.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -25,7 +25,7 @@ EliminateFakeQuantizeTransformation::EliminateFakeQuantizeTransformation(const P pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { const auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -33,11 +33,11 @@ EliminateFakeQuantizeTransformation::EliminateFakeQuantizeTransformation(const P return transform(*context, m); }; - const auto m = std::make_shared(matcher, matcher_name); + const auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool EliminateFakeQuantizeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool EliminateFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { const auto root = m.get_match_root(); if (!canBeTransformed(context, root)) { return false; @@ -130,4 +130,4 @@ bool EliminateFakeQuantizeTransformation::isPrecisionPreserved(std::shared_ptr #include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/rt_info/bias_attribute.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -30,11 +30,11 @@ FakeQuantizeTransformation::FakeQuantizeTransformation(const Params& params) : L return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool FakeQuantizeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool FakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { const auto layer = ov::as_type_ptr(m.get_match_root()); if (!layer || !QuantizationDetails::outputLayoutIsSupported(layer)) { return false; @@ -59,7 +59,7 @@ static std::shared_ptr updateShape(std::shared_ptr constantOp, const if ((shape.size() > 1ul) && (shape.size() < static_cast(targetShape.rank().get_length()))) { constantOp = fold( constantOp, - std::make_shared(ngraph::element::i32, Shape{ 1 }, std::vector({ 0ul }))); + std::make_shared(ov::element::i32, Shape{ 1 }, std::vector({ 0ul }))); } return constantOp; } @@ -230,4 +230,4 @@ bool FakeQuantizeTransformation::isPrecisionPreserved(std::shared_ptr laye } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp b/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp index 49487f014ab..05aba8463ea 100644 --- a/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp +++ b/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp @@ -5,10 +5,10 @@ #include "low_precision/fake_quantize_decomposition.hpp" #include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" -#include +#include "low_precision/lpt_itt.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/rt_info/precisions_attribute.hpp" #include "low_precision/rt_info/intervals_alignment_attribute.hpp" @@ -16,7 +16,7 @@ #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -24,7 +24,7 @@ FakeQuantizeDecompositionTransformation::FakeQuantizeDecompositionTransformation MATCHER_SCOPE(FakeQuantizeDecompositionTransformation); auto matcher = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -33,7 +33,7 @@ FakeQuantizeDecompositionTransformation::FakeQuantizeDecompositionTransformation return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -62,7 +62,7 @@ DataPrecision getDataPrecisionByOutputPortAndFakeQuantize(std::shared_ptr().value(); - ngraph::element::Type precision; + ov::element::Type precision; bool hasZeroPoint; if (precisions.size() > 1ul) { LayerTransformation::PrecisionDetails precisionDetailsAtOutputIntervals = LayerTransformation::getPrecisionDetails(quantizationDetails); @@ -138,7 +138,7 @@ DataPrecision getDataPrecisionByOutputPort(std::shared_ptr return DataPrecision(); } - ngraph::element::Type precision; + ov::element::Type precision; bool hasZeroPoint; if (resultPrecisions.size() > 1ul) { LayerTransformation::PrecisionDetails precisionDetailsAtOutputIntervals = LayerTransformation::getPrecisionDetails( @@ -182,8 +182,8 @@ std::tuple, std::shared_ptr> decomposeFakeQuantize( const DataPrecision& dataPrecision, const bool updatePrecisions, const element::Type deqPrecision) { - std::shared_ptr dequantize; - std::shared_ptr newFQ; + std::shared_ptr dequantize; + std::shared_ptr newFQ; if (!intervalsAlignment.empty()) { OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::LPT_LT, "decomposeFakeQuantize1"); @@ -216,7 +216,7 @@ std::tuple, std::shared_ptr> decomposeFakeQuantize( } // 2. update FakeQuantize - one time action - std::shared_ptr newFakeQuantizeLayer = ngraph::pass::low_precision::NetworkHelper::updateFakeQuantize( + std::shared_ptr newFakeQuantizeLayer = ov::pass::low_precision::NetworkHelper::updateFakeQuantize( layer, updatePrecisions ? dataPrecision.precision : layer->get_output_element_type(0), roundf(updatedOutputLowValue), @@ -225,7 +225,7 @@ std::tuple, std::shared_ptr> decomposeFakeQuantize( matcherPass->register_new_node(newFakeQuantizeLayer); newFakeQuantizeLayer->set_levels(levels); - auto dequantization = ngraph::pass::low_precision::NetworkHelper::makeDequantization( + auto dequantization = ov::pass::low_precision::NetworkHelper::makeDequantization( dequantizationMul, dequantizationSub, layer->get_output_element_type(0), @@ -236,8 +236,8 @@ std::tuple, std::shared_ptr> decomposeFakeQuantize( NetworkHelper::insertDequantizationAfter(layer, dequantization.multiply, newFakeQuantizeLayer); - std::vector> sourceNodes{ layer }; - std::vector> targetNodes{ newFakeQuantizeLayer, dequantization.multiply }; + std::vector> sourceNodes{ layer }; + std::vector> targetNodes{ newFakeQuantizeLayer, dequantization.multiply }; if (dequantization.convert != nullptr) { targetNodes.push_back(dequantization.convert); } @@ -274,7 +274,7 @@ std::tuple, std::shared_ptr> decomposeFakeQuantize( } // namespace } // namespace fq_decomposition -bool FakeQuantizeDecompositionTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool FakeQuantizeDecompositionTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { auto node = ov::as_type_ptr(m.get_match_root()); if (!node || !NetworkHelper::isQuantizeSupported(node)) { return false; @@ -295,7 +295,7 @@ bool FakeQuantizeDecompositionTransformation::transform(TransformationContext& c return rewritten; } - const ngraph::element::Type outputPrecision = layer->get_output_element_type(0); + const ov::element::Type outputPrecision = layer->get_output_element_type(0); if (DataPrecision::isSupported(outputPrecision)) { const FakeQuantizeDequantization dequantization = NetworkHelper::getDequantizationBelow(layer); if (dequantization.empty()) { @@ -419,8 +419,8 @@ bool FakeQuantizeDecompositionTransformation::transform(TransformationContext& c updatePrecisions, deqPrecision); - std::shared_ptr dequantize = std::get<0>(QDQ); - std::shared_ptr newFakeQuantize = std::get<1>(QDQ); + std::shared_ptr dequantize = std::get<0>(QDQ); + std::shared_ptr newFakeQuantize = std::get<1>(QDQ); if (dequantize == nullptr || newFakeQuantize == nullptr) { return rewritten; } @@ -439,4 +439,4 @@ bool FakeQuantizeDecompositionTransformation::isPrecisionPreserved(std::shared_p } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/fake_quantize_dequantization.cpp b/src/common/low_precision_transformations/src/fake_quantize_dequantization.cpp index 071d10ac51e..bb9c6a9a2be 100644 --- a/src/common/low_precision_transformations/src/fake_quantize_dequantization.cpp +++ b/src/common/low_precision_transformations/src/fake_quantize_dequantization.cpp @@ -5,13 +5,13 @@ #include #include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "low_precision/network_helper.hpp" #include "low_precision/common/fake_quantize_dequantization.hpp" #include "low_precision/common/ie_lpt_exception.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,10 +21,10 @@ FakeQuantizeDequantization::FakeQuantizeDequantization( const Output& data, const std::shared_ptr& convert, const std::shared_ptr& subtract, - const std::shared_ptr& subtractConvert, - const std::shared_ptr& subtractConstant, + const std::shared_ptr& subtractConvert, + const std::shared_ptr& subtractConstant, const std::shared_ptr& multiply, - const std::shared_ptr& multiplyConstant) : + const std::shared_ptr& multiplyConstant) : data(data), convert(convert), subtract(subtract), @@ -89,9 +89,9 @@ bool FakeQuantizeDequantization::isLowPrecision() const { return DataPrecision::isSupported(data.get_element_type()); } -bool FakeQuantizeDequantization::checkShape(const std::shared_ptr& elementwise) { - std::shared_ptr convert; - std::shared_ptr constant; +bool FakeQuantizeDequantization::checkShape(const std::shared_ptr& elementwise) { + std::shared_ptr convert; + std::shared_ptr constant; const int branchIndex = FakeQuantizeDequantization::fillDequantizationParams(elementwise, convert, constant); if (branchIndex == -1) { return true; @@ -115,22 +115,22 @@ bool FakeQuantizeDequantization::checkShape(const std::shared_ptr& } // check if elementwise operation inside dequantization subgraph satisfy per-tensor/per-OC broadcast requirement -bool FakeQuantizeDequantization::checkElementwise(const std::shared_ptr& dequantizationElementwise) const { - std::shared_ptr convert; - std::shared_ptr constant; +bool FakeQuantizeDequantization::checkElementwise(const std::shared_ptr& dequantizationElementwise) const { + std::shared_ptr convert; + std::shared_ptr constant; FakeQuantizeDequantization::fillDequantizationParams(dequantizationElementwise, convert, constant); if (constant == nullptr) { return false; } - const ngraph::Shape constShape = constant->get_shape(); + const ov::Shape constShape = constant->get_shape(); if ((constShape.size() > 5ul)) { return false; } // scalar-like const tensor is broadcastable to any shape of data - if (ngraph::shape_size(constShape) == 1) { + if (ov::shape_size(constShape) == 1) { return true; } @@ -207,14 +207,14 @@ std::shared_ptr FakeQuantizeDequantization::copyWithNewInput(const std::sh } int FakeQuantizeDequantization::fillDequantizationParams( - const std::shared_ptr& elementwise, - std::shared_ptr& convert, - std::shared_ptr& constant) { + const std::shared_ptr& elementwise, + std::shared_ptr& convert, + std::shared_ptr& constant) { auto fill = []( - const std::shared_ptr& elementwise, + const std::shared_ptr& elementwise, const size_t branchIndex, - std::shared_ptr& convert, - std::shared_ptr& constant) { + std::shared_ptr& convert, + std::shared_ptr& constant) { convert = ov::as_type_ptr(elementwise->get_input_node_shared_ptr(branchIndex)); if (convert != nullptr) { constant = convert->get_destination_type().is_real() ? @@ -241,8 +241,8 @@ int FakeQuantizeDequantization::fillDequantizationParams( } int FakeQuantizeDequantization::fillDequantizationParams( - const std::shared_ptr& elementwise, - std::shared_ptr& constant) { + const std::shared_ptr& elementwise, + std::shared_ptr& constant) { constant = elementwise->get_input_element_type(1ul).is_real() ? ov::as_type_ptr(elementwise->get_input_node_shared_ptr(1ul)) : nullptr; @@ -264,4 +264,4 @@ int FakeQuantizeDequantization::fillDequantizationParams( } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/fold_convert.cpp b/src/common/low_precision_transformations/src/fold_convert.cpp index 58a75ff941f..35b3385e2eb 100644 --- a/src/common/low_precision_transformations/src/fold_convert.cpp +++ b/src/common/low_precision_transformations/src/fold_convert.cpp @@ -4,22 +4,22 @@ #include "low_precision/fold_convert.hpp" #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { FoldConvertTransformation::FoldConvertTransformation(const Params& params) : LayerTransformation(params) { MATCHER_SCOPE(FoldConvertTransformation); auto subtract = pattern::wrap_type(); - auto matcher = std::make_shared(subtract, matcher_name); + auto matcher = std::make_shared(subtract, matcher_name); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -30,7 +30,7 @@ FoldConvertTransformation::FoldConvertTransformation(const Params& params) : Lay this->register_matcher(matcher, callback); } -bool FoldConvertTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool FoldConvertTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { const auto subtract = m.get_match_root(); if (!canBeTransformed(context, subtract)) { return false; @@ -42,7 +42,7 @@ bool FoldConvertTransformation::transform(TransformationContext& context, ngraph return; } - const auto resultConstant = ngraph::pass::low_precision::foldConvert(convert->input_value(0), convert->get_output_element_type(0)); + const auto resultConstant = ov::pass::low_precision::foldConvert(convert->input_value(0), convert->get_output_element_type(0)); assert(ov::is_type(resultConstant)); replace_node(convert, resultConstant); @@ -69,4 +69,4 @@ bool FoldConvertTransformation::isPrecisionPreserved(std::shared_ptr layer } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/fold_fake_quantize.cpp b/src/common/low_precision_transformations/src/fold_fake_quantize.cpp index 3246319b7ba..1c06a22f478 100644 --- a/src/common/low_precision_transformations/src/fold_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/fold_fake_quantize.cpp @@ -8,12 +8,12 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +21,7 @@ FoldFakeQuantizeTransformation::FoldFakeQuantizeTransformation(const Params& par MATCHER_SCOPE(FoldFakeQuantizeTransformation); auto fakeQuantize = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -29,11 +29,11 @@ FoldFakeQuantizeTransformation::FoldFakeQuantizeTransformation(const Params& par return transform(*context, m); }; - auto m = std::make_shared(fakeQuantize, matcher_name); + auto m = std::make_shared(fakeQuantize, matcher_name); this->register_matcher(m, callback); } -bool FoldFakeQuantizeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool FoldFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { const auto fakeQuantize = ov::as_type_ptr(m.get_match_root()); if (fakeQuantize == nullptr) { return false; @@ -57,7 +57,7 @@ bool FoldFakeQuantizeTransformation::transform(TransformationContext& context, n return false; } -bool FoldFakeQuantizeTransformation::isConstantOutput(std::shared_ptr node) const { +bool FoldFakeQuantizeTransformation::isConstantOutput(std::shared_ptr node) const { const auto fakeQuantize = ov::as_type_ptr(node); if (!fakeQuantize) { return false; @@ -102,4 +102,4 @@ bool FoldFakeQuantizeTransformation::isPrecisionPreserved(std::shared_ptr } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/fuse_convert.cpp b/src/common/low_precision_transformations/src/fuse_convert.cpp index dd27aab81ba..9c17f38074e 100644 --- a/src/common/low_precision_transformations/src/fuse_convert.cpp +++ b/src/common/low_precision_transformations/src/fuse_convert.cpp @@ -7,15 +7,15 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" #include "low_precision/rt_info/skip_cleanup_attribute.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -30,11 +30,11 @@ FuseConvertTransformation::FuseConvertTransformation(const Params& params) : Lay pattern::any_input(), pattern::any_input(), pattern::any_input()}); - auto matcher = std::make_shared( - std::make_shared(OutputVector{ multiply, subtract, add, fakeQuantize }), + auto matcher = std::make_shared( + std::make_shared(OutputVector{ multiply, subtract, add, fakeQuantize }), matcher_name); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -55,7 +55,7 @@ std::shared_ptr removeConvertIfPossibleForSubtract( const element::Type precisionBeforeConvert = convert->input(0).get_element_type(); if (NetworkHelper::checkConstantValuePrecision(precisionBeforeConvert, subtract->get_input_node_shared_ptr(1))) { newSubtract = std::make_shared>( - std::vector{ element::f32, element::f32 }, std::vector{}, + std::vector{ element::f32, element::f32 }, std::vector{}, ov::op::TemporaryReplaceOutputType(convert->input_value(0), element::f32).get(), ov::op::TemporaryReplaceOutputType(subtract->input_value(1), element::f32).get()); NetworkHelper::setOutDataPrecisionForTypeRelaxed(newSubtract, subtract->get_output_element_type(0)); @@ -67,7 +67,7 @@ std::shared_ptr removeConvertIfPossibleForSubtract( } // namespace -bool FuseConvertTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool FuseConvertTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { const auto op = m.get_match_root(); if (!canBeTransformed(context, op)) { return false; @@ -87,14 +87,14 @@ bool FuseConvertTransformation::transform(TransformationContext& context, ngraph newOp = removeConvertIfPossibleForSubtract(convert, subtract); } else if (ov::is_type(op)) { newOp = std::make_shared>( - std::vector{ element::f32, element::f32 }, std::vector{}, + std::vector{ element::f32, element::f32 }, std::vector{}, ov::op::TemporaryReplaceOutputType(convert->input_value(0), element::f32).get(), ov::op::TemporaryReplaceOutputType(op->input_value(1), element::f32).get()); NetworkHelper::setOutDataPrecisionForTypeRelaxed(newOp, op->get_output_element_type(0)); replace_node(op, newOp); } else if (ov::is_type(op)) { newOp = std::make_shared>( - std::vector{ element::f32, element::f32 }, std::vector{}, + std::vector{ element::f32, element::f32 }, std::vector{}, ov::op::TemporaryReplaceOutputType(convert->input_value(0), element::f32).get(), ov::op::TemporaryReplaceOutputType(op->input_value(1), element::f32).get()); NetworkHelper::setOutDataPrecisionForTypeRelaxed(newOp, op->get_output_element_type(0)); @@ -105,7 +105,7 @@ bool FuseConvertTransformation::transform(TransformationContext& context, ngraph return false; } - ngraph::copy_runtime_info({ convert, op }, newOp); + ov::copy_runtime_info({ convert, op }, newOp); newOp->set_friendly_name(op->get_friendly_name()); register_new_node(newOp); } @@ -138,4 +138,4 @@ bool FuseConvertTransformation::isPrecisionPreserved(std::shared_ptr layer } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp b/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp index f024cb2899b..fd316f0068d 100644 --- a/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp @@ -4,15 +4,14 @@ #include "low_precision/fuse_multiply_to_fake_quantize.hpp" #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/rt_info/intervals_alignment_attribute.hpp" #include "low_precision/fake_quantize.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" #include "low_precision/rt_info/skip_cleanup_attribute.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -20,7 +19,7 @@ FuseMultiplyToFakeQuantizeTransformation::FuseMultiplyToFakeQuantizeTransformati MATCHER_SCOPE(FuseMultiplyToFakeQuantizeTransformation); auto matcher = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -28,11 +27,11 @@ FuseMultiplyToFakeQuantizeTransformation::FuseMultiplyToFakeQuantizeTransformati return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool FuseMultiplyToFakeQuantizeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool FuseMultiplyToFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { const auto multiply = m.get_match_root(); if (!canBeTransformed(context, multiply)) { return false; @@ -128,4 +127,4 @@ bool FuseMultiplyToFakeQuantizeTransformation::isPrecisionPreserved(std::shared_ } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp b/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp index ab9e7db47f6..d75fde32ee1 100644 --- a/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp @@ -4,14 +4,14 @@ #include "low_precision/fuse_subtract_to_fake_quantize.hpp" #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/fake_quantize.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" #include "low_precision/rt_info/skip_cleanup_attribute.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -19,7 +19,7 @@ FuseSubtractToFakeQuantizeTransformation::FuseSubtractToFakeQuantizeTransformati MATCHER_SCOPE(FuseSubtractToFakeQuantizeTransformation); auto matcher = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -27,11 +27,11 @@ FuseSubtractToFakeQuantizeTransformation::FuseSubtractToFakeQuantizeTransformati return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool FuseSubtractToFakeQuantizeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool FuseSubtractToFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { const auto subtract = m.get_match_root(); if (!canBeTransformed(context, subtract)) { return false; @@ -133,4 +133,4 @@ bool FuseSubtractToFakeQuantizeTransformation::isPrecisionPreserved(std::shared_ } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/gather.cpp b/src/common/low_precision_transformations/src/gather.cpp index 7079752192b..caacd0b8311 100644 --- a/src/common/low_precision_transformations/src/gather.cpp +++ b/src/common/low_precision_transformations/src/gather.cpp @@ -5,25 +5,26 @@ #include "low_precision/gather.hpp" #include -#include -#include -#include -#include -#include -#include + +#include "openvino/opsets/opset1.hpp" +#include "openvino/opsets/opset7.hpp" +#include "openvino/opsets/opset8.hpp" +#include "openvino/pass/pattern/op/or.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/rt_info/precision_preserved_attribute.hpp" #include "itt.hpp" +#include "openvino/core/validation_util.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { std::shared_ptr gatherDeqConstant( - const std::shared_ptr &gather, - const std::shared_ptr &dequantizationConstant) { - auto constant = ov::as_type_ptr(dequantizationConstant); + const std::shared_ptr &gather, + const std::shared_ptr &dequantizationConstant) { + auto constant = ov::as_type_ptr(dequantizationConstant); auto constantShape = constant->get_shape(); if (shape_size(constantShape) == 1ul) { return NetworkHelper::toScalar(constant); @@ -35,31 +36,31 @@ std::shared_ptr gatherDeqConstant( while ((constantShape.size() > 1) && (constantShape.size() < rank)) { constantShape.insert(constantShape.begin(), 1); } - const auto newConstant = fold( + const auto newConstant = fold( constant, - ngraph::opset1::Constant::create(ngraph::element::i32, { constantShape.size() }, constantShape)); - constant = ov::as_type_ptr(newConstant); + ov::opset1::Constant::create(ov::element::i32, { constantShape.size() }, constantShape)); + constant = ov::as_type_ptr(newConstant); } const int64_t axis = ov::as_type_ptr(gather->get_input_node_shared_ptr(2))->cast_vector()[0]; OPENVINO_SUPPRESS_DEPRECATED_START - const size_t normalizedAxis = normalize_axis(gather->get_friendly_name(), axis, gather->get_input_partial_shape(0).rank()); + const size_t normalizedAxis = ov::normalize_axis(gather->get_friendly_name(), axis, gather->get_input_partial_shape(0).rank()); OPENVINO_SUPPRESS_DEPRECATED_END // Dequantization channel matches with gather axis if (constantShape[normalizedAxis] != 1ul) { - const auto gather1 = ov::as_type_ptr(gather); + const auto gather1 = ov::as_type_ptr(gather); if (gather1) { - const auto output = fold( + const auto output = fold( constant, gather1->input_value(1), gather1->input_value(2)); constant = ov::as_type_ptr(NetworkHelper::toScalarIfPossible(output)); } - const auto gather7 = ov::as_type_ptr(gather); + const auto gather7 = ov::as_type_ptr(gather); if (gather7) { - const auto output = fold( + const auto output = fold( constant, gather7->input_value(1), gather7->input_value(2), @@ -67,9 +68,9 @@ std::shared_ptr gatherDeqConstant( constant = ov::as_type_ptr(NetworkHelper::toScalarIfPossible(output)); } - const auto gather8 = ov::as_type_ptr(gather); + const auto gather8 = ov::as_type_ptr(gather); if (gather8) { - const auto output = fold( + const auto output = fold( constant, gather8->input_value(1), gather8->input_value(2), @@ -86,7 +87,7 @@ GatherTransformation::GatherTransformation(const Params& params) : LayerTransfor pattern::any_input(), pattern::any_input() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -94,11 +95,11 @@ GatherTransformation::GatherTransformation(const Params& params) : LayerTransfor return transform(*context, m); }; - auto m = std::make_shared(gather, matcher_name); + auto m = std::make_shared(gather, matcher_name); this->register_matcher(m, callback); } -bool GatherTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool GatherTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { auto node = m.get_match_root(); if (!canBeTransformed(context, m.get_match_root())) { return false; @@ -158,7 +159,7 @@ bool GatherTransformation::canBeTransformed(const TransformationContext& context if (operation->get_input_partial_shape(0).rank().is_dynamic()) { return false; } - const auto canBeFolded = [&](const std::shared_ptr dequantizationConstant) { + const auto canBeFolded = [&](const std::shared_ptr dequantizationConstant) { auto constantShape = dequantizationConstant->get_shape(); const auto rank = operation->get_input_partial_shape(0).size(); if (rank != constantShape.size()) { @@ -168,7 +169,7 @@ bool GatherTransformation::canBeTransformed(const TransformationContext& context } const int64_t axis = axisConstant->cast_vector()[0]; OPENVINO_SUPPRESS_DEPRECATED_START - const size_t normalizedAxis = normalize_axis(operation->get_friendly_name(), axis, operation->get_input_partial_shape(0).rank()); + const size_t normalizedAxis = ov::normalize_axis(operation->get_friendly_name(), axis, operation->get_input_partial_shape(0).rank()); OPENVINO_SUPPRESS_DEPRECATED_END if (constantShape[normalizedAxis] != 1ul) { @@ -196,4 +197,4 @@ bool GatherTransformation::isPrecisionPreserved(std::shared_ptr layer) con } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/group_convolution.cpp b/src/common/low_precision_transformations/src/group_convolution.cpp index 7e2cdc5d835..70c046649db 100644 --- a/src/common/low_precision_transformations/src/group_convolution.cpp +++ b/src/common/low_precision_transformations/src/group_convolution.cpp @@ -8,11 +8,11 @@ #include #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -20,7 +20,7 @@ GroupConvolutionTransformation::GroupConvolutionTransformation(const Params& par MATCHER_SCOPE(GroupConvolutionTransformation); auto matcher = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -28,16 +28,16 @@ GroupConvolutionTransformation::GroupConvolutionTransformation(const Params& par return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } bool GroupConvolutionTransformation::isQuantized(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) const { + const std::vector& defaultPrecisions) const { return GroupConvolutionTransformation::isQuantizedStatic(layer, defaultPrecisions); } -bool GroupConvolutionTransformation::transform(TransformationContext &context, ngraph::pattern::Matcher &m) { +bool GroupConvolutionTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { auto convolution = m.get_match_root(); if (!WeightableLayerTransformation::canBeTransformed(context, convolution)) { @@ -49,11 +49,11 @@ bool GroupConvolutionTransformation::transform(TransformationContext &context, n } bool GroupConvolutionTransformation::isQuantizedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { return WeightableLayerTransformation::isQuantizedStatic(layer, true, defaultPrecisions); } -size_t GroupConvolutionTransformation::getInputChannels(const std::shared_ptr conv) const { +size_t GroupConvolutionTransformation::getInputChannels(const std::shared_ptr conv) const { const auto groups = conv->get_input_partial_shape(1)[0]; const auto channels = conv->get_input_partial_shape(1)[2]; assert(channels.is_static() && groups.is_static()); @@ -62,4 +62,4 @@ size_t GroupConvolutionTransformation::getInputChannels(const std::shared_ptr #include -#include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/opsets/opset4.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -using namespace ngraph; -using namespace ngraph::pass; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass; +using namespace ov::pass::low_precision; InterpolateTransformation::InterpolateTransformation(const Params& params) : LayerTransformation(params) { MATCHER_SCOPE(InterpolateTransformation); @@ -39,7 +39,7 @@ InterpolateTransformation::InterpolateTransformation(const Params& params) : Lay pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -47,14 +47,14 @@ InterpolateTransformation::InterpolateTransformation(const Params& params) : Lay return transform(*context, m); }; - auto matcher = std::make_shared( - std::make_shared(OutputVector{ interpolate1, interpolate4, interpolate4_2 }), + auto matcher = std::make_shared( + std::make_shared(OutputVector{ interpolate1, interpolate4, interpolate4_2 }), matcher_name); this->register_matcher(matcher, callback); } -bool InterpolateTransformation::transform(TransformationContext &context, ngraph::pattern::Matcher &m) { +bool InterpolateTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { std::shared_ptr interpolate = m.get_match_root(); if (!canBeTransformed(context, m.get_match_root())) { return false; diff --git a/src/common/low_precision_transformations/src/layer_transformation.cpp b/src/common/low_precision_transformations/src/layer_transformation.cpp index 5de66422e0b..a0122ec08b5 100644 --- a/src/common/low_precision_transformations/src/layer_transformation.cpp +++ b/src/common/low_precision_transformations/src/layer_transformation.cpp @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include +#include "low_precision/layer_transformation.hpp" +#include "low_precision/network_helper.hpp" #include #include @@ -18,7 +18,7 @@ #include "itt.hpp" #include "openvino/util/log.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -39,7 +39,7 @@ void LayerTransformation::setUpdatePrecisions(const bool updatePrecisions) { this->updatePrecisions = updatePrecisions; } -void LayerTransformation::setDefaultPrecisions(const std::vector& defaultPrecisions) { +void LayerTransformation::setDefaultPrecisions(const std::vector& defaultPrecisions) { this->defaultPrecisions = defaultPrecisions; } @@ -52,7 +52,7 @@ bool LayerTransformation::canBeTransformed(const TransformationContext& context, } bool LayerTransformation::canBeTransformedStatic(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { const auto outputs = layer->outputs(); if (std::any_of(outputs.begin(), outputs.end(), [](const Output& out) { return out.get_partial_shape().rank().is_dynamic(); })) { @@ -62,7 +62,7 @@ bool LayerTransformation::canBeTransformedStatic(const std::shared_ptr& la const auto dequantization = NetworkHelper::getDequantization(layer, defaultPrecisions); if (!dequantization.empty()) { auto perChannelQuantization = [](const PartialShape dataPShape, Shape constShape, size_t idxChannelDim) { - if (ngraph::shape_size(constShape) == 1ul) { + if (ov::shape_size(constShape) == 1ul) { return true; } @@ -308,8 +308,8 @@ LayerTransformation::PrecisionDetails LayerTransformation::getPrecisionDetails(c } bool LayerTransformation::isAsymmetricQuantization(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) { - const auto nonConstNode = const_cast(layer.get())->shared_from_this(); + const std::vector& defaultPrecisions) { + const auto nonConstNode = const_cast(layer.get())->shared_from_this(); const auto dequantization = NetworkHelper::getDequantization(nonConstNode, defaultPrecisions); if (dequantization.empty()) { return false; @@ -317,7 +317,7 @@ bool LayerTransformation::isAsymmetricQuantization(const std::shared_ptr& layer, const std::vector& defaultPrecisions) const { +bool LayerTransformation::isQuantized(const std::shared_ptr& layer, const std::vector& defaultPrecisions) const { return true; } @@ -377,13 +377,13 @@ DataPrecision LayerTransformation::getDataPrecision( precisionDetailsAtOutputIntervals.hasZeroPoint); } -std::shared_ptr LayerTransformation::moveDequantizationAfter( +std::shared_ptr LayerTransformation::moveDequantizationAfter( TransformationContext &context, - const std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract) const { - const auto result = ngraph::pass::low_precision::NetworkHelper::moveDequantizationAfter(operation, + const auto result = ov::pass::low_precision::NetworkHelper::moveDequantizationAfter(operation, dequantization, updatePrecision, moveSubtract, @@ -392,13 +392,13 @@ std::shared_ptr LayerTransformation::moveDequantizationAfter( return result.newOperation; } -std::shared_ptr LayerTransformation::moveDequantizationBefore( +std::shared_ptr LayerTransformation::moveDequantizationBefore( TransformationContext& context, - const std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract) const { - const auto result = ngraph::pass::low_precision::NetworkHelper::moveDequantizationBefore(operation, + const auto result = ov::pass::low_precision::NetworkHelper::moveDequantizationBefore(operation, dequantization, updatePrecision, moveSubtract); @@ -408,8 +408,8 @@ std::shared_ptr LayerTransformation::moveDequantizationBefore( void LayerTransformation::updateOutput( TransformationContext &context, - std::shared_ptr lastNode, - std::shared_ptr originalNode) const { + std::shared_ptr lastNode, + std::shared_ptr originalNode) const { // TODO: not tested!!! for (auto output : lastNode->outputs()) { for (auto input : output.get_target_inputs()) { @@ -425,12 +425,12 @@ void LayerTransformation::updateOutput( void LayerTransformation::updateOutput( TransformationContext& context, - std::shared_ptr lastNode, + std::shared_ptr lastNode, std::string originalName) const { - const size_t outputSize = context.function->get_output_size(); + const size_t outputSize = context.model->get_output_size(); for (size_t i = 0; i < outputSize; ++i) { - std::shared_ptr result = context.function->get_output_op(i); - std::shared_ptr outputNode = result->get_input_node_shared_ptr(0); + std::shared_ptr result = context.model->get_output_op(i); + std::shared_ptr outputNode = result->get_input_node_shared_ptr(0); if (outputNode.get() == lastNode.get()) { lastNode->set_friendly_name(originalName); break; @@ -449,7 +449,7 @@ void LayerTransformation::addPattern(ov::pass::GraphRewrite& pass, Transformatio std::cout << "Operation was transformed: " << operationNode->get_type_name() << ", " << operationNode->get_friendly_name() << ", output operation precision: " << - ((operationNode->get_output_size() == 1u) ? operationNode->get_output_element_type(0) : ngraph::element::Type()) << + ((operationNode->get_output_size() == 1u) ? operationNode->get_output_element_type(0) : ov::element::Type()) << std::endl; } #endif @@ -479,4 +479,4 @@ void LayerTransformation::addPattern(ov::pass::GraphRewrite& pass, Transformatio } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/low_precision.cpp b/src/common/low_precision_transformations/src/low_precision.cpp index 7ca3b64775c..e4b501d3a57 100644 --- a/src/common/low_precision_transformations/src/low_precision.cpp +++ b/src/common/low_precision_transformations/src/low_precision.cpp @@ -5,17 +5,17 @@ #include "low_precision/low_precision.hpp" #include -#include -#include -#include -#include -#include -#include -#include -#include "ngraph/op/util/multi_subgraph_base.hpp" -#include -#include +#include "openvino/pass/manager.hpp" +#include "openvino/pass/constant_folding.hpp" +#include "ov_ops/type_relaxed.hpp" +#include "openvino/opsets/opset1.hpp" +#include "openvino/opsets/opset4.hpp" +#include "openvino/opsets/opset6.hpp" +#include "openvino/op/util/multi_subgraph_base.hpp" + +#include "transformations/utils/utils.hpp" +#include "low_precision/lpt_itt.hpp" #include "low_precision/align_quantization_intervals.hpp" #include "low_precision/fake_quantize_decomposition.hpp" @@ -23,7 +23,7 @@ #include "low_precision/markup_precisions.hpp" #include "low_precision/markup_can_be_quantized.hpp" #include "low_precision/markup_avg_pool_precision_preserved.hpp" -#include +#include "low_precision/markup_quantization_granularity.hpp" #include "low_precision/propagate_precisions.hpp" #include "low_precision/align_quantization_parameters.hpp" @@ -85,7 +85,7 @@ #include "low_precision/fuse_subtract_to_fake_quantize.hpp" #include "low_precision/multiply_to_group_convolution.hpp" -ngraph::pass::low_precision::LowPrecision::LowPrecision( +ov::pass::low_precision::LowPrecision::LowPrecision( const std::vector& precisionRestrictions, const std::vector& quantizationRestrictions, const LayerTransformation::Params params) : @@ -94,20 +94,20 @@ ngraph::pass::low_precision::LowPrecision::LowPrecision( params(params) { } -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; template void make_matcher_type_relaxed(ov::pass::GraphRewrite* transformation) { MATCHER_SCOPE(TypeRelaxedReplacer); - using namespace ngraph; + using namespace ov; auto is_op_type = [](std::shared_ptr n) { return !!ov::as_type_ptr(n); }; - auto p_node = std::make_shared(element::f32, Shape{}, is_op_type); + auto p_node = std::make_shared(element::f32, Shape{}, is_op_type); - ngraph::graph_rewrite_callback callback = [](ngraph::pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [](ov::pass::pattern::Matcher& m) { auto l_node = std::dynamic_pointer_cast(m.get_match_root()); if (!l_node) { THROW_TRANSFORMATION_EXCEPTION << "unexpected operation type for type relaxed conversion"; @@ -135,7 +135,7 @@ void make_matcher_type_relaxed(ov::pass::GraphRewrite* transformation) { return true; }; - auto m = std::make_shared(p_node, matcher_name); + auto m = std::make_shared(p_node, matcher_name); auto match_pass = std::make_shared( m->get_name(), m, @@ -156,7 +156,7 @@ void make_matcher_type_relaxed(ov::pass::GraphRewrite* transformation) { transformation->add_matcher(match_pass); } -ngraph::pass::low_precision::TypeRelaxedReplacer::TypeRelaxedReplacer() { +ov::pass::low_precision::TypeRelaxedReplacer::TypeRelaxedReplacer() { make_matcher_type_relaxed(this); make_matcher_type_relaxed(this); make_matcher_type_relaxed(this); @@ -171,7 +171,7 @@ ngraph::pass::low_precision::TypeRelaxedReplacer::TypeRelaxedReplacer() { make_matcher_type_relaxed(this); make_matcher_type_relaxed(this); make_matcher_type_relaxed(this); - make_matcher_type_relaxed(this); + make_matcher_type_relaxed(this); make_matcher_type_relaxed(this); make_matcher_type_relaxed(this); make_matcher_type_relaxed(this); @@ -185,7 +185,7 @@ MarkupOptimizations::MarkupOptimizations( quantizationRestrictions(quantizationRestrictions), params(params) {} -bool ngraph::pass::low_precision::MarkupOptimizations::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::MarkupOptimizations::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(MarkupOptimizations); ov::pass::Manager markup(get_pass_config()); markup.set_per_pass_validation(false); @@ -196,11 +196,11 @@ bool ngraph::pass::low_precision::MarkupOptimizations::run_on_model(const std::s if (!quantizationRestrictions.empty()) { markup.register_pass(quantizationRestrictions); } - if (ov::op::util::has_op_with_type(f)) { + if (ov::op::util::has_op_with_type(f)) { markup.register_pass(params.defaultPrecisions); } markup.register_pass(params); - if (ov::op::util::has_op_with_type(f)) { + if (ov::op::util::has_op_with_type(f)) { markup.register_pass(params.defaultPrecisions); markup.register_pass(params.defaultPrecisions); } @@ -209,7 +209,7 @@ bool ngraph::pass::low_precision::MarkupOptimizations::run_on_model(const std::s return false; } -bool ngraph::pass::low_precision::LowPrecision::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::LowPrecision::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(LowPrecision); OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::LPT_LT, "LowPrecision"); @@ -217,10 +217,10 @@ bool ngraph::pass::low_precision::LowPrecision::run_on_model(const std::shared_p ov::pass::Manager manager(passConfig); auto prerequisites = manager.register_pass(); - const std::vector supportedTypes = {ngraph::element::i8, ngraph::element::u8}; + const std::vector supportedTypes = {ov::element::i8, ov::element::u8}; ADD_MATCHER(prerequisites, PullReshapeThroughDequantization, supportedTypes) ADD_MATCHER(prerequisites, PullTransposeThroughDequantization, supportedTypes) - using namespace ngraph::pass::low_precision; + using namespace ov::pass::low_precision; using namespace ov::pass; ADD_MATCHER(prerequisites, LinOpSequenceFusion) ADD_MATCHER(prerequisites, MoveFakeQuantize) @@ -228,7 +228,7 @@ bool ngraph::pass::low_precision::LowPrecision::run_on_model(const std::shared_p manager.register_pass(); AttributeParameters attributeParams(params.deqPrecision, params.defaultPrecisions); - manager.register_pass(precisionRestrictions, + manager.register_pass(precisionRestrictions, quantizationRestrictions, attributeParams); @@ -289,10 +289,10 @@ bool ngraph::pass::low_precision::LowPrecision::run_on_model(const std::shared_p return false; } -bool ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(const std::shared_ptr& function) { - std::set> handledNodes; - std::deque> nodes; - for (const auto& result : function->get_results()) { +bool ov::pass::low_precision::LowPrecision::isFunctionQuantized(const std::shared_ptr& model) { + std::set> handledNodes; + std::deque> nodes; + for (const auto& result : model->get_results()) { nodes.push_front(result); } @@ -306,12 +306,12 @@ bool ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(const std::s continue; } - if (const auto fakeQuantize = ov::as_type_ptr(parent)) { + if (const auto fakeQuantize = ov::as_type_ptr(parent)) { if (QuantizationDetails::outputLayoutIsSupported(fakeQuantize, true) && QuantizationDetails::isSupportedLevel(fakeQuantize->get_levels())) { return true; } - } else if (const auto multiSubGraph = ov::as_type_ptr(parent)) { + } else if (const auto multiSubGraph = ov::as_type_ptr(parent)) { // Look inside subraph operations, such as TensorIterator, Loop, If, etc for (size_t i = 0; i < multiSubGraph->get_internal_subgraphs_size(); i++) { if (isFunctionQuantized(multiSubGraph->get_function(i))) { @@ -328,12 +328,12 @@ bool ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(const std::s return false; } -bool ngraph::pass::low_precision::LowPrecision::isFQLevelsPresent( - const std::shared_ptr& function, +bool ov::pass::low_precision::LowPrecision::isFQLevelsPresent( + const std::shared_ptr& model, const std::set& levels) { - std::vector> nodes = function->get_ops(); + std::vector> nodes = model->get_ops(); for (auto& node : nodes) { - const auto fakeQuantize = as_type_ptr(node); + const auto fakeQuantize = as_type_ptr(node); if (fakeQuantize != nullptr) { if (levels.count(fakeQuantize->get_levels()) == 1) { return true; diff --git a/src/common/low_precision_transformations/src/markup_avg_pool_precision_preserved.cpp b/src/common/low_precision_transformations/src/markup_avg_pool_precision_preserved.cpp index e52a33d4edc..21255fa7b94 100644 --- a/src/common/low_precision_transformations/src/markup_avg_pool_precision_preserved.cpp +++ b/src/common/low_precision_transformations/src/markup_avg_pool_precision_preserved.cpp @@ -4,7 +4,7 @@ #include "low_precision/markup_avg_pool_precision_preserved.hpp" #include -#include +#include "openvino/opsets/opset1.hpp" #include "low_precision/create_precisions_dependent_attribute.hpp" #include "low_precision/rt_info/avg_pool_precision_preserved_attribute.hpp" #include "low_precision/propagate_through_precision_preserved.hpp" @@ -12,12 +12,12 @@ #include "itt.hpp" #include "openvino/pass/manager.hpp" -using namespace ngraph; +using namespace ov; -ngraph::pass::low_precision::MarkupAvgPoolPrecisionPreserved::MarkupAvgPoolPrecisionPreserved(const std::vector defaultPrecisions) +ov::pass::low_precision::MarkupAvgPoolPrecisionPreserved::MarkupAvgPoolPrecisionPreserved(const std::vector defaultPrecisions) : defaultPrecisions(defaultPrecisions) {} -bool ngraph::pass::low_precision::MarkupAvgPoolPrecisionPreserved::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::MarkupAvgPoolPrecisionPreserved::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(MarkupAvgPoolPrecisionPreserved); ov::pass::Manager manager; manager.set_per_pass_validation(false); diff --git a/src/common/low_precision_transformations/src/markup_bias.cpp b/src/common/low_precision_transformations/src/markup_bias.cpp index 50ff66c0366..c07f10d40a5 100644 --- a/src/common/low_precision_transformations/src/markup_bias.cpp +++ b/src/common/low_precision_transformations/src/markup_bias.cpp @@ -5,13 +5,13 @@ #include "low_precision/markup_bias.hpp" #include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "itt.hpp" #include "low_precision/rt_info/bias_attribute.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; MarkupBias::MarkupBias() { MATCHER_SCOPE(MarkupBias); diff --git a/src/common/low_precision_transformations/src/markup_can_be_quantized.cpp b/src/common/low_precision_transformations/src/markup_can_be_quantized.cpp index 73dfb66645f..ba10926799a 100644 --- a/src/common/low_precision_transformations/src/markup_can_be_quantized.cpp +++ b/src/common/low_precision_transformations/src/markup_can_be_quantized.cpp @@ -6,7 +6,7 @@ #include -#include +#include "openvino/opsets/opset1.hpp" #include "low_precision/concat.hpp" #include "low_precision/convolution.hpp" #include "low_precision/convolution_backprop_data.hpp" @@ -15,14 +15,14 @@ #include "low_precision/rt_info/precisions_attribute.hpp" #include "itt.hpp" -using namespace ngraph; +using namespace ov; -ngraph::pass::low_precision::MarkupCanBeQuantized::MarkupCanBeQuantized(const std::vector defaultPrecisions) +ov::pass::low_precision::MarkupCanBeQuantized::MarkupCanBeQuantized(const std::vector defaultPrecisions) : defaultPrecisions(defaultPrecisions) {} -bool ngraph::pass::low_precision::MarkupCanBeQuantized::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::MarkupCanBeQuantized::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(MarkupCanBeQuantized); - auto setEmptyPrecisions = [](const std::shared_ptr& node) { + auto setEmptyPrecisions = [](const std::shared_ptr& node) { for (auto& input : node->inputs()) { auto& rt = input.get_rt_info(); rt.emplace( @@ -36,31 +36,31 @@ bool ngraph::pass::low_precision::MarkupCanBeQuantized::run_on_model(const std:: continue; } - if (const auto convolution = std::dynamic_pointer_cast(node)) { + if (const auto convolution = std::dynamic_pointer_cast(node)) { if (!ConvolutionTransformation::isQuantizedStatic(convolution, defaultPrecisions)) { setEmptyPrecisions(convolution); } continue; } - if (const auto convolutionBackpropData = std::dynamic_pointer_cast(node)) { + if (const auto convolutionBackpropData = std::dynamic_pointer_cast(node)) { if (!ConvolutionBackpropDataTransformation::isQuantizedStatic(convolutionBackpropData, defaultPrecisions)) { setEmptyPrecisions(convolutionBackpropData); } continue; } - if (const auto groupConvolution = std::dynamic_pointer_cast(node)) { + if (const auto groupConvolution = std::dynamic_pointer_cast(node)) { if (!GroupConvolutionTransformation::isQuantizedStatic(groupConvolution, defaultPrecisions)) { setEmptyPrecisions(groupConvolution); } continue; } - if (const auto concat = std::dynamic_pointer_cast(node)) { + if (const auto concat = std::dynamic_pointer_cast(node)) { if (!ConcatTransformation::isQuantizedStatic(concat)) { setEmptyPrecisions(concat); } continue; } - if (const auto multiSubGraph = ov::as_type_ptr(node)) { + if (const auto multiSubGraph = ov::as_type_ptr(node)) { for (size_t i = 0; i < multiSubGraph->get_internal_subgraphs_size(); i++) run_on_model(multiSubGraph->get_function(i)); continue; diff --git a/src/common/low_precision_transformations/src/markup_precisions.cpp b/src/common/low_precision_transformations/src/markup_precisions.cpp index 3b942eb1a86..4ccd4d18d3f 100644 --- a/src/common/low_precision_transformations/src/markup_precisions.cpp +++ b/src/common/low_precision_transformations/src/markup_precisions.cpp @@ -9,23 +9,23 @@ #include #include -#include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/opsets/opset4.hpp" +#include "openvino/opsets/opset5.hpp" +#include "openvino/opsets/opset6.hpp" #include "openvino/opsets/opset12.hpp" -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/rt_info/precisions_attribute.hpp" #include "low_precision/rt_info/precision_preserved_attribute.hpp" #include "itt.hpp" -using namespace ngraph; +using namespace ov; -ngraph::pass::low_precision::MarkupPrecisions::MarkupPrecisions( +ov::pass::low_precision::MarkupPrecisions::MarkupPrecisions( const std::vector& restrictions, - const std::vector& defaultPrecisions) : defaultPrecisions(defaultPrecisions) { + const std::vector& defaultPrecisions) : defaultPrecisions(defaultPrecisions) { for (const auto& restriction : restrictions) { const auto it = restrictionsByOperation.find(restriction.operationType.name); OPENVINO_SUPPRESS_DEPRECATED_START @@ -62,7 +62,7 @@ void setRestriction( for (const auto& port : item.first) { Input input = node->input(port); auto& rt = input.get_rt_info(); - auto precisionsAttribute = ngraph::pass::low_precision::getAttribute(input); + auto precisionsAttribute = ov::pass::low_precision::getAttribute(input); if ((!precisionsAttribute.empty()) && (precisionsAttribute.as().value().empty())) { return; } @@ -73,7 +73,7 @@ void setRestriction( } } // namespace -bool ngraph::pass::low_precision::MarkupPrecisions::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::MarkupPrecisions::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(MarkupPrecisions); for (const std::shared_ptr& node : f->get_ordered_ops()) { if (node->get_input_size() == 0) { @@ -84,7 +84,7 @@ bool ngraph::pass::low_precision::MarkupPrecisions::run_on_model(const std::shar continue; } - if (const auto multiSubGraph = ov::as_type_ptr(node)) { + if (const auto multiSubGraph = ov::as_type_ptr(node)) { for (size_t i = 0; i < multiSubGraph->get_internal_subgraphs_size(); i++) run_on_model(multiSubGraph->get_function(i)); continue; @@ -136,7 +136,7 @@ std::string name() { return Operation::get_type_info_static().name; } -bool ngraph::pass::low_precision::MarkupPrecisions::isPrecisionPreserved(const std::shared_ptr& node) { +bool ov::pass::low_precision::MarkupPrecisions::isPrecisionPreserved(const std::shared_ptr& node) { if (isDisabled(node)) { return false; } @@ -186,7 +186,7 @@ bool ngraph::pass::low_precision::MarkupPrecisions::isPrecisionPreserved(const s return false; } -bool ngraph::pass::low_precision::MarkupPrecisions::isSupported(const std::shared_ptr& node) { +bool ov::pass::low_precision::MarkupPrecisions::isSupported(const std::shared_ptr& node) { static std::unordered_set supportedOps = { { name() }, { name() }, @@ -204,7 +204,7 @@ bool ngraph::pass::low_precision::MarkupPrecisions::isSupported(const std::share { name() }, { name() }, { name() }, - { name() }, + { name() }, { name() }, { name() }, { name() }, diff --git a/src/common/low_precision_transformations/src/markup_quantization_granularity.cpp b/src/common/low_precision_transformations/src/markup_quantization_granularity.cpp index 456afd3f938..c2eed02feeb 100644 --- a/src/common/low_precision_transformations/src/markup_quantization_granularity.cpp +++ b/src/common/low_precision_transformations/src/markup_quantization_granularity.cpp @@ -7,13 +7,13 @@ #include #include #include -#include +#include "openvino/core/node.hpp" #include "itt.hpp" #include "low_precision/rt_info/quantization_granularity_attribute.hpp" -using namespace ngraph; +using namespace ov; -ngraph::pass::low_precision::MarkupQuantizationGranularity::MarkupQuantizationGranularity( +ov::pass::low_precision::MarkupQuantizationGranularity::MarkupQuantizationGranularity( const std::vector& restrictions) { for (const auto& restriction : restrictions) { const auto it = restrictionsByOperation.find(restriction.operationType.name); @@ -29,7 +29,7 @@ ngraph::pass::low_precision::MarkupQuantizationGranularity::MarkupQuantizationGr } } -bool ngraph::pass::low_precision::MarkupQuantizationGranularity::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::MarkupQuantizationGranularity::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(MarkupPerTensorQuantization); auto setRestriction = [](const std::shared_ptr& node, const std::vector& restrictedPorts) { auto createAttribute = [](Input& input, const QuantizationGranularityAttribute::Granularity granularity){ diff --git a/src/common/low_precision_transformations/src/mat_mul.cpp b/src/common/low_precision_transformations/src/mat_mul.cpp index cfb336ddcad..a7244ed7557 100644 --- a/src/common/low_precision_transformations/src/mat_mul.cpp +++ b/src/common/low_precision_transformations/src/mat_mul.cpp @@ -9,22 +9,22 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/or.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -using namespace ngraph; -using namespace ngraph::pass; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass; +using namespace ov::pass::low_precision; MatMulTransformation::MatMulTransformation(const Params& params) : LayerTransformation(params) { MATCHER_SCOPE(MatMulTransformation); auto mul1 = pattern::wrap_type(); auto mul2 = pattern::wrap_type(); auto fq2 = pattern::wrap_type(); - auto matcher = pattern::wrap_type({ mul1, std::make_shared(OutputVector{ mul2, fq2 })}); + auto matcher = pattern::wrap_type({ mul1, std::make_shared(OutputVector{ mul2, fq2 })}); ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); @@ -34,11 +34,11 @@ MatMulTransformation::MatMulTransformation(const Params& params) : LayerTransfor return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool MatMulTransformation::transform(TransformationContext &context, ngraph::pattern::Matcher &m) { +bool MatMulTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { std::shared_ptr matMul = ov::as_type_ptr(m.get_match_root()); if ((matMul == nullptr) || !canBeTransformed(context, matMul)) { return false; @@ -107,7 +107,7 @@ bool MatMulTransformation::transform(TransformationContext &context, ngraph::pat // broadcasted sub const to form [1, ..., 1, Y] const auto broadcastedConst = fold( dequantization1.subtractConstant, - ov::opset1::Constant::create(ngraph::element::i32, { broadcastShape.size() }, broadcastShape)); + ov::opset1::Constant::create(ov::element::i32, { broadcastShape.size() }, broadcastShape)); // multiply by weights: [1, ..., 1, Y] x [Y, Z] => [1, ..., 1, Z] const auto newSubConst = NetworkHelper::toScalarIfPossible(fold( diff --git a/src/common/low_precision_transformations/src/max_pool.cpp b/src/common/low_precision_transformations/src/max_pool.cpp index 5cc99329db0..a2f4f70b064 100644 --- a/src/common/low_precision_transformations/src/max_pool.cpp +++ b/src/common/low_precision_transformations/src/max_pool.cpp @@ -5,15 +5,15 @@ #include "low_precision/max_pool.hpp" #include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +21,7 @@ MaxPoolTransformation::MaxPoolTransformation(const Params& params) : LayerTransf MATCHER_SCOPE(MaxPoolTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -29,7 +29,7 @@ MaxPoolTransformation::MaxPoolTransformation(const Params& params) : LayerTransf return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -51,7 +51,7 @@ bool MaxPoolTransformation::canBeTransformed(const TransformationContext& contex return true; } -bool MaxPoolTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool MaxPoolTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -67,4 +67,4 @@ bool MaxPoolTransformation::isPrecisionPreserved(std::shared_ptr layer) co } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/move_fake_quantize.cpp b/src/common/low_precision_transformations/src/move_fake_quantize.cpp index 6c35c2d116e..3c43c501efc 100644 --- a/src/common/low_precision_transformations/src/move_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/move_fake_quantize.cpp @@ -4,42 +4,42 @@ #include "low_precision/move_fake_quantize.hpp" -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/opsets/opset1.hpp" #include -#include -#include -#include +#include "openvino/core/node.hpp" +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/concat.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { MoveFakeQuantize::MoveFakeQuantize(const Params& params) : LayerTransformation(params) { MATCHER_SCOPE(MoveFakeQuantize); - const auto concat = ngraph::pattern::wrap_type(pattern::consumers_count(1)); - const auto operation = ngraph::pattern::wrap_type({ concat }); - const auto input_low = ngraph::pattern::wrap_type(); - const auto input_high = ngraph::pattern::wrap_type(); - const auto output_low = ngraph::pattern::wrap_type(); - const auto output_high = ngraph::pattern::wrap_type(); - const auto fq_with_operation = ngraph::pattern::wrap_type({ operation, + const auto concat = ov::pass::pattern::wrap_type(pattern::consumers_count(1)); + const auto operation = ov::pass::pattern::wrap_type({ concat }); + const auto input_low = ov::pass::pattern::wrap_type(); + const auto input_high = ov::pass::pattern::wrap_type(); + const auto output_low = ov::pass::pattern::wrap_type(); + const auto output_high = ov::pass::pattern::wrap_type(); + const auto fq_with_operation = ov::pass::pattern::wrap_type({ operation, input_low, input_high, output_low, output_high}); - const auto fq = ngraph::pattern::wrap_type({ concat, + const auto fq = ov::pass::pattern::wrap_type({ concat, input_low, input_high, output_low, output_high }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -48,20 +48,20 @@ MoveFakeQuantize::MoveFakeQuantize(const Params& params) : LayerTransformation(p return transform(*context, m); }; - auto m = std::make_shared( - std::make_shared(OutputVector{fq, fq_with_operation}), + auto m = std::make_shared( + std::make_shared(OutputVector{fq, fq_with_operation}), matcher_name); this->register_matcher(m, callback); } -bool MoveFakeQuantize::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool MoveFakeQuantize::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { const auto fq = m.get_match_root(); if (!canBeTransformed(context, fq)) { return false; } const auto operation = fq->get_input_node_shared_ptr(0); - std::shared_ptr concat; + std::shared_ptr concat; bool without_operation = true; const std::string fq_original_name = fq->get_friendly_name(); std::string operation_original_name; @@ -97,7 +97,7 @@ bool MoveFakeQuantize::transform(TransformationContext& context, ngraph::pattern return false; } - std::vector>> new_constants; + std::vector>> new_constants; if (multi_chanels) { new_constants = NetworkHelper::splitConstantsBeforeConcat(concat, curr_constants); } @@ -109,7 +109,7 @@ bool MoveFakeQuantize::transform(TransformationContext& context, ngraph::pattern const auto& dequantization = NetworkHelper::getDequantizationBelow(convert_q, true); - std::vector> newNodes; + std::vector> newNodes; for (size_t i = 0; i < concat->get_input_size(); ++i) { ov::Output parent_output; if (without_operation) { @@ -120,7 +120,7 @@ bool MoveFakeQuantize::transform(TransformationContext& context, ngraph::pattern parent_output = fq_input->output(0); } - const std::shared_ptr new_fq = multi_chanels ? + const std::shared_ptr new_fq = multi_chanels ? fq->clone_with_new_inputs({parent_output, new_constants[0][new_constants[0].size() == 1 ? 0 : i], new_constants[1][new_constants[1].size() == 1 ? 0 : i], @@ -132,11 +132,11 @@ bool MoveFakeQuantize::transform(TransformationContext& context, ngraph::pattern fq->get_input_node_ptr(3)->clone_with_new_inputs({}), fq->get_input_node_ptr(4)->clone_with_new_inputs({}) }); - ngraph::copy_runtime_info(fq, new_fq); + ov::copy_runtime_info(fq, new_fq); new_fq->set_friendly_name(fq_original_name + "_" + std::to_string(i + 1)); if (!dequantization.empty()) { auto new_convert_q = convert_q->clone_with_new_inputs({new_fq}); - ngraph::copy_runtime_info(convert_q, new_convert_q); + ov::copy_runtime_info(convert_q, new_convert_q); new_convert_q->set_friendly_name(convert_q->get_friendly_name() + "_" + std::to_string(i + 1)); newNodes.push_back(new_convert_q); } else { @@ -144,7 +144,7 @@ bool MoveFakeQuantize::transform(TransformationContext& context, ngraph::pattern } } - auto newConcat = concat->clone_with_new_inputs(ngraph::OutputVector(newNodes.begin(), newNodes.end())); + auto newConcat = concat->clone_with_new_inputs(ov::OutputVector(newNodes.begin(), newNodes.end())); newConcat->set_friendly_name(concat->get_friendly_name()); NetworkHelper::copyInfo(concat, newConcat); if (!dequantization.empty()) { @@ -159,7 +159,7 @@ bool MoveFakeQuantize::transform(TransformationContext& context, ngraph::pattern bool MoveFakeQuantize::canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const { auto operation = layer->get_input_node_shared_ptr(0); - std::shared_ptr concat; + std::shared_ptr concat; if (is_type(operation)) { concat = operation; } else { @@ -198,4 +198,4 @@ bool MoveFakeQuantize::isPrecisionPreserved(std::shared_ptr) const noexcep } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/multiply.cpp b/src/common/low_precision_transformations/src/multiply.cpp index f9cc75e2bca..6d336e659e7 100644 --- a/src/common/low_precision_transformations/src/multiply.cpp +++ b/src/common/low_precision_transformations/src/multiply.cpp @@ -12,13 +12,13 @@ #include #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -26,7 +26,7 @@ MultiplyTransformation::MultiplyTransformation(const Params& params) : EltwiseBa MATCHER_SCOPE(MultiplyTransformation); auto matcher = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -34,11 +34,11 @@ MultiplyTransformation::MultiplyTransformation(const Params& params) : EltwiseBa return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool MultiplyTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool MultiplyTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { auto multiply = m.get_match_root(); if (!canBeTransformed(context, multiply)) { return false; @@ -83,8 +83,8 @@ bool MultiplyTransformation::transform(TransformationContext& context, ngraph::p auto multiplyParentConst = multiplyParent.get_node_shared_ptr()->input_value(multiplyBranch.second == 0 ? 1 : 0); newMultiply = std::make_shared>( - std::vector{ element::f32, element::f32 }, - std::vector{ multiply->get_output_element_type(0) }, + std::vector{ element::f32, element::f32 }, + std::vector{ multiply->get_output_element_type(0) }, ov::op::TemporaryReplaceOutputType(multiplyParentParent, element::f32).get(), ov::op::TemporaryReplaceOutputType( fold( @@ -171,4 +171,4 @@ bool MultiplyTransformation::canBeTransformed(const TransformationContext& conte } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp b/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp index 18201f56e76..62a51ef6193 100644 --- a/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp +++ b/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp @@ -4,12 +4,12 @@ #include "low_precision/multiply_to_group_convolution.hpp" #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -19,7 +19,7 @@ MultiplyToGroupConvolutionTransformation::MultiplyToGroupConvolutionTransformati MATCHER_SCOPE(MultiplyToGroupConvolutionTransformation); auto matcher = pattern::wrap_type(); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -27,11 +27,11 @@ MultiplyToGroupConvolutionTransformation::MultiplyToGroupConvolutionTransformati return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool MultiplyToGroupConvolutionTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool MultiplyToGroupConvolutionTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { const auto multiply = m.get_match_root(); if (!canBeTransformed(context, multiply)) { return false; @@ -202,7 +202,7 @@ bool MultiplyToGroupConvolutionTransformation::canBeTransformed(const Transforma } bool MultiplyToGroupConvolutionTransformation::isQuantized(const std::shared_ptr& layer, - const std::vector& defaultPrecisions) const { + const std::vector& defaultPrecisions) const { return MultiplyToGroupConvolutionTransformation::canBeTransformedToGroupConvolution(layer); } @@ -266,4 +266,4 @@ bool MultiplyToGroupConvolutionTransformation::isPrecisionPreserved(std::shared_ } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/mvn.cpp b/src/common/low_precision_transformations/src/mvn.cpp index 1f0cb4d1088..a2f86519ec4 100644 --- a/src/common/low_precision_transformations/src/mvn.cpp +++ b/src/common/low_precision_transformations/src/mvn.cpp @@ -10,24 +10,24 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/or.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" -#include "ngraph/type/element_type.hpp" -#include "ngraph/type/element_type_traits.hpp" +#include "openvino/core/type/element_type.hpp" +#include "openvino/core/type/element_type_traits.hpp" #include "low_precision/network_helper.hpp" -#include "ngraph/opsets/opset6.hpp" +#include "openvino/opsets/opset6.hpp" #include "itt.hpp" -using namespace ngraph; -using namespace ngraph::pass; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass; +using namespace ov::pass::low_precision; namespace mvn { template -std::shared_ptr createNewScalesConst(const ngraph::op::Constant& originalConst) { +std::shared_ptr createNewScalesConst(const ov::op::v0::Constant& originalConst) { std::vector source = originalConst.cast_vector(); std::vector newData(source.size()); @@ -35,17 +35,17 @@ std::shared_ptr createNewScalesConst(const ngraph::op::Con newData[i] = source[i] < 0 ? T{-1} : T{1}; } - const ngraph::element::Type type = originalConst.get_output_element_type(0); - return ngraph::op::Constant::create(type, originalConst.get_shape(), newData); + const ov::element::Type type = originalConst.get_output_element_type(0); + return ov::op::v0::Constant::create(type, originalConst.get_shape(), newData); } } // namespace mvn MVNTransformation::MVNTransformation(const Params& params) : LayerTransformation(params) { MATCHER_SCOPE(MVNTransformation); - auto matcher = std::make_shared(OutputVector{ - pattern::wrap_type({ pattern::wrap_type() }), - pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }) + auto matcher = std::make_shared(OutputVector{ + pattern::wrap_type({ pattern::wrap_type() }), + pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }) }); ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { @@ -56,7 +56,7 @@ MVNTransformation::MVNTransformation(const Params& params) : LayerTransformation return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -70,7 +70,7 @@ bool MVNTransformation::canBeTransformed(const TransformationContext& context, s return false; } - std::shared_ptr mvn = ov::as_type_ptr(operation); + std::shared_ptr mvn = ov::as_type_ptr(operation); if (!mvn) { mvn = ov::as_type_ptr(operation); if (!mvn) { @@ -79,8 +79,8 @@ bool MVNTransformation::canBeTransformed(const TransformationContext& context, s } AxisSet reduction_axes; - if (ov::is_type(mvn)) { - reduction_axes = ov::as_type_ptr(mvn)->get_reduction_axes(); + if (ov::is_type(mvn)) { + reduction_axes = ov::as_type_ptr(mvn)->get_reduction_axes(); } else { // MVN-6 allows negative values in reduction axes: [-r, r-1] // given static rank of input data of MVN node, we can recover the exact axis number @@ -118,20 +118,20 @@ bool MVNTransformation::canBeTransformed(const TransformationContext& context, s return false; } -bool MVNTransformation::transform(TransformationContext &context, ngraph::pattern::Matcher &m) { +bool MVNTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { std::shared_ptr operation = m.get_match_root(); if (!canBeTransformed(context, operation)) { return false; } - std::shared_ptr mvn = ov::as_type_ptr(operation); + std::shared_ptr mvn = ov::as_type_ptr(operation); if (!mvn) { mvn = ov::as_type_ptr(operation); } bool normalizeVariance; - if (ov::is_type(mvn)) { - normalizeVariance = ov::as_type_ptr(mvn)->get_normalize_variance(); + if (ov::is_type(mvn)) { + normalizeVariance = ov::as_type_ptr(mvn)->get_normalize_variance(); } else { normalizeVariance = ov::as_type_ptr(mvn)->get_normalize_variance(); } @@ -143,12 +143,12 @@ bool MVNTransformation::transform(TransformationContext &context, ngraph::patter auto newScalesConst = scalesConst; if (normalizeVariance) { switch (type) { - case ngraph::element::Type_t::f16: { - newScalesConst = mvn::createNewScalesConst::value_type>(*scalesConst); + case ov::element::Type_t::f16: { + newScalesConst = mvn::createNewScalesConst::value_type>(*scalesConst); break; } - case ngraph::element::Type_t::f32: { - newScalesConst = mvn::createNewScalesConst::value_type>(*scalesConst); + case ov::element::Type_t::f32: { + newScalesConst = mvn::createNewScalesConst::value_type>(*scalesConst); break; } default: { @@ -158,7 +158,7 @@ bool MVNTransformation::transform(TransformationContext &context, ngraph::patter } std::shared_ptr newMVN; - if (ov::is_type(mvn)) { + if (ov::is_type(mvn)) { newMVN = mvn->clone_with_new_inputs({dequantization.data}); } else { newMVN = mvn->clone_with_new_inputs({dequantization.data, mvn->input_value(1)}); diff --git a/src/common/low_precision_transformations/src/network_helper.cpp b/src/common/low_precision_transformations/src/network_helper.cpp index 05654ae8ae4..29d7c9670bb 100644 --- a/src/common/low_precision_transformations/src/network_helper.cpp +++ b/src/common/low_precision_transformations/src/network_helper.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include "low_precision/network_helper.hpp" #include #include @@ -16,7 +16,7 @@ #include #include -#include +#include "openvino/core/rt_info.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/layer_transformation.hpp" #include "low_precision/rt_info/precision_preserved_attribute.hpp" @@ -27,7 +27,7 @@ #include "openvino/opsets/opset6.hpp" #include "transformations/utils/utils.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -290,7 +290,7 @@ void NetworkHelper::copyInfo( const std::vector>& sources, const std::vector>& targets, bool overrideName) { - ngraph::copy_runtime_info(sources, targets); + ov::copy_runtime_info(sources, targets); for (const auto& target : targets) { const std::string friendlyName = sources[0]->get_friendly_name(); @@ -299,7 +299,7 @@ void NetworkHelper::copyInfo( } { - // TODO: has to be implemented in ngraph::copy_runtime_info + // TODO: has to be implemented in ov::copy_runtime_info for (auto& source : sources) { if (target->get_type_info() != source->get_type_info()) { @@ -512,7 +512,7 @@ std::shared_ptr NetworkHelper::fold_fake_quantize(const std::shared_ptr& node, const size_t branchIndex, - const std::vector& defaultPrecisions, + const std::vector& defaultPrecisions, const bool inPlace) { FakeQuantizeDequantization dequantization = NetworkHelper::getDequantization(node, defaultPrecisions, branchIndex, inPlace); if (dequantization.empty() || (dequantization.multiply == nullptr)) { @@ -584,8 +584,8 @@ FakeQuantizeDequantization NetworkHelper::foldDequantization(const std::shared_p return dequantization; } -std::shared_ptr NetworkHelper::separateInStandaloneBranch(std::shared_ptr node, - const std::vector& defaultPrecisions) { +std::shared_ptr NetworkHelper::separateInStandaloneBranch(std::shared_ptr node, + const std::vector& defaultPrecisions) { FakeQuantizeDequantization dequantization = NetworkHelper::getDequantization(node, defaultPrecisions); if (dequantization.isShared() && !dequantization.empty()) { Output parent = dequantization.data; @@ -654,8 +654,8 @@ std::shared_ptr NetworkHelper::fuseConvert(const std:: std::shared_ptr newFakeQuantize = std::make_shared>( - std::vector{ element::f32, element::f32, element::f32, element::f32, element::f32 }, - std::vector{}, + std::vector{ element::f32, element::f32, element::f32, element::f32, element::f32 }, + std::vector{}, ov::op::TemporaryReplaceOutputType(fakeQuantize->input_value(0), element::f32).get(), ov::op::TemporaryReplaceOutputType(fakeQuantize->input_value(1), element::f32).get(), ov::op::TemporaryReplaceOutputType(fakeQuantize->input_value(2), element::f32).get(), @@ -671,7 +671,7 @@ std::shared_ptr NetworkHelper::fuseConvert(const std:: return newFakeQuantize; } -bool NetworkHelper::isPrecisionPreserved(const std::shared_ptr& node) { +bool NetworkHelper::isPrecisionPreserved(const std::shared_ptr& node) { auto& rt = node->get_rt_info(); auto it = rt.find(PrecisionPreservedAttribute::get_type_info_static()); if (it == rt.end()) { @@ -753,7 +753,7 @@ std::shared_ptr NetworkHelper::foldFakeQuantize( } std::shared_ptr NetworkHelper::composeFakeQuantize(const std::shared_ptr& fakeQuantize, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { std::shared_ptr parent = fakeQuantize; auto targetInputs = parent->output(0).get_target_inputs(); if (targetInputs.size() != 1ul) { @@ -828,8 +828,8 @@ std::shared_ptr NetworkHelper::composeFakeQuantize(con if (dequantization.multiply != nullptr) { // multiply different precision constants (value1 & value2) and convert result to first argument precision (value1) auto multiply = [](const Output& value1, const Output& value2) { - const ngraph::element::Type precision1 = value1.get_element_type(); - const ngraph::element::Type precision2 = value2.get_element_type(); + const ov::element::Type precision1 = value1.get_element_type(); + const ov::element::Type precision2 = value2.get_element_type(); // 1) precision1 & precision2 are not equal but similar // 2) precision2 >= precision1 assert((precision2.is_real() == precision1.is_real()) && (precision2.bitwidth() >= precision1.bitwidth())); @@ -969,7 +969,7 @@ std::tuple, std::shared_ptr> NetworkHelper::decompos // Build a substitution sub-graph: - std::shared_ptr newFQ = fold_fake_quantize( + std::shared_ptr newFQ = fold_fake_quantize( std::make_shared>( fq->input_value(0), getSingleConsumerConstant(fq->input_value(1)), @@ -981,7 +981,7 @@ std::tuple, std::shared_ptr> NetworkHelper::decompos true); NetworkHelper::copyInfo(fq, newFQ); - std::shared_ptr convert2; + std::shared_ptr convert2; if (updatePrecision) { std::shared_ptr convert; std::shared_ptr newFqConstant = ov::as_type_ptr(newFQ); @@ -997,22 +997,22 @@ std::tuple, std::shared_ptr> NetworkHelper::decompos convert2 = std::make_shared(convert, element::f32); convert2->set_friendly_name(convert->get_friendly_name() + "/DequantizationConvert"); - ngraph::copy_runtime_info({ newFQ, convert2 }, convert2); + ov::copy_runtime_info({ newFQ, convert2 }, convert2); } else { if (newFQ->get_output_element_type(0) != element::f32) { convert2 = std::make_shared(newFQ, element::f32); convert2->set_friendly_name(newFQ->get_friendly_name() + "/DequantizationConvert"); - ngraph::copy_runtime_info({ newFQ, convert2 }, convert2); + ov::copy_runtime_info({ newFQ, convert2 }, convert2); } } // TODO: why type relaxed? - const std::shared_ptr sub = shift == nullptr ? + const std::shared_ptr sub = shift == nullptr ? nullptr : std::make_shared>(convert2 == nullptr ? newFQ : convert2, shift); if (sub != nullptr) { sub->set_friendly_name(newFQ->get_friendly_name() + "/DequantizationSubtract"); - ngraph::copy_runtime_info({ newFQ, sub }, sub); + ov::copy_runtime_info({ newFQ, sub }, sub); } const auto dequantize = @@ -1022,7 +1022,7 @@ std::tuple, std::shared_ptr> NetworkHelper::decompos ov::op::TemporaryReplaceOutputType(sub == nullptr ? (convert2 == nullptr ? newFQ : convert2) : sub, element::f32).get(), ov::op::TemporaryReplaceOutputType(scale, element::f32).get()); dequantize->set_friendly_name(newFQ->get_friendly_name() + "/DequantizationMultiply"); - ngraph::copy_runtime_info({ newFQ, dequantize }, dequantize); + ov::copy_runtime_info({ newFQ, dequantize }, dequantize); insertDequantizationAfter(fq, dequantize, newFQ); @@ -1061,11 +1061,11 @@ std::shared_ptr NetworkHelper::updateFakeQuantize( FakeQuantizeDequantization NetworkHelper::makeDequantization( const float dequantizationMul, const float dequantizationSub, - const ngraph::element::Type originalPrecision, - const ngraph::PartialShape& dataNodeOutputShape, + const ov::element::Type originalPrecision, + const ov::PartialShape& dataNodeOutputShape, element::Type precision, - const ngraph::element::Type deqPrecision, - std::shared_ptr input) { + const ov::element::Type deqPrecision, + std::shared_ptr input) { if (input == nullptr) { // TODO: we create input here! we really need it here? input = std::make_shared(precision, dataNodeOutputShape); @@ -1087,13 +1087,13 @@ FakeQuantizeDequantization NetworkHelper::makeDequantization( if (std::abs(dequantizationSub) > 1e-6) { subtract = std::make_shared>( parent, - std::make_shared(deqPrecision, ngraph::Shape({}), std::vector({ dequantizationSub }))); + std::make_shared(deqPrecision, ov::Shape({}), std::vector({ dequantizationSub }))); subtract->set_output_type(0, deqPrecision, subtract->get_output_partial_shape(0)); parent = subtract; } // mandatory - auto multiplyConstant = std::make_shared(deqPrecision, ngraph::Shape({}), std::vector({ dequantizationMul })); + auto multiplyConstant = std::make_shared(deqPrecision, ov::Shape({}), std::vector({ dequantizationMul })); auto multiply = std::make_shared>( ov::opset1::Multiply(parent, multiplyConstant), originalPrecision); @@ -1111,8 +1111,8 @@ std::shared_ptr NetworkHelper::makeDequantizationSubtract( : std::make_shared(parent, subtract_constant); } -bool NetworkHelper::areQuantizeAndDequantizeSupportedForSubtract(const std::shared_ptr& node, - const std::vector& defaultPrecisions) { +bool NetworkHelper::areQuantizeAndDequantizeSupportedForSubtract(const std::shared_ptr& node, + const std::vector& defaultPrecisions) { if (!ov::is_type(node)) { return false; } @@ -1126,14 +1126,14 @@ bool NetworkHelper::areQuantizeAndDequantizeSupportedForSubtract(const std::shar return areQuantizeAndDequantizeSupportedForMultiply(multiply, defaultPrecisions); } -bool NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(const std::shared_ptr& node, - const std::vector& defaultPrecisions) { +bool NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(const std::shared_ptr& node, + const std::vector& defaultPrecisions) { if (!ov::is_type(node)) { return false; } - const std::shared_ptr multiply = const_cast(node.get())->shared_from_this(); - const auto dequantization = ngraph::pass::low_precision::NetworkHelper::getDequantization(multiply, defaultPrecisions, 0, true); + const std::shared_ptr multiply = const_cast(node.get())->shared_from_this(); + const auto dequantization = ov::pass::low_precision::NetworkHelper::getDequantization(multiply, defaultPrecisions, 0, true); if (dequantization.empty()) { return false; } @@ -1158,10 +1158,10 @@ bool NetworkHelper::isQuantizeSupported(const std::shared_ptr& node, - const std::vector defaultPrecisions, + const std::vector defaultPrecisions, const size_t parentIndex, const bool inPlace) { - auto getDataIndex = [](const std::shared_ptr& node) { + auto getDataIndex = [](const std::shared_ptr& node) { if (ov::is_type(node->get_input_node_ptr(1))) { return 0ul; } @@ -1450,11 +1450,11 @@ std::shared_ptr NetworkHelper::optimizeSubtract(std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { assert( (NetworkHelper::getDequantization(operation, defaultPrecisions).subtractConstant == nullptr) || (NetworkHelper::getDequantization(operation, defaultPrecisions).subtractConstant.get() == dequantization.subtractConstant.get())); @@ -1476,7 +1476,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationAfter const auto newOperation = operation->clone_with_new_inputs(inputs); newOperation->set_friendly_name(operation->get_friendly_name()); - ngraph::copy_runtime_info(operation, newOperation); + ov::copy_runtime_info(operation, newOperation); if (const auto op = std::dynamic_pointer_cast(newOperation)) { op->set_overridden_output_type(updatePrecision ? @@ -1492,7 +1492,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationAfter if (shouldConvert) { const auto convertOutputPrecision = dequantization.convert ? dequantization.convert->get_element_type() : deqPrecision; parent = std::make_shared(parent, convertOutputPrecision); - ngraph::copy_runtime_info({ newOperation, parent }, parent); + ov::copy_runtime_info({ newOperation, parent }, parent); } if (moveSubtract && (dequantization.subtract != nullptr)) { @@ -1509,13 +1509,13 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationAfter element::TypeVector{ element::f32, element::f32 }, element::TypeVector{ element::f32 }, ov::op::TemporaryReplaceOutputType(parent, element::f32).get(), ov::op::TemporaryReplaceOutputType(foldConvert(dequantization.subtractConstant, parentPrecision), element::f32).get()); - ngraph::copy_runtime_info({ newOperation, parent }, parent); + ov::copy_runtime_info({ newOperation, parent }, parent); } else { // Subtract constant could be changed (including a shape) before propagation in some cases // so it's necessary to compute the shape for a subtractConvert before creating a new subtract dequantization.subtractConvert->validate_and_infer_types(); parent = std::make_shared(parent, dequantization.subtractConvert); - ngraph::copy_runtime_info({ newOperation, parent }, parent); + ov::copy_runtime_info({ newOperation, parent }, parent); } } @@ -1531,7 +1531,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationAfter parent = std::make_shared>( ov::opset1::Multiply(parent, foldConvert(dequantization.multiplyConstant, parentPrecision)), dequantization.multiply->get_output_element_type(0)); - ngraph::copy_runtime_info({ newOperation, parent }, parent); + ov::copy_runtime_info({ newOperation, parent }, parent); } insertDequantizationAfter(operation, parent, newOperation); @@ -1545,7 +1545,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationAfter } NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationBefore( - const std::shared_ptr& operation, + const std::shared_ptr& operation, const FakeQuantizeDequantization& dequantization, const bool updatePrecision, const bool moveSubtract) { @@ -1570,7 +1570,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationBefor multiplyConstants = {{ dequantization.multiplyConstant }}; subtractConstants = {{ dequantization.subtractConstant }}; } - std::vector> newNodes; + std::vector> newNodes; for (size_t i = 0; i < operation->get_input_size(); ++i) { auto parent = operation->get_input_node_shared_ptr(i); const element::Type deqPrecision = dequantization.multiplyConstant->get_element_type(); @@ -1585,7 +1585,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationBefor } parent->set_friendly_name(dequantization.convert->get_friendly_name() + "_" + std::to_string(i + 1)); - ngraph::copy_runtime_info(dequantization.convert, parent); + ov::copy_runtime_info(dequantization.convert, parent); } if (moveSubtract && (dequantization.subtract != nullptr)) { if (dequantization.subtractConvert == nullptr) { @@ -1611,7 +1611,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationBefor dequantization.subtractConvert->validate_and_infer_types(); parent = std::make_shared(parent, dequantization.subtractConvert); } - ngraph::copy_runtime_info(dequantization.subtract, parent); + ov::copy_runtime_info(dequantization.subtract, parent); } if (dequantization.multiply != nullptr) { @@ -1629,7 +1629,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationBefor multiplyConstant : foldConvert(multiplyConstant->output(0), parentPrecision)), dequantization.multiply->get_output_element_type(0)); - ngraph::copy_runtime_info(dequantization.multiply, parent); + ov::copy_runtime_info(dequantization.multiply, parent); parent->set_friendly_name(dequantization.multiply->get_friendly_name() + "_" + std::to_string(i + 1)); } if ((!moveSubtract) && (dequantization.convert != nullptr) && (dequantization.subtract != nullptr)) { @@ -1638,7 +1638,7 @@ NetworkHelper::InsertDequantizationResult NetworkHelper::moveDequantizationBefor } newNodes.push_back(parent); } - auto newOperation = operation->clone_with_new_inputs(ngraph::OutputVector(newNodes.begin(), newNodes.end())); + auto newOperation = operation->clone_with_new_inputs(ov::OutputVector(newNodes.begin(), newNodes.end())); NetworkHelper::copyInfo(operation, newOperation); if (dequantization.multiply == nullptr) { THROW_TRANSFORMATION_EXCEPTION << "dequantization operations must end with multiply"; @@ -1709,7 +1709,7 @@ bool NetworkHelper::checkConstantValuePrecision(const element::Type expectedPrec return convertCanBeRemoved; } -size_t NetworkHelper::getChildInputIndex(const std::shared_ptr& parent, const std::shared_ptr& child) { +size_t NetworkHelper::getChildInputIndex(const std::shared_ptr& parent, const std::shared_ptr& child) { for (size_t i = 0; i < child->get_input_size(); ++i) { if (parent.get() == child->get_input_node_ptr(i)) { return i; @@ -1719,7 +1719,7 @@ size_t NetworkHelper::getChildInputIndex(const std::shared_ptr& pa parent->get_friendly_name() << " and " << child->get_friendly_name() << " was not found"; } -size_t NetworkHelper::getParentOutputIndex(const std::shared_ptr& parent, const std::shared_ptr& child) { +size_t NetworkHelper::getParentOutputIndex(const std::shared_ptr& parent, const std::shared_ptr& child) { for (size_t i = 0; i < parent->get_output_size(); ++i) { const auto& targetInputs = parent->output(i).get_target_inputs(); for (const auto& targetInput : targetInputs) { @@ -1858,7 +1858,7 @@ void NetworkHelper::insertDequantizationAfter( ov::Output NetworkHelper::getSingleConsumerConstant(const ov::Output& output) { const auto node = output.get_node(); - if (!ngraph::is_type(node)) + if (!ov::is_type(node)) THROW_IE_LPT_EXCEPTION(*node) << "getSingleConsumerConstant Expected Constant node type"; return output.get_target_inputs().size() == 1 ? output @@ -1874,4 +1874,4 @@ bool NetworkHelper::checkConstantNotInf(const std::shared_ptr constant_nod } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/normalize_l2.cpp b/src/common/low_precision_transformations/src/normalize_l2.cpp index 92385983ae0..15fb5f7f64e 100644 --- a/src/common/low_precision_transformations/src/normalize_l2.cpp +++ b/src/common/low_precision_transformations/src/normalize_l2.cpp @@ -9,16 +9,16 @@ #include #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" -#include "ngraph/type/element_type.hpp" -#include "ngraph/type/element_type_traits.hpp" +#include "openvino/core/type/element_type.hpp" +#include "openvino/core/type/element_type_traits.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -using namespace ngraph; -using namespace ngraph::pass; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass; +using namespace ov::pass::low_precision; namespace normalize_l2 { @@ -31,7 +31,7 @@ std::shared_ptr createNewScalesConst(const ov::opset1::Con newData[i] = source[i] < 0 ? T{-1} : T{1}; } - const ngraph::element::Type type = originalConst.get_output_element_type(0); + const ov::element::Type type = originalConst.get_output_element_type(0); return ov::opset1::Constant::create(type, originalConst.get_shape(), newData); } @@ -49,7 +49,7 @@ NormalizeL2Transformation::NormalizeL2Transformation(const Params& params) : Lay return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -96,7 +96,7 @@ bool NormalizeL2Transformation::canBeTransformed(const TransformationContext& co return true; } -bool NormalizeL2Transformation::transform(TransformationContext &context, ngraph::pattern::Matcher &m) { +bool NormalizeL2Transformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { std::shared_ptr operation = m.get_match_root(); if (!canBeTransformed(context, operation)) { return false; @@ -114,12 +114,12 @@ bool NormalizeL2Transformation::transform(TransformationContext &context, ngraph std::shared_ptr newScalesConst; const auto type = scalesConst->get_output_element_type(0); switch (type) { - case ngraph::element::Type_t::f16: { - newScalesConst = normalize_l2::createNewScalesConst::value_type>(*scalesConst); + case ov::element::Type_t::f16: { + newScalesConst = normalize_l2::createNewScalesConst::value_type>(*scalesConst); break; } - case ngraph::element::Type_t::f32: { - newScalesConst = normalize_l2::createNewScalesConst::value_type>(*scalesConst); + case ov::element::Type_t::f32: { + newScalesConst = normalize_l2::createNewScalesConst::value_type>(*scalesConst); break; } default: { @@ -128,8 +128,8 @@ bool NormalizeL2Transformation::transform(TransformationContext &context, ngraph } auto newNormalize = std::make_shared>( - std::vector{ element::f32, axes->output(0).get_element_type() }, - std::vector{deqPrecision}, + std::vector{ element::f32, axes->output(0).get_element_type() }, + std::vector{deqPrecision}, ov::op::TemporaryReplaceOutputType(dequantization.subtract == nullptr ? dequantization.data : dequantization.subtract, element::f32).get(), axes, normalize->get_eps(), @@ -137,8 +137,8 @@ bool NormalizeL2Transformation::transform(TransformationContext &context, ngraph NetworkHelper::copyInfo(normalize, newNormalize); auto newMultiply = std::make_shared>( - std::vector{ element::f32, element::f32 }, - std::vector{normalize->get_output_element_type(0)}, + std::vector{ element::f32, element::f32 }, + std::vector{normalize->get_output_element_type(0)}, ov::op::TemporaryReplaceOutputType(newNormalize, element::f32).get(), ov::op::TemporaryReplaceOutputType(newScalesConst, element::f32).get()); diff --git a/src/common/low_precision_transformations/src/pad.cpp b/src/common/low_precision_transformations/src/pad.cpp index 3b69a623827..1f69fe6595c 100644 --- a/src/common/low_precision_transformations/src/pad.cpp +++ b/src/common/low_precision_transformations/src/pad.cpp @@ -5,15 +5,15 @@ #include "low_precision/pad.hpp" #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" -#include +#include "openvino/op/util/pad_base.hpp" #include "openvino/opsets/opset12.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -25,7 +25,7 @@ PadTransformation::PadTransformation(const Params& params) : LayerTransformation auto padsValue = pattern::wrap_type(); auto matcher = pattern::wrap_type({ mul, padsBegin, padsEnd, padsValue }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -33,11 +33,11 @@ PadTransformation::PadTransformation(const Params& params) : LayerTransformation return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool PadTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool PadTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -295,4 +295,4 @@ bool PadTransformation::isPrecisionPreserved(std::shared_ptr layer) const } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/prelu.cpp b/src/common/low_precision_transformations/src/prelu.cpp index ba1d94f53df..7dcdfdca5ec 100644 --- a/src/common/low_precision_transformations/src/prelu.cpp +++ b/src/common/low_precision_transformations/src/prelu.cpp @@ -8,13 +8,13 @@ #include #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -22,7 +22,7 @@ PReluTransformation::PReluTransformation(const Params& params) : LayerTransforma MATCHER_SCOPE(PReluTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -30,11 +30,11 @@ PReluTransformation::PReluTransformation(const Params& params) : LayerTransforma return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool PReluTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool PReluTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr prelu = m.get_match_root(); if (!canBeTransformed(context, prelu)) { return false; @@ -70,4 +70,4 @@ bool PReluTransformation::canBeTransformed(const TransformationContext& context, } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/propagate_precisions.cpp b/src/common/low_precision_transformations/src/propagate_precisions.cpp index b02292129ca..abc4079100f 100644 --- a/src/common/low_precision_transformations/src/propagate_precisions.cpp +++ b/src/common/low_precision_transformations/src/propagate_precisions.cpp @@ -6,20 +6,20 @@ #include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "low_precision/create_attribute.hpp" #include "low_precision/rt_info/precisions_attribute.hpp" #include "low_precision/propagate_through_precision_preserved.hpp" #include "low_precision/propagate_to_input.hpp" #include "itt.hpp" #include "openvino/pass/manager.hpp" -using namespace ngraph; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass::low_precision; -ngraph::pass::low_precision::PropagatePrecisions::PropagatePrecisions(const AttributeParameters& params) : params(params) {} +ov::pass::low_precision::PropagatePrecisions::PropagatePrecisions(const AttributeParameters& params) : params(params) {} -bool ngraph::pass::low_precision::PropagatePrecisions::run_on_model(const std::shared_ptr& f) { +bool ov::pass::low_precision::PropagatePrecisions::run_on_model(const std::shared_ptr& f) { RUN_ON_FUNCTION_SCOPE(PropagatePrecisions); ov::pass::Manager manager; manager.set_per_pass_validation(false); diff --git a/src/common/low_precision_transformations/src/pull_reshape_through_dequantization.cpp b/src/common/low_precision_transformations/src/pull_reshape_through_dequantization.cpp index 941eb8415cc..636b745f97c 100644 --- a/src/common/low_precision_transformations/src/pull_reshape_through_dequantization.cpp +++ b/src/common/low_precision_transformations/src/pull_reshape_through_dequantization.cpp @@ -8,20 +8,20 @@ #include #include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -using namespace ngraph; +using namespace ov; namespace pull_reshape_through_dequantization { namespace { std::shared_ptr moveThroughElementwise(const std::shared_ptr& reshape, const std::shared_ptr& elementwise) { const auto reshapeValues = ov::as_type_ptr(reshape->get_input_node_shared_ptr(1)); - NGRAPH_CHECK(reshapeValues != nullptr, "Reshape constant was not found"); + OPENVINO_ASSERT(reshapeValues != nullptr, "Reshape constant was not found"); auto elementwiseValuesConvert = ov::as_type_ptr(elementwise->get_input_node_shared_ptr(1)); auto elementwiseValues = elementwiseValuesConvert == nullptr ? @@ -51,7 +51,7 @@ std::shared_ptr moveThroughElementwise(const std::shared_ptr& reshap } // If shape calculation is needed, fold_reshape is used for result constant shape computation - const auto newReshapeValuesVector = ngraph::pass::low_precision::NetworkHelper::updateReshapeValues( + const auto newReshapeValuesVector = ov::pass::low_precision::NetworkHelper::updateReshapeValues( elementwiseValuesShape, elementwise->get_output_shape(0), targetShape); @@ -66,7 +66,7 @@ std::shared_ptr moveThroughElementwise(const std::shared_ptr& reshap Shape{ newReshapeValuesVector.size() }, newReshapeValuesVector); - const auto newElementwiseValues = ngraph::pass::low_precision::fold_reshape( + const auto newElementwiseValues = ov::pass::low_precision::fold_reshape( elementwiseValues, newReshapeValues, ov::as_type_ptr(reshape)->get_special_zero()); @@ -100,7 +100,7 @@ std::shared_ptr moveThroughConvert(const std::shared_ptr& reshape, c } void fuseConstant(const std::shared_ptr& reshape, const std::shared_ptr& constant) { - ngraph::OutputVector result(1); + ov::OutputVector result(1); reshape->constant_fold(result, { constant, reshape->input_value(1) }); const auto newConstant = result[0].get_node_shared_ptr(); replace_node(reshape, newConstant); @@ -110,27 +110,27 @@ void fuseConstant(const std::shared_ptr& reshape, const std::shared_ptr& inputPrecisions) { - const auto weights = ngraph::pattern::wrap_type(pattern::type_matches_any(inputPrecisions)); - const auto convert = ngraph::pattern::wrap_type({ weights }); +ov::pass::low_precision::PullReshapeThroughDequantization::PullReshapeThroughDequantization( + const std::vector& inputPrecisions) { + const auto weights = ov::pass::pattern::wrap_type(pattern::type_matches_any(inputPrecisions)); + const auto convert = ov::pass::pattern::wrap_type({ weights }); MATCHER_SCOPE(PullReshapeThroughDequantization); - const auto subtractValues = std::make_shared(OutputVector{ - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type({ngraph::pattern::wrap_type()}) + const auto subtractValues = std::make_shared(OutputVector{ + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type({ov::pass::pattern::wrap_type()}) }); - const auto subtract = ngraph::pattern::wrap_type({ convert, subtractValues }); + const auto subtract = ov::pass::pattern::wrap_type({ convert, subtractValues }); - const auto subtractOrConvert = std::make_shared(OutputVector{ convert, subtract }); + const auto subtractOrConvert = std::make_shared(OutputVector{ convert, subtract }); - const auto multiplyConstant = ngraph::pattern::wrap_type(); - const auto multiply = ngraph::pattern::wrap_type({ subtractOrConvert, multiplyConstant }); + const auto multiplyConstant = ov::pass::pattern::wrap_type(); + const auto multiply = ov::pass::pattern::wrap_type({ subtractOrConvert, multiplyConstant }); - const auto reshapeConstant = ngraph::pattern::wrap_type(); - auto reshapeWrapper = ngraph::pattern::wrap_type({ multiply, reshapeConstant }); + const auto reshapeConstant = ov::pass::pattern::wrap_type(); + auto reshapeWrapper = ov::pass::pattern::wrap_type({ multiply, reshapeConstant }); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher & m) -> bool { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher & m) -> bool { const auto& opsMap = m.get_pattern_value_map(); auto reshape = opsMap.at(reshapeWrapper).get_node_shared_ptr(); @@ -156,6 +156,6 @@ ngraph::pass::low_precision::PullReshapeThroughDequantization::PullReshapeThroug return true; }; - auto m = std::make_shared(reshapeWrapper, matcher_name); + auto m = std::make_shared(reshapeWrapper, matcher_name); this->register_matcher(m, callback); } diff --git a/src/common/low_precision_transformations/src/pull_transpose_through_dequantization.cpp b/src/common/low_precision_transformations/src/pull_transpose_through_dequantization.cpp index 6aca9adba7f..d890f05bc27 100644 --- a/src/common/low_precision_transformations/src/pull_transpose_through_dequantization.cpp +++ b/src/common/low_precision_transformations/src/pull_transpose_through_dequantization.cpp @@ -9,20 +9,20 @@ #include #include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -using namespace ngraph; +using namespace ov; namespace pull_transpose_through_dequantization { namespace { std::shared_ptr moveThroughElementwise(const std::shared_ptr& transpose, const std::shared_ptr& elementwise) { const auto transposeValues = transpose->get_input_node_shared_ptr(1); - NGRAPH_CHECK(transposeValues != nullptr, "transpose constant was not found"); + OPENVINO_ASSERT(transposeValues != nullptr, "transpose constant was not found"); auto elementwiseValuesConvert = ov::as_type_ptr(elementwise->get_input_node_shared_ptr(1ul)); auto elementwiseValues = elementwiseValuesConvert == nullptr ? @@ -37,7 +37,7 @@ std::shared_ptr moveThroughElementwise(const std::shared_ptr& transp return nullptr; } - elementwiseValues = ngraph::pass::low_precision::fold( + elementwiseValues = ov::pass::low_precision::fold( elementwiseValues, std::make_shared( element::i64, @@ -50,7 +50,7 @@ std::shared_ptr moveThroughElementwise(const std::shared_ptr& transp elementwise->get_input_node_shared_ptr(0ul), transposeValues })); - const auto newElementwiseValues = ngraph::pass::low_precision::fold( + const auto newElementwiseValues = ov::pass::low_precision::fold( elementwiseValues, transposeValues); assert(ov::is_type(newElementwiseValues)); @@ -77,7 +77,7 @@ std::shared_ptr moveThroughConvert(const std::shared_ptr& transpose, } void fuseConstant(const std::shared_ptr& transpose, const std::shared_ptr& constant) { - const auto newConstant = ngraph::pass::low_precision::fold( + const auto newConstant = ov::pass::low_precision::fold( constant, transpose->input_value(1)); @@ -88,27 +88,27 @@ void fuseConstant(const std::shared_ptr& transpose, const std::shared_ptr< } // namespace } // namespace pull_transpose_through_dequantization -ngraph::pass::low_precision::PullTransposeThroughDequantization::PullTransposeThroughDequantization( - const std::vector& inputPrecisions) { - const auto weights = ngraph::pattern::wrap_type(pattern::type_matches_any(inputPrecisions)); - const auto convert = ngraph::pattern::wrap_type({ weights }); +ov::pass::low_precision::PullTransposeThroughDequantization::PullTransposeThroughDequantization( + const std::vector& inputPrecisions) { + const auto weights = ov::pass::pattern::wrap_type(pattern::type_matches_any(inputPrecisions)); + const auto convert = ov::pass::pattern::wrap_type({ weights }); MATCHER_SCOPE(PullTransposeThroughDequantization); - const auto subtractValues = std::make_shared(OutputVector{ - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type({ngraph::pattern::wrap_type()}) + const auto subtractValues = std::make_shared(OutputVector{ + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type({ov::pass::pattern::wrap_type()}) }); - const auto subtract = ngraph::pattern::wrap_type({ convert, subtractValues }); + const auto subtract = ov::pass::pattern::wrap_type({ convert, subtractValues }); - const auto subtractOrConvert = std::make_shared(OutputVector{ convert, subtract }); + const auto subtractOrConvert = std::make_shared(OutputVector{ convert, subtract }); - const auto multiplyConstant = ngraph::pattern::wrap_type(); - const auto multiply = ngraph::pattern::wrap_type({ subtractOrConvert, multiplyConstant }); + const auto multiplyConstant = ov::pass::pattern::wrap_type(); + const auto multiply = ov::pass::pattern::wrap_type({ subtractOrConvert, multiplyConstant }); - const auto transposeConstant = ngraph::pattern::wrap_type(); - auto matcherTranspose = ngraph::pattern::wrap_type({ multiply, transposeConstant }); + const auto transposeConstant = ov::pass::pattern::wrap_type(); + auto matcherTranspose = ov::pass::pattern::wrap_type({ multiply, transposeConstant }); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher & m) -> bool { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher & m) -> bool { const auto& opsMap = m.get_pattern_value_map(); auto transpose = opsMap.find(matcherTranspose)->second.get_node()->shared_from_this(); @@ -129,6 +129,6 @@ ngraph::pass::low_precision::PullTransposeThroughDequantization::PullTransposeTh return true; }; - auto m = std::make_shared(matcherTranspose, matcher_name); + auto m = std::make_shared(matcherTranspose, matcher_name); this->register_matcher(m, callback); } diff --git a/src/common/low_precision_transformations/src/quantization_details.cpp b/src/common/low_precision_transformations/src/quantization_details.cpp index a4eda13eb95..8219690dbbd 100644 --- a/src/common/low_precision_transformations/src/quantization_details.cpp +++ b/src/common/low_precision_transformations/src/quantization_details.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include "low_precision/quantization_details.hpp" #include #include @@ -17,11 +17,11 @@ #include "low_precision/lpt_itt.hpp" -#include -#include -#include +#include "low_precision/common/ie_lpt_exception.hpp" +#include "low_precision/network_helper.hpp" +#include "low_precision/layer_transformation.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -171,7 +171,7 @@ bool QuantizationDetails::empty() const noexcept { } bool QuantizationDetails::isSupportedLevel(const size_t level) { - using ngraph::pass::low_precision::levels; + using ov::pass::low_precision::levels; static const std::unordered_set supported_levels = { levels::int4, levels::int4_narrow_range, levels::int8, levels::int8_narrow_range, @@ -183,4 +183,4 @@ bool QuantizationDetails::isSupportedLevel(const size_t level) { } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/recurrent_cell.cpp b/src/common/low_precision_transformations/src/recurrent_cell.cpp index 4a337f9097e..cb961a3de40 100644 --- a/src/common/low_precision_transformations/src/recurrent_cell.cpp +++ b/src/common/low_precision_transformations/src/recurrent_cell.cpp @@ -4,74 +4,74 @@ #include "low_precision/recurrent_cell.hpp" -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/opsets/opset1.hpp" #include -#include -#include -#include -#include +#include "openvino/core/node.hpp" +#include "openvino/opsets/opset1.hpp" +#include "openvino/opsets/opset5.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/rt_info/skip_cleanup_attribute.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { RecurrentCellTransformation::RecurrentCellTransformation(const Params& params) : LayerTransformation(params) { - const auto X = ngraph::pattern::any_input(); - const auto H = ngraph::pattern::any_input(); - const auto C = ngraph::pattern::any_input(); - const auto S = ngraph::pattern::any_input(); - const auto W = ngraph::pattern::wrap_type(); - const auto R = ngraph::pattern::wrap_type(); - const auto B = ngraph::pattern::wrap_type(); + const auto X = ov::pass::pattern::any_input(); + const auto H = ov::pass::pattern::any_input(); + const auto C = ov::pass::pattern::any_input(); + const auto S = ov::pass::pattern::any_input(); + const auto W = ov::pass::pattern::wrap_type(); + const auto R = ov::pass::pattern::wrap_type(); + const auto B = ov::pass::pattern::wrap_type(); - const auto H_as_const = ngraph::pattern::wrap_type(); + const auto H_as_const = ov::pass::pattern::wrap_type(); const auto fq_X = wrap_fake_quantize(X); const auto fq_H = wrap_fake_quantize(H); const auto fq_W = wrap_fake_quantize(W); const auto fq_R = wrap_fake_quantize(R); - const auto dequantization_X = wrap_dequantization(ngraph::pattern::any_input(), true); - const auto dequantization_H = wrap_dequantization(ngraph::pattern::any_input(), true); - const auto dequantization_W = wrap_dequantization(ngraph::pattern::any_input(), true); - const auto dequantization_R = wrap_dequantization(ngraph::pattern::any_input(), true); + const auto dequantization_X = wrap_dequantization(ov::pass::pattern::any_input(), true); + const auto dequantization_H = wrap_dequantization(ov::pass::pattern::any_input(), true); + const auto dequantization_W = wrap_dequantization(ov::pass::pattern::any_input(), true); + const auto dequantization_R = wrap_dequantization(ov::pass::pattern::any_input(), true); - const auto dequantization_without_subtract_X = wrap_dequantization(ngraph::pattern::any_input(), false); - const auto dequantization_without_subtract_H = wrap_dequantization(ngraph::pattern::any_input(), false); - const auto dequantization_without_subtract_W = wrap_dequantization(ngraph::pattern::any_input(), false); - const auto dequantization_without_subtract_R = wrap_dequantization(ngraph::pattern::any_input(), false); + const auto dequantization_without_subtract_X = wrap_dequantization(ov::pass::pattern::any_input(), false); + const auto dequantization_without_subtract_H = wrap_dequantization(ov::pass::pattern::any_input(), false); + const auto dequantization_without_subtract_W = wrap_dequantization(ov::pass::pattern::any_input(), false); + const auto dequantization_without_subtract_R = wrap_dequantization(ov::pass::pattern::any_input(), false); - auto X_in = std::make_shared( + auto X_in = std::make_shared( OutputVector{ fq_X, dequantization_X, dequantization_without_subtract_X }); - auto H_in = std::make_shared( + auto H_in = std::make_shared( OutputVector{ H_as_const, fq_H, dequantization_H, dequantization_without_subtract_H }); - auto W_in = std::make_shared( + auto W_in = std::make_shared( OutputVector{ fq_W, dequantization_W, dequantization_without_subtract_W }); - auto R_in = std::make_shared( + auto R_in = std::make_shared( OutputVector{ fq_R, dequantization_R, dequantization_without_subtract_R }); - const auto lstm_seq = ngraph::pattern::wrap_type( + const auto lstm_seq = ov::pass::pattern::wrap_type( {X_in, H_in, C, S, W_in, R_in, B}); - const auto gru_seq = ngraph::pattern::wrap_type( + const auto gru_seq = ov::pass::pattern::wrap_type( {X_in, H_in, S, W_in, R_in, B}); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -80,8 +80,8 @@ RecurrentCellTransformation::RecurrentCellTransformation(const Params& params) : return transform(*context, m); }; - auto m = std::make_shared( - std::make_shared( + auto m = std::make_shared( + std::make_shared( OutputVector { lstm_seq, gru_seq @@ -91,17 +91,17 @@ RecurrentCellTransformation::RecurrentCellTransformation(const Params& params) : this->register_matcher(m, callback); } -bool RecurrentCellTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool RecurrentCellTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { const auto lstm = m.get_match_root(); if (!canBeTransformed(context, lstm)) { return false; } for (size_t parentIndex = 0ul; parentIndex < lstm->get_input_size(); parentIndex++) { auto lstm_parent = lstm->get_input_node_shared_ptr(parentIndex); - if (is_type(lstm_parent)) { + if (is_type(lstm_parent)) { auto fq_parent = lstm_parent->get_input_node_shared_ptr(0); - if (is_type(fq_parent)) { - auto fq_node = as_type_ptr(lstm_parent); + if (is_type(fq_parent)) { + auto fq_node = as_type_ptr(lstm_parent); const QuantizationDetails quantizationDetails = QuantizationDetails::getDetails(fq_node); const auto precisionsAttribute = getAttributeFromOutput(lstm_parent); const auto precisions = precisionsAttribute.empty() @@ -118,15 +118,15 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ngra dataPrecision.max, dataPrecision.hasZeroPoint, updatePrecisions); - std::shared_ptr new_fq = std::get<0>(QDQ); - std::shared_ptr deq_multiply = std::get<1>(QDQ); + std::shared_ptr new_fq = std::get<0>(QDQ); + std::shared_ptr deq_multiply = std::get<1>(QDQ); if (deq_multiply == nullptr || new_fq == nullptr) { return false; } - std::shared_ptr convert; + std::shared_ptr convert; auto multiply_parent = deq_multiply->get_input_node_shared_ptr(0); - if (is_type(multiply_parent)) { + if (is_type(multiply_parent)) { convert = multiply_parent->get_input_node_shared_ptr(0); } else { convert = multiply_parent; @@ -140,7 +140,7 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ngra continue; } } else { - if (is_type(lstm_parent)) { + if (is_type(lstm_parent)) { auto multiply = lstm_parent->get_input_node_shared_ptr(0); ov::disable_constant_folding(multiply); propagateSkipCleanupAttribute(lstm_parent); @@ -175,7 +175,7 @@ void RecurrentCellTransformation::propagateSkipCleanupAttribute(std::shared_ptr< SkipCleanupAttribute::create(multiply); auto multiply_parent = multiply->get_input_node_shared_ptr(0); SkipCleanupAttribute::create(multiply_parent); - if (is_type(multiply_parent)) { + if (is_type(multiply_parent)) { auto subtract_parent = multiply_parent->get_input_node_shared_ptr(0); SkipCleanupAttribute::create(subtract_parent); } @@ -183,11 +183,11 @@ void RecurrentCellTransformation::propagateSkipCleanupAttribute(std::shared_ptr< std::shared_ptr RecurrentCellTransformation::wrap_fake_quantize( const std::shared_ptr parameter) { - const auto input_low = ngraph::pattern::wrap_type(); - const auto input_high = ngraph::pattern::wrap_type(); - const auto output_low = ngraph::pattern::wrap_type(); - const auto output_high = ngraph::pattern::wrap_type(); - return ngraph::pattern::wrap_type({ + const auto input_low = ov::pass::pattern::wrap_type(); + const auto input_high = ov::pass::pattern::wrap_type(); + const auto output_low = ov::pass::pattern::wrap_type(); + const auto output_high = ov::pass::pattern::wrap_type(); + return ov::pass::pattern::wrap_type({ parameter, input_low, input_high, @@ -198,7 +198,7 @@ std::shared_ptr RecurrentCellTransformation::wrap_fake_quantize( std::shared_ptr RecurrentCellTransformation::wrap_quantization( const std::shared_ptr parameter) { const auto quantization_fake_quantize = wrap_fake_quantize(parameter); - const auto quantization_convert = ngraph::pattern::wrap_type( + const auto quantization_convert = ov::pass::pattern::wrap_type( {quantization_fake_quantize}); return quantization_convert; } @@ -206,17 +206,17 @@ std::shared_ptr RecurrentCellTransformation::wrap_quantization( std::shared_ptr RecurrentCellTransformation::wrap_dequantization( const std::shared_ptr parameter, const bool with_subtract) { - const auto dequantization_convert = ngraph::pattern::wrap_type({parameter}); - const auto subtract_constant = ngraph::pattern::wrap_type(); - const auto dequantization_subtract = ngraph::pattern::wrap_type( + const auto dequantization_convert = ov::pass::pattern::wrap_type({parameter}); + const auto subtract_constant = ov::pass::pattern::wrap_type(); + const auto dequantization_subtract = ov::pass::pattern::wrap_type( {dequantization_convert, subtract_constant}); - const auto multiply_constant = ngraph::pattern::wrap_type(); + const auto multiply_constant = ov::pass::pattern::wrap_type(); const auto multiply_parent = with_subtract ? dequantization_subtract : dequantization_convert; - const auto dequantization_multiply = ngraph::pattern::wrap_type( + const auto dequantization_multiply = ov::pass::pattern::wrap_type( {multiply_parent, multiply_constant}); return dequantization_multiply; } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/reduce_base_transformation.cpp b/src/common/low_precision_transformations/src/reduce_base_transformation.cpp index 30d4de83a01..834ac169a67 100644 --- a/src/common/low_precision_transformations/src/reduce_base_transformation.cpp +++ b/src/common/low_precision_transformations/src/reduce_base_transformation.cpp @@ -4,16 +4,17 @@ #include "low_precision/reduce_base_transformation.hpp" #include -#include -#include "low_precision/network_helper.hpp" -namespace ngraph { +#include "low_precision/network_helper.hpp" +#include "openvino/core/validation_util.hpp" + +namespace ov { namespace pass { namespace low_precision { ReduceBaseTransformation::ReduceBaseTransformation(const Params& params) : LayerTransformation(params) {} -bool ReduceBaseTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool ReduceBaseTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -49,7 +50,7 @@ bool ReduceBaseTransformation::canBeTransformed(const TransformationContext& con } OPENVINO_SUPPRESS_DEPRECATED_START - const std::vector axes = ngraph::normalize_axes(reduce->get_friendly_name(), constData, inputRank); + const std::vector axes = ov::normalize_axes(reduce->get_friendly_name(), constData, inputRank); OPENVINO_SUPPRESS_DEPRECATED_END const auto deqByReducedConst = [&](const std::shared_ptr& eltwise) { @@ -107,4 +108,4 @@ bool ReduceBaseTransformation::getUpdatePrecision(const std::shared_ptr& r } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/reduce_max.cpp b/src/common/low_precision_transformations/src/reduce_max.cpp index 8b49874e6f3..c0d29d189a2 100644 --- a/src/common/low_precision_transformations/src/reduce_max.cpp +++ b/src/common/low_precision_transformations/src/reduce_max.cpp @@ -4,13 +4,13 @@ #include "low_precision/reduce_max.hpp" #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -18,7 +18,7 @@ ReduceMaxTransformation::ReduceMaxTransformation(const Params& params) : ReduceB MATCHER_SCOPE(ReduceMaxTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -26,7 +26,7 @@ ReduceMaxTransformation::ReduceMaxTransformation(const Params& params) : ReduceB return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -58,4 +58,4 @@ bool ReduceMaxTransformation::getUpdatePrecision(const std::shared_ptr& re } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/reduce_mean.cpp b/src/common/low_precision_transformations/src/reduce_mean.cpp index 10226670be2..65e70e7d593 100644 --- a/src/common/low_precision_transformations/src/reduce_mean.cpp +++ b/src/common/low_precision_transformations/src/reduce_mean.cpp @@ -4,13 +4,13 @@ #include "low_precision/reduce_mean.hpp" #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -18,7 +18,7 @@ ReduceMeanTransformation::ReduceMeanTransformation(const Params& params) : Reduc MATCHER_SCOPE(ReduceMeanTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -26,7 +26,7 @@ ReduceMeanTransformation::ReduceMeanTransformation(const Params& params) : Reduc return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -44,4 +44,4 @@ bool ReduceMeanTransformation::getUpdatePrecision(const std::shared_ptr& r } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/reduce_min.cpp b/src/common/low_precision_transformations/src/reduce_min.cpp index 049c795769d..61ac93b1022 100644 --- a/src/common/low_precision_transformations/src/reduce_min.cpp +++ b/src/common/low_precision_transformations/src/reduce_min.cpp @@ -4,13 +4,12 @@ #include "low_precision/reduce_min.hpp" #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -18,7 +17,7 @@ ReduceMinTransformation::ReduceMinTransformation(const Params& params) : ReduceB MATCHER_SCOPE(ReduceMinTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -26,7 +25,7 @@ ReduceMinTransformation::ReduceMinTransformation(const Params& params) : ReduceB return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -58,4 +57,4 @@ bool ReduceMinTransformation::getUpdatePrecision(const std::shared_ptr& re } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/reduce_sum.cpp b/src/common/low_precision_transformations/src/reduce_sum.cpp index 925afac8cf9..7e5169a2f16 100644 --- a/src/common/low_precision_transformations/src/reduce_sum.cpp +++ b/src/common/low_precision_transformations/src/reduce_sum.cpp @@ -4,13 +4,13 @@ #include "low_precision/reduce_sum.hpp" #include -#include -#include + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -18,7 +18,7 @@ ReduceSumTransformation::ReduceSumTransformation(const Params& params) : ReduceB MATCHER_SCOPE(ReduceSumTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -26,7 +26,7 @@ ReduceSumTransformation::ReduceSumTransformation(const Params& params) : ReduceB return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } @@ -86,4 +86,4 @@ bool ReduceSumTransformation::getUpdatePrecision(const std::shared_ptr& re } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/relu.cpp b/src/common/low_precision_transformations/src/relu.cpp index 2ad7054ee44..4cc0f26ce0c 100644 --- a/src/common/low_precision_transformations/src/relu.cpp +++ b/src/common/low_precision_transformations/src/relu.cpp @@ -8,13 +8,13 @@ #include #include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -22,7 +22,7 @@ ReluTransformation::ReluTransformation(const Params& params) : LayerTransformati MATCHER_SCOPE(ReluTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -30,11 +30,11 @@ ReluTransformation::ReluTransformation(const Params& params) : LayerTransformati return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ReluTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool ReluTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr relu = m.get_match_root(); if (!canBeTransformed(context, relu)) { return false; @@ -70,4 +70,4 @@ bool ReluTransformation::canBeTransformed(const TransformationContext& context, } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/reshape.cpp b/src/common/low_precision_transformations/src/reshape.cpp index 89c3bf8af5b..487139077f5 100644 --- a/src/common/low_precision_transformations/src/reshape.cpp +++ b/src/common/low_precision_transformations/src/reshape.cpp @@ -11,14 +11,14 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -29,7 +29,7 @@ ReshapeTransformation::ReshapeTransformation(const Params& params) : LayerTransf auto mul_m = pattern::wrap_type({ input, mul_const_m }); auto reshape_pattern_const = pattern::wrap_type(); auto reshape_pattern_nonconst = ov::pass::pattern::any_input(); - auto reshape_pattern = std::make_shared(OutputVector{ reshape_pattern_const, reshape_pattern_nonconst }); + auto reshape_pattern = std::make_shared(OutputVector{ reshape_pattern_const, reshape_pattern_nonconst }); auto matcher = pattern::wrap_type({ mul_m, reshape_pattern }); ov::graph_rewrite_callback callback = [=](pattern::Matcher& m) { @@ -42,7 +42,7 @@ ReshapeTransformation::ReshapeTransformation(const Params& params) : LayerTransf const auto& pattern_map = m.get_pattern_value_map(); if (pattern_map.count(reshape_pattern_nonconst)) { const auto mul_const = as_type_ptr(pattern_map.at(mul_const_m).get_node_shared_ptr()); - if (!mul_const || ngraph::shape_size(mul_const->get_shape()) != 1) { + if (!mul_const || ov::shape_size(mul_const->get_shape()) != 1) { return false; } } @@ -50,13 +50,13 @@ ReshapeTransformation::ReshapeTransformation(const Params& params) : LayerTransf return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } namespace { -void reshapeDequantizationConstant(const std::shared_ptr& reshape, const std::vector& defaultPrecisions) { +void reshapeDequantizationConstant(const std::shared_ptr& reshape, const std::vector& defaultPrecisions) { // Reshape dequantization operation Constant. // 1. Calculate result dequantization Constant shape for broadcast based on original dequantization Constant shape and Reshape output. // For example: dequantization shape {1, 3, 1, 1}, output Reshape shape {1, 12, 3, 3}, result for broadcast: {1, 3, 4, 1}, @@ -145,7 +145,7 @@ void reshapeDequantizationConstant(const std::shared_ptr& r } // namespace -bool ReshapeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool ReshapeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr reshape = ov::as_type_ptr(m.get_match_root()); if (NetworkHelper::isConstantPath(reshape)) { return false; @@ -256,10 +256,10 @@ bool ReshapeTransformation::canBeTransformed(const TransformationContext& contex } bool ReshapeTransformation::canBeTransformed( - const ngraph::Shape& subtractShape, - const ngraph::Shape& multiplyShape, - const ngraph::PartialShape& inputShape, - const ngraph::PartialShape& outputShape) { + const ov::Shape& subtractShape, + const ov::Shape& multiplyShape, + const ov::PartialShape& inputShape, + const ov::PartialShape& outputShape) { const size_t inputRank = inputShape.rank().get_length(); const size_t outputRank = outputShape.rank().get_length(); @@ -283,4 +283,4 @@ bool ReshapeTransformation::canBeTransformed( } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/rt_info/avg_pool_precision_preserved_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/avg_pool_precision_preserved_attribute.cpp index d73a66e59cb..1646524d166 100644 --- a/src/common/low_precision_transformations/src/rt_info/avg_pool_precision_preserved_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/avg_pool_precision_preserved_attribute.cpp @@ -7,7 +7,7 @@ #include #include -using namespace ngraph; +using namespace ov; using namespace ov; diff --git a/src/common/low_precision_transformations/src/rt_info/bias_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/bias_attribute.cpp index 40d75e06f87..2fbc4e1f802 100644 --- a/src/common/low_precision_transformations/src/rt_info/bias_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/bias_attribute.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include "openvino/opsets/opset1.hpp" #include #include #include @@ -23,5 +23,5 @@ bool ov::marked_as_bias(const std::shared_ptr& node) { } bool ov::BiasAttribute::is_copyable(const std::shared_ptr& to) const { - return ov::is_type(to) && ngraph::pass::low_precision::NetworkHelper::getConstantInput(to) != nullptr; + return ov::is_type(to) && ov::pass::low_precision::NetworkHelper::getConstantInput(to) != nullptr; } diff --git a/src/common/low_precision_transformations/src/rt_info/intervals_alignment_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/intervals_alignment_attribute.cpp index 7eb09cfa2d5..afeaeda7774 100644 --- a/src/common/low_precision_transformations/src/rt_info/intervals_alignment_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/intervals_alignment_attribute.cpp @@ -11,9 +11,9 @@ #include "low_precision/lpt_itt.hpp" #include "low_precision/network_helper.hpp" -using namespace ngraph; using namespace ov; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass::low_precision; IntervalsAlignmentAttribute::IntervalsAlignmentAttribute( const IntervalsAlignmentSharedValue::Interval combinedInterval, @@ -32,7 +32,7 @@ IntervalsAlignmentAttribute::IntervalsAlignmentAttribute( } ov::Any IntervalsAlignmentAttribute::create( - const std::shared_ptr& node, + const std::shared_ptr& node, const AttributeParameters& params) { if (!ov::is_type(node)) { return nullptr; diff --git a/src/common/low_precision_transformations/src/rt_info/precision_preserved_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/precision_preserved_attribute.cpp index 8c634ae6e5f..42521527d90 100644 --- a/src/common/low_precision_transformations/src/rt_info/precision_preserved_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/precision_preserved_attribute.cpp @@ -7,7 +7,7 @@ #include #include -using namespace ngraph; +using namespace ov; using namespace ov; PrecisionPreservedAttribute::PrecisionPreservedAttribute(const bool value) : diff --git a/src/common/low_precision_transformations/src/rt_info/precisions_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/precisions_attribute.cpp index 17c286d824f..237e4e711bf 100644 --- a/src/common/low_precision_transformations/src/rt_info/precisions_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/precisions_attribute.cpp @@ -10,19 +10,19 @@ #include #include -#include +#include "openvino/opsets/opset1.hpp" #include "low_precision/network_helper.hpp" #include "low_precision/layer_transformation.hpp" -using namespace ngraph; +using namespace ov; using namespace ov; -PrecisionsAttribute::PrecisionsAttribute(const std::vector& precisions) : +PrecisionsAttribute::PrecisionsAttribute(const std::vector& precisions) : SharedAttribute(precisions) { } ov::Any PrecisionsAttribute::create( - const std::shared_ptr& node, + const std::shared_ptr& node, const AttributeParameters& params) { auto& rt = ov::is_type(node) ? node->output(0).get_rt_info() : node->get_rt_info(); return (rt[PrecisionsAttribute::get_type_info_static()] = PrecisionsAttribute(params.defaultPrecisions)); diff --git a/src/common/low_precision_transformations/src/rt_info/quantization_alignment_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/quantization_alignment_attribute.cpp index f4096da1b2c..daccb491e42 100644 --- a/src/common/low_precision_transformations/src/rt_info/quantization_alignment_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/quantization_alignment_attribute.cpp @@ -9,19 +9,19 @@ #include #include -#include +#include "openvino/opsets/opset1.hpp" #include "low_precision/network_helper.hpp" using namespace ov; -using namespace ngraph; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass::low_precision; QuantizationAlignmentAttribute::QuantizationAlignmentAttribute(const bool hasToBeAligned) : SharedAttribute(hasToBeAligned) { } ov::Any QuantizationAlignmentAttribute::create( - const std::shared_ptr& node, + const std::shared_ptr& node, const AttributeParameters& params) { if (!getAttribute(node).empty()) { return {}; diff --git a/src/common/low_precision_transformations/src/rt_info/quantization_granularity_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/quantization_granularity_attribute.cpp index 9fedf9e7c99..fda8b3e4431 100644 --- a/src/common/low_precision_transformations/src/rt_info/quantization_granularity_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/quantization_granularity_attribute.cpp @@ -4,7 +4,7 @@ #include "low_precision/rt_info/quantization_granularity_attribute.hpp" -using namespace ngraph; +using namespace ov; using namespace ov; bool QuantizationGranularityAttribute::is_skipped() const { diff --git a/src/common/low_precision_transformations/src/rt_info/quantization_mode_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/quantization_mode_attribute.cpp index 3fbdfee4400..b6980dd3226 100644 --- a/src/common/low_precision_transformations/src/rt_info/quantization_mode_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/quantization_mode_attribute.cpp @@ -6,7 +6,7 @@ #include #include -using namespace ngraph; +using namespace ov; using namespace ov; std::string QuantizationModeAttribute::to_string() const { diff --git a/src/common/low_precision_transformations/src/rt_info/skip_cleanup_attribute.cpp b/src/common/low_precision_transformations/src/rt_info/skip_cleanup_attribute.cpp index c5f2c05cbc5..1d7d4a1549a 100644 --- a/src/common/low_precision_transformations/src/rt_info/skip_cleanup_attribute.cpp +++ b/src/common/low_precision_transformations/src/rt_info/skip_cleanup_attribute.cpp @@ -10,11 +10,11 @@ #include #include -using namespace ngraph; +using namespace ov; using namespace ov; ov::Any SkipCleanupAttribute::create( - const std::shared_ptr& node) { + const std::shared_ptr& node) { auto& rt = node->get_rt_info(); return (rt[SkipCleanupAttribute::get_type_info_static()] = SkipCleanupAttribute()); } diff --git a/src/common/low_precision_transformations/src/shuffle_channels.cpp b/src/common/low_precision_transformations/src/shuffle_channels.cpp index 37c36284c4b..6439232908e 100644 --- a/src/common/low_precision_transformations/src/shuffle_channels.cpp +++ b/src/common/low_precision_transformations/src/shuffle_channels.cpp @@ -5,15 +5,15 @@ #include "low_precision/shuffle_channels.hpp" #include -#include -#include +#include "openvino/opsets/opset1.hpp" -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" +#include "openvino/core/validation_util.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +21,7 @@ ShuffleChannelsTransformation::ShuffleChannelsTransformation(const Params& param MATCHER_SCOPE(ShuffleChannelsTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -29,11 +29,11 @@ ShuffleChannelsTransformation::ShuffleChannelsTransformation(const Params& param return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ShuffleChannelsTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool ShuffleChannelsTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -49,7 +49,7 @@ bool ShuffleChannelsTransformation::transform(TransformationContext& context, ng return NetworkHelper::toScalar(normalizedConst); } else { OPENVINO_SUPPRESS_DEPRECATED_START - const size_t normalizedAxis = ngraph::normalize_axis( + const size_t normalizedAxis = ov::normalize_axis( shuffleChannels->get_friendly_name(), shuffleChannels->get_axis(), shuffleChannels->get_input_partial_shape(0).rank()); @@ -59,7 +59,7 @@ bool ShuffleChannelsTransformation::transform(TransformationContext& context, ng return normalizedConst; } else { const auto group = shuffleChannels->get_group(); - const auto shuffledConst = fold(normalizedConst, normalizedAxis, group); + const auto shuffledConst = fold(normalizedConst, normalizedAxis, group); return ov::as_type_ptr(shuffledConst); } } @@ -117,4 +117,4 @@ bool ShuffleChannelsTransformation::isPrecisionPreserved(std::shared_ptr l } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/split.cpp b/src/common/low_precision_transformations/src/split.cpp index 43228a02077..b9f733728b3 100644 --- a/src/common/low_precision_transformations/src/split.cpp +++ b/src/common/low_precision_transformations/src/split.cpp @@ -3,15 +3,15 @@ // #include "low_precision/split.hpp" -#include "ngraph/node.hpp" +#include "openvino/core/node.hpp" -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -#include "ngraph/validation_util.hpp" +#include "openvino/core/validation_util.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -27,11 +27,11 @@ SplitTransformation::SplitTransformation(const Params& params) : LayerTransforma return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool SplitTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher& m) { +bool SplitTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } @@ -48,7 +48,7 @@ bool SplitTransformation::transform(TransformationContext& context, ngraph::patt const int64_t axis = ov::as_type_ptr(split->get_input_node_shared_ptr(1))->cast_vector()[0]; OPENVINO_SUPPRESS_DEPRECATED_START - const size_t normalizedAxis = ngraph::normalize_axis(split->get_friendly_name(), axis, split->get_input_partial_shape(0).rank()); + const size_t normalizedAxis = ov::normalize_axis(split->get_friendly_name(), axis, split->get_input_partial_shape(0).rank()); OPENVINO_SUPPRESS_DEPRECATED_END const size_t outputSize = newSplit->get_output_size(); @@ -129,8 +129,8 @@ bool SplitTransformation::transform(TransformationContext& context, ngraph::patt void SplitTransformation::updateOutputs( TransformationContext& context, - std::vector> lastNodes, - std::shared_ptr originalNode) const { + std::vector> lastNodes, + std::shared_ptr originalNode) const { //TODO: LPT: during refactoring update is not tested if (lastNodes.size() == 1ul) { updateOutput(context, lastNodes[0], originalNode); @@ -161,4 +161,4 @@ bool SplitTransformation::canBeTransformed(const TransformationContext& context, } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/squeeze.cpp b/src/common/low_precision_transformations/src/squeeze.cpp index b4b9c426f8a..cdffa6e41f2 100644 --- a/src/common/low_precision_transformations/src/squeeze.cpp +++ b/src/common/low_precision_transformations/src/squeeze.cpp @@ -5,15 +5,15 @@ #include "low_precision/squeeze.hpp" #include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +21,7 @@ SqueezeTransformation::SqueezeTransformation(const Params& params) : LayerTransf MATCHER_SCOPE(SqueezeTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -29,18 +29,18 @@ SqueezeTransformation::SqueezeTransformation(const Params& params) : LayerTransf return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool SqueezeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool SqueezeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } - auto squeezeOnConstant = [](const std::shared_ptr& squeeze, - const std::shared_ptr& dequantizationOpConstant, - const ngraph::PartialShape& inputShape) { + auto squeezeOnConstant = [](const std::shared_ptr& squeeze, + const std::shared_ptr& dequantizationOpConstant, + const ov::PartialShape& inputShape) { const size_t inputRankValue = inputShape.rank().get_length(); const auto constantShape = dequantizationOpConstant->get_shape(); if (shape_size(constantShape) == 1ul) { @@ -80,4 +80,4 @@ bool SqueezeTransformation::canBeTransformed(const TransformationContext& contex } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/strided_slice.cpp b/src/common/low_precision_transformations/src/strided_slice.cpp index 3cf818f28a6..694e88276ed 100644 --- a/src/common/low_precision_transformations/src/strided_slice.cpp +++ b/src/common/low_precision_transformations/src/strided_slice.cpp @@ -5,13 +5,13 @@ #include "low_precision/strided_slice.hpp" #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" +#include "openvino/core/validation_util.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -101,7 +101,7 @@ std::shared_ptr stridedSliceDeqConstant( StridedSliceTransformation::StridedSliceTransformation(const Params& params) : LayerTransformation(params) { MATCHER_SCOPE(StridedSliceTransformation); - auto matcher = ngraph::pattern::wrap_type(); + auto matcher = ov::pass::pattern::wrap_type(); ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); @@ -169,4 +169,4 @@ bool StridedSliceTransformation::isPrecisionPreserved(std::shared_ptr laye } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/subtract.cpp b/src/common/low_precision_transformations/src/subtract.cpp index c368aa35eed..321eff36e5a 100644 --- a/src/common/low_precision_transformations/src/subtract.cpp +++ b/src/common/low_precision_transformations/src/subtract.cpp @@ -11,14 +11,14 @@ #include #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/pass/pattern/op/or.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -26,10 +26,10 @@ SubtractTransformation::SubtractTransformation(const Params& params) : LayerTran MATCHER_SCOPE(SubtractTransformation); auto convert = pattern::wrap_type(); auto multiply = pattern::wrap_type(); - auto subParent = std::make_shared(OutputVector{ convert, multiply }); + auto subParent = std::make_shared(OutputVector{ convert, multiply }); auto subtract = pattern::wrap_type({ subParent, pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -37,17 +37,17 @@ SubtractTransformation::SubtractTransformation(const Params& params) : LayerTran return transform(*context, m); }; - auto m = std::make_shared(subtract, matcher_name); + auto m = std::make_shared(subtract, matcher_name); this->register_matcher(m, callback); } -bool SubtractTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool SubtractTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr subtract = ov::as_type_ptr(m.get_match_root()); if (!canBeTransformed(context, subtract)) { return false; } - const ngraph::element::Type originalPrecision = subtract->get_output_element_type(0); + const ov::element::Type originalPrecision = subtract->get_output_element_type(0); const FakeQuantizeDequantization dequantization = NetworkHelper::getDequantization(subtract, defaultPrecisions); if (dequantization.multiply != nullptr) { @@ -56,7 +56,7 @@ bool SubtractTransformation::transform(TransformationContext& context, ngraph::p // SH' = SH / SC std::shared_ptr newSubtract = ov::as_type_ptr(subtract->clone_with_new_inputs({ dequantization.multiply->input_value(0), - ngraph::pass::low_precision::fold( + ov::pass::low_precision::fold( subtract->input_value(1), dequantization.multiply->input_value(1)) })); @@ -94,4 +94,4 @@ bool SubtractTransformation::transform(TransformationContext& context, ngraph::p } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/transformation_context.cpp b/src/common/low_precision_transformations/src/transformation_context.cpp index 3c3569b0168..cc031e4552c 100644 --- a/src/common/low_precision_transformations/src/transformation_context.cpp +++ b/src/common/low_precision_transformations/src/transformation_context.cpp @@ -4,15 +4,15 @@ #include "low_precision/transformation_context.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { -TransformationContext::TransformationContext() : function(nullptr) {} +TransformationContext::TransformationContext() : model(nullptr) {} -TransformationContext::TransformationContext(std::shared_ptr function) : function(function) { +TransformationContext::TransformationContext(std::shared_ptr model) : model(model) { } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/transparent_base_transformation.cpp b/src/common/low_precision_transformations/src/transparent_base_transformation.cpp index 9805d21b8fa..8630dfc9324 100644 --- a/src/common/low_precision_transformations/src/transparent_base_transformation.cpp +++ b/src/common/low_precision_transformations/src/transparent_base_transformation.cpp @@ -9,11 +9,11 @@ #include "low_precision/network_helper.hpp" -using namespace ngraph; -using namespace ngraph::pass; -using namespace ngraph::pass::low_precision; +using namespace ov; +using namespace ov::pass; +using namespace ov::pass::low_precision; -bool TransparentBaseTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool TransparentBaseTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr op = m.get_match_root(); if (!canBeTransformed(context, op)) { return false; diff --git a/src/common/low_precision_transformations/src/transpose.cpp b/src/common/low_precision_transformations/src/transpose.cpp index 39f4bf7abd9..e2c098103a5 100644 --- a/src/common/low_precision_transformations/src/transpose.cpp +++ b/src/common/low_precision_transformations/src/transpose.cpp @@ -5,15 +5,14 @@ #include "low_precision/transpose.hpp" #include -#include -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/common/ie_lpt_exception.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +20,7 @@ TransposeTransformation::TransposeTransformation(const Params& params) : LayerTr MATCHER_SCOPE(TransposeTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -29,13 +28,13 @@ TransposeTransformation::TransposeTransformation(const Params& params) : LayerTr return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } namespace { -void transposeDequantizationConstant(std::shared_ptr& transpose, const std::vector& defaultPrecisions) { +void transposeDequantizationConstant(std::shared_ptr& transpose, const std::vector& defaultPrecisions) { const FakeQuantizeDequantization dequantization = NetworkHelper::getDequantization(transpose, defaultPrecisions); const Shape subtractShape = dequantization.subtract == nullptr ? Shape{} : dequantization.subtractConstant->get_shape(); @@ -83,7 +82,7 @@ void transposeDequantizationConstant(std::shared_ptr& transpose, const std } // namespace -bool TransposeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool TransposeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { std::shared_ptr transpose = m.get_match_root(); if (!canBeTransformed(context, transpose)) { return false; @@ -160,4 +159,4 @@ bool TransposeTransformation::canBeTransformed(const TransformationContext& cont } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/unsqueeze.cpp b/src/common/low_precision_transformations/src/unsqueeze.cpp index 7802eae4fd3..76967e2cca4 100644 --- a/src/common/low_precision_transformations/src/unsqueeze.cpp +++ b/src/common/low_precision_transformations/src/unsqueeze.cpp @@ -5,15 +5,15 @@ #include "low_precision/unsqueeze.hpp" #include -#include -#include -#include +#include "openvino/opsets/opset1.hpp" + +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -21,7 +21,7 @@ UnsqueezeTransformation::UnsqueezeTransformation(const Params& params) : LayerTr MATCHER_SCOPE(UnsqueezeTransformation); auto matcher = pattern::wrap_type({ pattern::wrap_type(), pattern::wrap_type() }); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) { auto op = m.get_match_root(); if (transformation_callback(op)) { return false; @@ -29,18 +29,18 @@ UnsqueezeTransformation::UnsqueezeTransformation(const Params& params) : LayerTr return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool UnsqueezeTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) { +bool UnsqueezeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { if (!canBeTransformed(context, m.get_match_root())) { return false; } - auto unsqueezeOnConstant = [](const std::shared_ptr& unsqueeze, - const std::shared_ptr& dequantizationOpConstant, - const ngraph::PartialShape& inputShape) { + auto unsqueezeOnConstant = [](const std::shared_ptr& unsqueeze, + const std::shared_ptr& dequantizationOpConstant, + const ov::PartialShape& inputShape) { const size_t inputRankValue = inputShape.rank().get_length(); const auto constantShape = dequantizationOpConstant->get_shape(); if (shape_size(constantShape) == 1ul) { @@ -83,4 +83,4 @@ bool UnsqueezeTransformation::canBeTransformed(const TransformationContext& cont } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/variadic_split.cpp b/src/common/low_precision_transformations/src/variadic_split.cpp index a15e6a60929..31274392fce 100644 --- a/src/common/low_precision_transformations/src/variadic_split.cpp +++ b/src/common/low_precision_transformations/src/variadic_split.cpp @@ -3,14 +3,14 @@ // #include "low_precision/variadic_split.hpp" -#include "ngraph/node.hpp" +#include "openvino/core/node.hpp" -#include +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "low_precision/network_helper.hpp" #include "itt.hpp" -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -29,10 +29,10 @@ VariadicSplitTransformation::VariadicSplitTransformation(const Params& params) : return transform(*context, m); }; - auto m = std::make_shared(matcher, matcher_name); + auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/src/weightable_layer_transformation.cpp b/src/common/low_precision_transformations/src/weightable_layer_transformation.cpp index eb559d9d996..ac945339755 100644 --- a/src/common/low_precision_transformations/src/weightable_layer_transformation.cpp +++ b/src/common/low_precision_transformations/src/weightable_layer_transformation.cpp @@ -10,7 +10,7 @@ #include #include -namespace ngraph { +namespace ov { namespace pass { namespace low_precision { @@ -44,7 +44,7 @@ bool checkConstShape(const std::vector& idcesToCheck, const std::shared_ WeightableLayerTransformation::WeightableLayerTransformation(const Params& params) : LayerTransformation(params) {} bool WeightableLayerTransformation::canConvolutionBeTransformed(const TransformationContext& context, std::shared_ptr layer, - const std::vector& defaultPrecisions) const { + const std::vector& defaultPrecisions) const { if (!WeightableLayerTransformation::canBeTransformed(context, layer)) { return false; } @@ -254,7 +254,7 @@ bool WeightableLayerTransformation::canBeTransformed(const TransformationContext bool WeightableLayerTransformation::isQuantizedStatic(const std::shared_ptr& layer, const bool reshapeIsRequired, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { FakeQuantizeDequantization dequantizationOnWeights; if (reshapeIsRequired) { const auto reshape = layer->get_input_node_shared_ptr(1); @@ -273,7 +273,7 @@ bool WeightableLayerTransformation::isQuantizedStatic(const std::shared_ptr op = const_cast(layer.get())->shared_from_this(); + const std::shared_ptr op = const_cast(layer.get())->shared_from_this(); dequantizationOnWeights = NetworkHelper::getDequantization(op, defaultPrecisions, 1); } @@ -294,7 +294,7 @@ bool WeightableLayerTransformation::isQuantizedStatic(const std::shared_ptr(deqData)) { - const ngraph::element::Type weightsDataPrecision = dequantizationOnWeights.data.get_element_type(); + const ov::element::Type weightsDataPrecision = dequantizationOnWeights.data.get_element_type(); if (!DataPrecision::isSupported(weightsDataPrecision)) { return false; } @@ -401,7 +401,7 @@ std::shared_ptr WeightableLayerTransformation::getFake DataPrecision WeightableLayerTransformation::getDataPrecisionOnWeights( const std::shared_ptr& node, - const std::vector& defaultPrecisions) { + const std::vector& defaultPrecisions) { const auto fq = getFakeQuantizeOnWeights(node); const QuantizationDetails quantizationDetails = QuantizationDetails::getDetails(fq); if (quantizationDetails.empty()) { @@ -418,10 +418,10 @@ DataPrecision WeightableLayerTransformation::getDataPrecisionOnWeights( bool WeightableLayerTransformation::isAsymmetricOnWeights( const std::shared_ptr& node, - const std::vector& defaultPrecisions) { - const auto n = const_cast(node.get())->shared_from_this(); + const std::vector& defaultPrecisions) { + const auto n = const_cast(node.get())->shared_from_this(); - const auto reshapeFromWeights = ngraph::as_type_ptr(n->get_input_node_shared_ptr(1)); + const auto reshapeFromWeights = ov::as_type_ptr(n->get_input_node_shared_ptr(1)); const auto dequantization = reshapeFromWeights == nullptr ? NetworkHelper::getDequantization(n, defaultPrecisions, 1ul) : NetworkHelper::getDequantization(reshapeFromWeights, defaultPrecisions); @@ -446,4 +446,4 @@ bool WeightableLayerTransformation::isAsymmetricOnWeights( } // namespace low_precision } // namespace pass -} // namespace ngraph +} // namespace ov diff --git a/src/common/low_precision_transformations/tests/add_transformation.cpp b/src/common/low_precision_transformations/tests/add_transformation.cpp index 6efb1611b7f..c6b7272103e 100644 --- a/src/common/low_precision_transformations/tests/add_transformation.cpp +++ b/src/common/low_precision_transformations/tests/add_transformation.cpp @@ -4,12 +4,12 @@ #include -#include +#include "low_precision/add.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include #include "common_test_utils/ov_test_utils.hpp" @@ -73,7 +73,7 @@ public: }; typedef std::tuple, // PShapes for each input + std::pair, // PShapes for each input AddTransformationTestValues> AddTransformationParams; @@ -99,7 +99,7 @@ public: testValues.postops_configuration); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); auto inputShape1Ref = inputShapes.first; @@ -153,7 +153,7 @@ TEST_P(AddTransformation, CompareFunctions) { const std::vector netPrecision = {element::f32, element::f16}; namespace testValues1 { -const std::vector> inputShapes4D = { +const std::vector> inputShapes4D = { {{1, 4, 16, 16}, {1, 4, 16, 16}}, {{Dimension::dynamic(), 4, Dimension::dynamic(), Dimension::dynamic()}, {Dimension::dynamic(), 4, Dimension::dynamic(), Dimension::dynamic()}}, @@ -503,7 +503,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector> inputShapes4D = { +const std::vector> inputShapes4D = { {{1, 4, 16, 16}, {1, 4, 16, 16}}, {{1, 4, 16, 16}, {Dimension::dynamic(), 4, Dimension::dynamic(), Dimension::dynamic()}}, }; @@ -562,7 +562,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues2 namespace testValues3 { -const std::vector> inputShapes4D = { +const std::vector> inputShapes4D = { {{1, 4, 16, 16}, {1, 4, 16, 16}}, {{Dimension::dynamic(), 4, Dimension::dynamic(), Dimension::dynamic()}, {1, 4, 16, 16}}, }; @@ -622,7 +622,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues3 namespace spatialDimensions { -const std::vector> inputShapes4D = { +const std::vector> inputShapes4D = { {{1, 2, 2, 2}, {1, 2, 2, 2}}, }; @@ -676,7 +676,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace spatialDimensions namespace tensor2D { -const std::vector> inputShapes = { +const std::vector> inputShapes = { {{4, 1}, {4, 1}}, }; @@ -709,7 +709,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, namespace oneBranchQuantizationFp16 { const std::vector netPrecision = {element::f16}; -const std::vector> inputShapesWithDynamicChannels = { +const std::vector> inputShapesWithDynamicChannels = { {{1, 4, 16, 16}, {1, 4, 16, 16}}, {{1, 4, 16, 16}, {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}}, {{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, @@ -766,7 +766,7 @@ const std::vector netPrecision = { element::f32, }; -const std::vector> inputShapesWithDynamicChannels = { +const std::vector> inputShapesWithDynamicChannels = { {{1, 4, 16, 16}, {1, 4, 16, 16}}, {{1, 4, 16, 16}, {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}}, {{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, @@ -816,7 +816,7 @@ const std::vector netPrecision = { element::f32, }; -const std::vector> inputShapesWithDynamicChannels = { +const std::vector> inputShapesWithDynamicChannels = { {{1, 4, 16, 16}, {1, 4, 16, 16}}, {{1, 4, 16, 16}, {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}}, {{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, diff --git a/src/common/low_precision_transformations/tests/align_concat_quantization_parameters_transformation.cpp b/src/common/low_precision_transformations/tests/align_concat_quantization_parameters_transformation.cpp index 1ef9e711262..9e2c283340f 100644 --- a/src/common/low_precision_transformations/tests/align_concat_quantization_parameters_transformation.cpp +++ b/src/common/low_precision_transformations/tests/align_concat_quantization_parameters_transformation.cpp @@ -4,14 +4,14 @@ #include -#include -#include -#include -#include -#include +#include "low_precision/avg_pool.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -71,22 +71,22 @@ public: additionalLayer, testValues.actual.dequantization); - auto supportedPrecisions = std::vector( - {ngraph::pass::low_precision::PrecisionsRestriction::create( + auto supportedPrecisions = std::vector( + {ov::pass::low_precision::PrecisionsRestriction::create( {{{0}, {ov::element::u8}}, {{1}, {ov::element::i8}}})}); - auto perTensorQuantization = std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create({0}), + auto perTensorQuantization = std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create({0}), }); SimpleLowPrecisionTransformer transform(supportedPrecisions, perTensorQuantization); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add( + transform.add(testValues.params); + transform.add(testValues.params); + transform.add( testValues.params); - transform.add( + transform.add( testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::AlignConcatQuantizationParametersFunction::getReference( diff --git a/src/common/low_precision_transformations/tests/assign_and_read_value_transformation.cpp b/src/common/low_precision_transformations/tests/assign_and_read_value_transformation.cpp index ec5a2006b7f..e504d37de39 100644 --- a/src/common/low_precision_transformations/tests/assign_and_read_value_transformation.cpp +++ b/src/common/low_precision_transformations/tests/assign_and_read_value_transformation.cpp @@ -8,8 +8,8 @@ #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "low_precision/assign_and_read_value.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -45,7 +45,7 @@ public: }; typedef std::tuple < - ngraph::PartialShape, // input shape + ov::PartialShape, // input shape element::Type, // input precision element::Type, // precision before dequantization size_t, // opset version @@ -55,12 +55,12 @@ typedef std::tuple < class AssignTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const element::Type precision = std::get<1>(GetParam()); const element::Type precisionBeforeDequantization = std::get<2>(GetParam()); const size_t opsetVersion = std::get<3>(GetParam()); const AssignTransformationTestValues testValues = std::get<4>(GetParam()); - const std::vector defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_int16_int32_support; + const std::vector defaultPrecisions = ov::pass::low_precision::precision_set::int8_int16_int32_support; const auto params = TestTransformationParams(testValues.params) .setDefaultPrecisions(defaultPrecisions); @@ -74,7 +74,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer({}, {}, { ov::element::f32, defaultPrecisions }); - transformer.add(actualFunction, params); + transformer.add(actualFunction, params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::AssignAndReadValueFunction::getReference( @@ -89,7 +89,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const element::Type precision = std::get<1>(obj.param); const element::Type precisionBeforeDequantization = std::get<2>(obj.param); const size_t opsetVersion = std::get<3>(obj.param); @@ -115,8 +115,8 @@ TEST_P(AssignTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { - ngraph::PartialShape({ 1, 3, 224, 224 }), +const std::vector inputShapes = { + ov::PartialShape({ 1, 3, 224, 224 }), }; const element::TypeVector precisions = { diff --git a/src/common/low_precision_transformations/tests/avg_pool_transformation.cpp b/src/common/low_precision_transformations/tests/avg_pool_transformation.cpp index 50a3ba15c24..9c9aad5f7bd 100644 --- a/src/common/low_precision_transformations/tests/avg_pool_transformation.cpp +++ b/src/common/low_precision_transformations/tests/avg_pool_transformation.cpp @@ -4,12 +4,12 @@ #include -#include -#include +#include "low_precision/avg_pool.hpp" +#include "low_precision/max_pool.hpp" #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -43,7 +43,7 @@ public: }; typedef std::tuple @@ -54,7 +54,7 @@ class AvgPoolTransformation : public LayerTransformation, public: void SetUp() override { ov::element::Type precision; - ngraph::PartialShape shape; + ov::PartialShape shape; bool addFakeQuantize; std::string additionalLayer; AvgPoolTransformationTestValues testValues; @@ -67,8 +67,8 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = @@ -85,7 +85,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { ov::element::Type precision; - ngraph::PartialShape shape; + ov::PartialShape shape; bool addFakeQuantize; std::string additionalLayer; AvgPoolTransformationTestValues testValues; @@ -123,7 +123,7 @@ const std::vector additionalLayer = { const std::vector addFQ = {true, false}; -const std::vector shapes = {{1, 3, 72, 48}, {-1, -1, -1, -1}}; +const std::vector shapes = {{1, 3, 72, 48}, {-1, -1, -1, -1}}; const std::vector testValues = { // U8 per tensor quantization @@ -199,7 +199,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector shapesWithDynamicChannel = {PartialShape::dynamic()}; +const std::vector shapesWithDynamicChannel = {PartialShape::dynamic()}; const std::vector testValues = { // U8 per tensor quantization diff --git a/src/common/low_precision_transformations/tests/avg_pool_with_child_transformation.cpp b/src/common/low_precision_transformations/tests/avg_pool_with_child_transformation.cpp index 1ad7a4505b3..f10bc3bd8a6 100644 --- a/src/common/low_precision_transformations/tests/avg_pool_with_child_transformation.cpp +++ b/src/common/low_precision_transformations/tests/avg_pool_with_child_transformation.cpp @@ -4,12 +4,12 @@ #include -#include -#include +#include "low_precision/avg_pool.hpp" +#include "low_precision/convolution.hpp" #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -43,7 +43,7 @@ public: Expected expected; }; -typedef std::tuple +typedef std::tuple AvgPoolWithChildTransformationParams; class AvgPoolWithChildTransformation : public LayerTransformation, @@ -51,7 +51,7 @@ class AvgPoolWithChildTransformation : public LayerTransformation, public: void SetUp() override { ov::element::Type precision; - ngraph::PartialShape shape; + ov::PartialShape shape; std::string additionalLayer; AvgPoolWithChildTransformationTestValues testValues; std::tie(precision, shape, testValues) = GetParam(); @@ -63,8 +63,8 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); - transform.add( + transform.add(testValues.params); + transform.add( testValues.params); transform.transform(actualFunction); @@ -82,7 +82,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { ov::element::Type precision; - ngraph::PartialShape shape; + ov::PartialShape shape; std::string additionalLayer; AvgPoolWithChildTransformationTestValues testValues; std::tie(precision, shape, testValues) = obj.param; @@ -115,7 +115,7 @@ TEST_P(AvgPoolWithChildTransformation, CompareFunctions) { const std::vector precisions = {ov::element::f32}; -const std::vector shapes = {{1, 3, 72, 48}, {4, 3, 72, 48}}; +const std::vector shapes = {{1, 3, 72, 48}, {4, 3, 72, 48}}; const std::vector testValues = { // U8 per tensor quantization diff --git a/src/common/low_precision_transformations/tests/clamp_transformation.cpp b/src/common/low_precision_transformations/tests/clamp_transformation.cpp index a87d78e74e1..410a9e52953 100644 --- a/src/common/low_precision_transformations/tests/clamp_transformation.cpp +++ b/src/common/low_precision_transformations/tests/clamp_transformation.cpp @@ -4,10 +4,10 @@ #include -#include +#include "low_precision/clamp.hpp" #include #include -#include +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -42,12 +42,12 @@ public: bool nonDequantizationMultiply; }; -typedef std::tuple ClampTransformationParams; +typedef std::tuple ClampTransformationParams; class ClampTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const ClampTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = @@ -60,7 +60,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = testValues.nonDequantizationMultiply @@ -76,7 +76,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const ClampTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -97,9 +97,9 @@ TEST_P(ClampTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { - ngraph::PartialShape({1, 3, 224, 224}), - ngraph::PartialShape({-1, -1, -1, -1}), +const std::vector inputShapes = { + ov::PartialShape({1, 3, 224, 224}), + ov::PartialShape({-1, -1, -1, -1}), }; const std::vector testValues = { @@ -214,8 +214,8 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector inputShapes = { - ngraph::PartialShape({1, 3, 4, 4}), +const std::vector inputShapes = { + ov::PartialShape({1, 3, 4, 4}), }; const std::vector testValuesDeqBySpatialDimension = { @@ -253,7 +253,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues2 namespace testValues3 { -const std::vector inputShapesWithDynamicRank = {PartialShape::dynamic()}; +const std::vector inputShapesWithDynamicRank = {PartialShape::dynamic()}; const std::vector testValues = { // U8 per tensor quantization diff --git a/src/common/low_precision_transformations/tests/compose_fake_quantize_transformation.cpp b/src/common/low_precision_transformations/tests/compose_fake_quantize_transformation.cpp index c6b5bace96a..e7e9686d6de 100644 --- a/src/common/low_precision_transformations/tests/compose_fake_quantize_transformation.cpp +++ b/src/common/low_precision_transformations/tests/compose_fake_quantize_transformation.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "low_precision/network_helper.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/compose_fake_quantize_function.hpp" @@ -58,8 +58,8 @@ public: const auto input = actualFunction->get_parameters()[0]; const auto fakeQuantizes = input->output(0).get_target_inputs(); const auto it = fakeQuantizes.begin(); - const auto fakeQuantize = ngraph::as_type_ptr(it->get_node()->shared_from_this()); - ngraph::pass::low_precision::NetworkHelper::composeFakeQuantize(fakeQuantize); + const auto fakeQuantize = ov::as_type_ptr(it->get_node()->shared_from_this()); + ov::pass::low_precision::NetworkHelper::composeFakeQuantize(fakeQuantize); referenceFunction = ngraph::builder::subgraph::ComposeFakeQuantizeFunction::get( testValues.originalPrecision, diff --git a/src/common/low_precision_transformations/tests/concat_selection_with_intermediate_transformation.cpp b/src/common/low_precision_transformations/tests/concat_selection_with_intermediate_transformation.cpp index ed13ba51b8e..6d2f7dce814 100644 --- a/src/common/low_precision_transformations/tests/concat_selection_with_intermediate_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_selection_with_intermediate_transformation.cpp @@ -10,11 +10,11 @@ #include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -85,16 +85,16 @@ public: testValues.actual.fakeQuantize1, testValues.actual.fakeQuantize2); - auto supportedPrecisions = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto supportedPrecisions = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, {ov::element::u8}} }) }); SimpleLowPrecisionTransformer transform(supportedPrecisions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceSelectionWithIntermediate( diff --git a/src/common/low_precision_transformations/tests/concat_transformation.cpp b/src/common/low_precision_transformations/tests/concat_transformation.cpp index 2e8426be5b3..75d8c1c0f88 100644 --- a/src/common/low_precision_transformations/tests/concat_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_transformation.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include "low_precision/concat.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -65,7 +65,7 @@ public: testValues.concatAxis); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ConcatFunction::get( diff --git a/src/common/low_precision_transformations/tests/concat_with_different_precision_on_children.cpp b/src/common/low_precision_transformations/tests/concat_with_different_precision_on_children.cpp index 46fe37416a1..68ad0ed1195 100644 --- a/src/common/low_precision_transformations/tests/concat_with_different_precision_on_children.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_different_precision_on_children.cpp @@ -10,10 +10,10 @@ #include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -73,7 +73,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes typedef std::tuple < ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ConcatTransformationTestValues > ConcatTransformationParams; @@ -81,7 +81,7 @@ class ConcatWithDifferentChildrenTransformation : public LayerTransformation, pu public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape inputShape = std::get<1>(GetParam()); + const ov::PartialShape inputShape = std::get<1>(GetParam()); ConcatTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = ngraph::builder::subgraph::ConcatFunction::getOriginalWithDifferentPrecisionOnChildren( @@ -92,15 +92,15 @@ public: testValues.actual.fakeQuantize2); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transform({}, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithDifferentPrecisionOnChildren( @@ -120,7 +120,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape inputShape = std::get<1>(obj.param); + const ov::PartialShape inputShape = std::get<1>(obj.param); const ConcatTransformationTestValues testValues = std::get<2>(obj.param); std::ostringstream result; @@ -145,7 +145,7 @@ const std::vector precisions = { // ov::element::f16 }; -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 10, 10 }, { 4, 3, 10, 10 }, { -1, 3, 10, -1 } diff --git a/src/common/low_precision_transformations/tests/concat_with_fq_tranformation.cpp b/src/common/low_precision_transformations/tests/concat_with_fq_tranformation.cpp index 75dc9c4b55f..6e06247a682 100644 --- a/src/common/low_precision_transformations/tests/concat_with_fq_tranformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_fq_tranformation.cpp @@ -4,15 +4,15 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "low_precision/common/precisions_restriction.hpp" +#include "low_precision/common/quantization_granularity_restriction.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/fuse_multiply_to_fake_quantize.hpp" +#include "low_precision/fuse_subtract_to_fake_quantize.hpp" +#include "low_precision/rt_info/intervals_alignment_attribute.hpp" +#include "low_precision/rt_info/precision_preserved_attribute.hpp" +#include "low_precision/rt_info/quantization_alignment_attribute.hpp" #include #include #include @@ -97,7 +97,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes return out << "_" << values.multiChannels << "_" << values.actual << "_" << values.result; } -typedef std::tuple +typedef std::tuple ConcatTransformationParams; class ConcatWithFQTransformation : public LayerTransformation, @@ -105,7 +105,7 @@ class ConcatWithFQTransformation : public LayerTransformation, public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); ConcatTransformationTestValues testValues = std::get<2>(GetParam()); // dequantization output precision depends on input precision @@ -130,34 +130,34 @@ public: {}, testValues.axis, testValues.addNotPrecisionPreservedOperation); - auto supportedPrecisionsOnActivation = std::vector( - {ngraph::pass::low_precision::PrecisionsRestriction::create( + auto supportedPrecisionsOnActivation = std::vector( + {ov::pass::low_precision::PrecisionsRestriction::create( {{{0}, testValues.params.precisionsOnActivations}})}); auto quantizationRestrictions = testValues.multiChannels - ? std::vector() - : std::vector( - {ngraph::pass::low_precision::QuantizationGranularityRestriction::create()}); + ? std::vector() + : std::vector( + {ov::pass::low_precision::QuantizationGranularityRestriction::create()}); const auto params = TestTransformationParams::toParams(testValues.params); SimpleLowPrecisionTransformer transformer(supportedPrecisionsOnActivation, quantizationRestrictions); transformer.commonGraphRewrite - ->add_matcher(params); - transformer.commonGraphRewrite->add_matcher(params); + ->add_matcher(params); + transformer.commonGraphRewrite->add_matcher(params); transformer.transform(actualFunction); { ov::pass::Manager standaloneCleanupManager; standaloneCleanupManager - .register_pass(); + .register_pass(); standaloneCleanupManager.run_passes(actualFunction); } { ov::pass::Manager standaloneCleanupManager; standaloneCleanupManager - .register_pass(); + .register_pass(); standaloneCleanupManager.run_passes(actualFunction); } @@ -172,7 +172,7 @@ public: testValues.result.dequantizationAfter.convert = {}; } - ngraph::IntervalsAlignmentSharedValue::Interval interval{-1.28f, 2.55f}; + ov::IntervalsAlignmentSharedValue::Interval interval{-1.28f, 2.55f}; referenceFunction = ngraph::builder::subgraph::ConcatFunction::get(precision, @@ -183,9 +183,9 @@ public: testValues.result.fakeQuantize2, testValues.result.convert2, testValues.result.dequantization2, - {ngraph::PrecisionPreservedAttribute(true), - ngraph::IntervalsAlignmentAttribute(interval, 256), - ngraph::QuantizationAlignmentAttribute(false)}, + {ov::PrecisionPreservedAttribute(true), + ov::IntervalsAlignmentAttribute(interval, 256), + ov::QuantizationAlignmentAttribute(false)}, testValues.result.precisionAfterOperation, testValues.result.dequantizationAfter, testValues.axis, @@ -194,7 +194,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape shape = std::get<1>(obj.param); + const ov::PartialShape shape = std::get<1>(obj.param); const ConcatTransformationTestValues testValues = std::get<2>(obj.param); std::ostringstream result; @@ -215,14 +215,14 @@ TEST_P(ConcatWithFQTransformation, CompareFunctions) { ConcatTransformationTestValues testValues = std::get<2>(GetParam()); const auto actualFakeQuantizes = LayerTransformation::get(actualFunction); if (testValues.axis == 1) { - ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) - << "ngraph::PrecisionsAttribute are not the same"; + ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) + << "ov::PrecisionsAttribute are not the same"; if (testValues.checkIntervalsAlignmentAttributes) { auto operations = LayerTransformation::get(actualFunction); operations.insert(operations.end(), actualFakeQuantizes.begin(), actualFakeQuantizes.end()); - ASSERT_TRUE(checkIfAttributesSharedValuesAreTheSame(operations)) - << "ngraph::IntervalsAlignmentAttribute are not the same"; + ASSERT_TRUE(checkIfAttributesSharedValuesAreTheSame(operations)) + << "ov::IntervalsAlignmentAttribute are not the same"; } } } @@ -233,7 +233,7 @@ const std::vector precisions = { }; namespace testValues1 { -const std::vector shapes = {{1, 3, 9, 9}, {4, 3, 9, 9}, {-1, 3, 9, -1}}; +const std::vector shapes = {{1, 3, 9, 9}, {4, 3, 9, 9}, {-1, 3, 9, -1}}; const std::vector testValues = { // U8: concat: levels less then threshold is ignored, function is not transformed @@ -250,7 +250,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -260,7 +260,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -280,7 +280,7 @@ const std::vector testValues = { {0.f}, {2.55f}, ov::element::f32, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {}, @@ -304,7 +304,7 @@ const std::vector testValues = { {0.f}, {2.55f}, ov::element::f32, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::f32, @@ -322,7 +322,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -332,7 +332,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -357,7 +357,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -367,7 +367,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -391,7 +391,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -401,7 +401,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -425,7 +425,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -435,7 +435,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -459,7 +459,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -469,7 +469,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -491,7 +491,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -501,7 +501,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -523,7 +523,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -533,7 +533,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -550,7 +550,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -560,7 +560,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -582,7 +582,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -592,7 +592,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -624,7 +624,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -634,7 +634,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -658,7 +658,7 @@ const std::vector testValues = { {-128.f}, {127.f}, ov::element::i8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -668,7 +668,7 @@ const std::vector testValues = { {-128.f}, {127.f}, ov::element::i8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::i8, @@ -685,7 +685,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -695,7 +695,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -712,7 +712,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -722,7 +722,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -788,7 +788,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -798,7 +798,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -847,7 +847,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -857,7 +857,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -891,7 +891,7 @@ const std::vector testValues = { {0.f, 0.f, 0.f}, {255.f, 255.f, 255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -901,7 +901,7 @@ const std::vector testValues = { {0.f, 0.f, 0.f}, {255.f, 255.f, 255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -925,7 +925,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -935,7 +935,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -961,7 +961,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -971,7 +971,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -1009,7 +1009,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -1019,7 +1019,7 @@ const std::vector testValues = { {0.f, 0.f, 0.f}, {255.f, 255.f, 255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -1059,7 +1059,7 @@ const std::vector testValues = { {0.f, 0.f, 0.f}, {255.f, 255.f, 255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -1069,7 +1069,7 @@ const std::vector testValues = { {0.f, 0.f, 0.f}, {255.f, 255.f, 255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -1098,7 +1098,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -1108,7 +1108,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -1138,7 +1138,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, {256ul, @@ -1148,7 +1148,7 @@ const std::vector testValues = { {0.f}, {255.f}, ov::element::u8, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}}, {}, {}, ov::element::u8, @@ -1215,7 +1215,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector shapesWithDynamicChannels = { +const std::vector shapesWithDynamicChannels = { {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, }; @@ -1248,7 +1248,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues2 namespace testValues3 { -const std::vector shapesWithDynamicChannels = {PartialShape::dynamic()}; +const std::vector shapesWithDynamicChannels = {PartialShape::dynamic()}; const std::vector testValues = { // issue #58915 diff --git a/src/common/low_precision_transformations/tests/concat_with_intermediate_precision_selection_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_intermediate_precision_selection_transformation.cpp index 4e5ef6ef7a2..6f1d635c717 100644 --- a/src/common/low_precision_transformations/tests/concat_with_intermediate_precision_selection_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_intermediate_precision_selection_transformation.cpp @@ -10,12 +10,12 @@ #include -#include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/avg_pool.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/max_pool.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -72,7 +72,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes typedef std::tuple < ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ConcatTransformationTestValues > ConcatTransformationParams; @@ -80,7 +80,7 @@ class ConcatWithIntermediatePrecisionSelectionTransformation : public LayerTrans public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); ConcatTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = ngraph::builder::subgraph::ConcatFunction::getOriginalWithIntermediateAvgPool( @@ -89,21 +89,21 @@ public: testValues.actual.fakeQuantize1, testValues.actual.fakeQuantize2); - auto supportedPrecisionsOnActivation = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({{{0}, testValues.params.precisionsOnActivations}}) + auto supportedPrecisionsOnActivation = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({{{0}, testValues.params.precisionsOnActivations}}) }); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transform(supportedPrecisionsOnActivation, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithIntermediateAvgPool( @@ -121,7 +121,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape shape = std::get<1>(obj.param); + const ov::PartialShape shape = std::get<1>(obj.param); const ConcatTransformationTestValues testValues = std::get<2>(obj.param); std::ostringstream result; @@ -145,7 +145,7 @@ const std::vector precisions = { // ov::element::f16 }; -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 9, 9 }, { 4, 3, 9, 9 }, { Dimension::dynamic(), 3, Dimension::dynamic(), Dimension::dynamic() } diff --git a/src/common/low_precision_transformations/tests/concat_with_intermediate_reshape_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_intermediate_reshape_transformation.cpp index 1fcd70c78b4..39a45101028 100644 --- a/src/common/low_precision_transformations/tests/concat_with_intermediate_reshape_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_intermediate_reshape_transformation.cpp @@ -10,10 +10,10 @@ #include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/reshape.hpp" +#include "low_precision/concat.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -78,9 +78,9 @@ public: testValues.actual.fakeQuantize2); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithIntermediateReshape( diff --git a/src/common/low_precision_transformations/tests/concat_with_intermediate_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_intermediate_transformation.cpp index a1feb52f121..169a4c07be5 100644 --- a/src/common/low_precision_transformations/tests/concat_with_intermediate_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_intermediate_transformation.cpp @@ -10,11 +10,11 @@ #include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -72,7 +72,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes typedef std::tuple < ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ConcatTransformationTestValues > ConcatTransformationParams; @@ -80,7 +80,7 @@ class ConcatWithIntermediateTransformation : public LayerTransformation, public public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); ConcatTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = ngraph::builder::subgraph::ConcatFunction::getOriginalWithIntermediate( @@ -91,15 +91,15 @@ public: testValues.actual.fakeQuantize2); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transform({}, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithIntermediate( @@ -118,7 +118,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape shape = std::get<1>(obj.param); + const ov::PartialShape shape = std::get<1>(obj.param); const ConcatTransformationTestValues testValues = std::get<2>(obj.param); std::ostringstream result; @@ -142,7 +142,7 @@ const std::vector precisions = { // ov::element::f16 }; -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 9, 9 }, { 4, 3, 9, 9 }, { Dimension::dynamic(), 3, Dimension::dynamic(), Dimension::dynamic() } diff --git a/src/common/low_precision_transformations/tests/concat_with_intermediate_with_constant_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_intermediate_with_constant_transformation.cpp index 2df1ec27b26..8bb318c78f5 100644 --- a/src/common/low_precision_transformations/tests/concat_with_intermediate_with_constant_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_intermediate_with_constant_transformation.cpp @@ -10,12 +10,12 @@ #include -#include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" +#include "low_precision/interpolate.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -73,7 +73,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes typedef std::tuple < ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ConcatTransformationTestValues > ConcatTransformationParams; @@ -81,7 +81,7 @@ class ConcatWithIntermediateWithConstantTransformation : public LayerTransformat public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); ConcatTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = ngraph::builder::subgraph::ConcatFunction::getOriginalWithIntermediateWithConstant( @@ -92,16 +92,16 @@ public: testValues.actual.fakeQuantize2); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transform({}, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithIntermediateWithConstant( @@ -119,7 +119,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape shape = std::get<1>(obj.param); + const ov::PartialShape shape = std::get<1>(obj.param); ConcatTransformationTestValues testValues = std::get<2>(obj.param); std::ostringstream result; @@ -144,7 +144,7 @@ const std::vector precisions = { // ov::element::f16 }; -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 9, 9 }, { 4, 3, 9, 9 }, { Dimension::dynamic(), 3, Dimension::dynamic(), Dimension::dynamic() } diff --git a/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation.cpp index a375a9ddf43..9387f990556 100644 --- a/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation.cpp @@ -10,18 +10,18 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" -#include -#include -#include -#include -#include +#include "low_precision/align_quantization_intervals.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/markup_precisions.hpp" +#include "low_precision/markup_avg_pool_precision_preserved.hpp" +#include "low_precision/propagate_precisions.hpp" -#include -#include -#include +#include "low_precision/concat.hpp" +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -82,7 +82,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes typedef std::tuple < ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ConcatTransformationTestValues > ConcatTransformationParams; @@ -90,7 +90,7 @@ class ConcatWithNeighborsTransformation : public LayerTransformation, public tes public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); ConcatTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = ngraph::builder::subgraph::ConcatFunction::getOriginalWithNeighbors( @@ -102,23 +102,23 @@ public: testValues.neighborType, testValues.additionalLayer); - auto supportedPrecisionsOnActivation = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto supportedPrecisionsOnActivation = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, testValues.params.precisionsOnActivations}, {{1}, testValues.params.precisionsOnWeights} }) }); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transform(supportedPrecisionsOnActivation, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithNeighbors( @@ -138,7 +138,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape shape = std::get<1>(obj.param); + const ov::PartialShape shape = std::get<1>(obj.param); const ConcatTransformationTestValues testValues = std::get<2>(obj.param); std::ostringstream result; @@ -162,7 +162,7 @@ const std::vector precisions = { // ov::element::f16 }; -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 9, 9 }, { 4, 3, 9, 9 }, { Dimension::dynamic(), 3, Dimension::dynamic(), Dimension::dynamic() } diff --git a/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation_with_convolution.cpp b/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation_with_convolution.cpp index 178fb5517e4..24627e0c2a7 100644 --- a/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation_with_convolution.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_neighbors_transformation_with_convolution.cpp @@ -8,11 +8,11 @@ #include #include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" #include "lpt_ngraph_functions/precision_propagation_function.hpp" #include "lpt_ngraph_functions/common/builders.hpp" @@ -104,24 +104,24 @@ public: testValues.actual.convert3, testValues.actual.dequantization3); - auto supportedPrecisionsOnActivation = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto supportedPrecisionsOnActivation = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, {ov::element::u8}}, {{1}, {ov::element::i8}} }) }); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create({0}) + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create({0}) }); SimpleLowPrecisionTransformer transform(supportedPrecisionsOnActivation, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::PrecisionPropagationFunction::getReferenceWithNeighbors( @@ -160,24 +160,24 @@ TEST_P(ConcatWithNeighborsWithConvolutionTransformation, CompareFunctions) { auto actualFakeQuantizes = LayerTransformation::get(actualFunction); ASSERT_EQ(3ul, actualFakeQuantizes.size()) << "unexpected FakeQuantize operations count " << actualFakeQuantizes.size(); - ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) << - "ngraph::PrecisionsAttribute shared values are not the same"; + ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) << + "ov::PrecisionsAttribute shared values are not the same"; auto actualConcatOperations = LayerTransformation::get(actualFunction); ASSERT_EQ(2ul, actualConcatOperations.size()) << "unexpected concat operations"; - ASSERT_FALSE(ngraph::pass::low_precision::getAttribute(actualConcatOperations[0]).empty()); - ASSERT_FALSE(ngraph::pass::low_precision::getAttribute(actualConcatOperations[1]).empty()); + ASSERT_FALSE(ov::pass::low_precision::getAttribute(actualConcatOperations[0]).empty()); + ASSERT_FALSE(ov::pass::low_precision::getAttribute(actualConcatOperations[1]).empty()); actualConcatOperations.insert(actualConcatOperations.end(), actualFakeQuantizes.begin(), actualFakeQuantizes.end()); - ASSERT_TRUE(checkIfAttributesSharedValuesAreTheSame(actualConcatOperations)) << - "ngraph::IntervalsAlignmentAttribute shared values are not the same"; + ASSERT_TRUE(checkIfAttributesSharedValuesAreTheSame(actualConcatOperations)) << + "ov::IntervalsAlignmentAttribute shared values are not the same"; auto convolutions = LayerTransformation::get(actualFunction); ASSERT_EQ(1ul, convolutions.size()) << "unexpected convolution operations"; ASSERT_EQ(2ul, convolutions[0]->input(0).get_rt_info().size()) << "unexpected input 0 attributes count: LowPrecision::PerTensorQuantization & LowPrecision::Precisions"; ASSERT_EQ(1ul, convolutions[0]->input(1).get_rt_info().size()) << "unexpected input 1 attributes count"; - auto& a1 = convolutions[0]->input(1).get_rt_info().begin()->second.as(); + auto& a1 = convolutions[0]->input(1).get_rt_info().begin()->second.as(); ASSERT_EQ(element::i8, a1.value().front()); } @@ -204,15 +204,15 @@ const std::vector testValues = { { { 256ul, ov::Shape({}), {-1.28f / 3.f}, {1.27f / 3.f}, {0.f}, {255.f}, element::u8, - { ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 1.27f}, 256ul) } + { ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 1.27f}, 256ul) } }, { 256ul, ov::Shape({}), {-1.28f / 2.f}, {1.27f / 2.f}, {64.f}, {192.f}, element::u8, - { ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 1.27f}, 256ul) } + { ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 1.27f}, 256ul) } }, { 256ul, ov::Shape({}), {-1.28f}, {1.27f}, {0.f}, {255.f}, element::u8, - { ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 1.27f}, 256ul) } + { ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 1.27f}, 256ul) } }, ov::element::u8, {{}, {}, {}}, diff --git a/src/common/low_precision_transformations/tests/concat_with_not_quantized_parent_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_not_quantized_parent_transformation.cpp index d36caba1141..7ae982f2eb2 100644 --- a/src/common/low_precision_transformations/tests/concat_with_not_quantized_parent_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_not_quantized_parent_transformation.cpp @@ -10,19 +10,19 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" -#include +#include "low_precision/low_precision.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/rt_info/precision_preserved_attribute.hpp" +#include "low_precision/align_quantization_parameters.hpp" +#include "low_precision/fuse_subtract_to_fake_quantize.hpp" +#include "low_precision/fuse_multiply_to_fake_quantize.hpp" +#include "low_precision/markup_can_be_quantized.hpp" +#include "low_precision/markup_quantization_granularity.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -155,43 +155,43 @@ public: testValues.axis, testValues.addNotPrecisionPreservedOperation); - auto precisionsRestrictions = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto precisionsRestrictions = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, {ov::element::u8}}, {{1}, {ov::element::i8}} }), - ngraph::pass::low_precision::PrecisionsRestriction::create({{{0}, testValues.params.precisionsOnActivations}}) + ov::pass::low_precision::PrecisionsRestriction::create({{{0}, testValues.params.precisionsOnActivations}}) }); - auto quantizationRestrictions = std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create({0}) + auto quantizationRestrictions = std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create({0}) }); const auto params = TestTransformationParams(testValues.params.updatePrecisions); const auto legacyParams = TestTransformationParams::toParams(params); ov::pass::Manager manager; - manager.register_pass(precisionsRestrictions); - manager.register_pass(quantizationRestrictions); - manager.register_pass(params.defaultPrecisions); - manager.register_pass(); - manager.register_pass(params.defaultPrecisions); - manager.register_pass(params.defaultPrecisions); + manager.register_pass(precisionsRestrictions); + manager.register_pass(quantizationRestrictions); + manager.register_pass(params.defaultPrecisions); + manager.register_pass(); + manager.register_pass(params.defaultPrecisions); + manager.register_pass(params.defaultPrecisions); std::shared_ptr common = manager.register_pass(); - common->add_matcher(legacyParams); - common->add_matcher(legacyParams); + common->add_matcher(legacyParams); + common->add_matcher(legacyParams); manager.run_passes(actualFunction); { ov::pass::Manager standaloneCleanupManager; - standaloneCleanupManager.register_pass(); + standaloneCleanupManager.register_pass(); standaloneCleanupManager.run_passes(actualFunction); } { ov::pass::Manager standaloneCleanupManager; - standaloneCleanupManager.register_pass(); + standaloneCleanupManager.register_pass(); standaloneCleanupManager.run_passes(actualFunction); } @@ -218,9 +218,9 @@ public: testValues.result.dequantization2, true, { - ngraph::PrecisionPreservedAttribute(true), - ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul), - ngraph::QuantizationAlignmentAttribute(false) + ov::PrecisionPreservedAttribute(true), + ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{-1.28f, 2.55f}, 256ul), + ov::QuantizationAlignmentAttribute(false) }, testValues.result.precisionAfterOperation, testValues.result.dequantizationAfter, @@ -258,15 +258,15 @@ TEST_P(ConcatWithNotQuantizedParentTransformation, CompareFunctions) { break; } } - ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) << - "ngraph::PrecisionsAttribute are not the same"; + ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) << + "ov::PrecisionsAttribute are not the same"; ConcatWithNotQuantizedParentTransformationTestValues testValues = std::get<2>(GetParam()); if (testValues.checkIntervalsAlignmentAttributes) { auto operations = LayerTransformation::get(actualFunction); operations.insert(operations.end(), actualFakeQuantizes.begin(), actualFakeQuantizes.end()); - ASSERT_TRUE(checkIfAttributesSharedValuesAreTheSame(operations)) << - "ngraph::IntervalsAlignmentAttribute are not the same"; + ASSERT_TRUE(checkIfAttributesSharedValuesAreTheSame(operations)) << + "ov::IntervalsAlignmentAttribute are not the same"; } } diff --git a/src/common/low_precision_transformations/tests/concat_with_reshape_at_the_end_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_reshape_at_the_end_transformation.cpp index 33318e0787b..0d90390f987 100644 --- a/src/common/low_precision_transformations/tests/concat_with_reshape_at_the_end_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_reshape_at_the_end_transformation.cpp @@ -10,12 +10,12 @@ #include -#include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" +#include "low_precision/reshape.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -85,10 +85,10 @@ public: testValues.actual.fakeQuantize3); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithReshapeAtTheEndTransformation( diff --git a/src/common/low_precision_transformations/tests/concat_with_split_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_split_transformation.cpp index e274e6692ae..0249ece3df6 100644 --- a/src/common/low_precision_transformations/tests/concat_with_split_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_split_transformation.cpp @@ -10,17 +10,17 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/split.hpp" +#include "low_precision/align_quantization_parameters.hpp" +#include "low_precision/align_quantization_intervals.hpp" +#include "low_precision/propagate_precisions.hpp" +#include "low_precision/markup_avg_pool_precision_preserved.hpp" +#include "low_precision/markup_precisions.hpp" +#include "low_precision/markup_quantization_granularity.hpp" #include "low_precision/common/precisions_restriction.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -79,7 +79,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes typedef std::tuple < ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ConcatTransformationTestValues, bool // additional Convolution after Split > ConcatTransformationParams; @@ -88,7 +88,7 @@ class ConcatWithSplitTransformation : public LayerTransformation, public testing public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); const ConcatTransformationTestValues testValues = std::get<2>(GetParam()); const bool addConvolution = std::get<3>(GetParam()); @@ -99,23 +99,23 @@ public: testValues.actual.fakeQuantize2, addConvolution); - auto supportedPrecisions = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto supportedPrecisions = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, testValues.params.precisionsOnActivations}, {{1}, testValues.params.precisionsOnWeights}, }) }); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transform(supportedPrecisions, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithSplitedIntermediate( @@ -134,7 +134,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape shape = std::get<1>(obj.param); + const ov::PartialShape shape = std::get<1>(obj.param); const ConcatTransformationTestValues testValues = std::get<2>(obj.param); const bool addConvolution = std::get<3>(obj.param); @@ -160,7 +160,7 @@ const std::vector precisions = { // ov::element::f16 }; -const std::vector shapes = { +const std::vector shapes = { { 1, 6, 10, 10 }, { Dimension::dynamic(), 6, Dimension::dynamic(), Dimension::dynamic() } }; diff --git a/src/common/low_precision_transformations/tests/concat_with_strided_slice_transformation.cpp b/src/common/low_precision_transformations/tests/concat_with_strided_slice_transformation.cpp index 4c7af044339..3b49f43a555 100644 --- a/src/common/low_precision_transformations/tests/concat_with_strided_slice_transformation.cpp +++ b/src/common/low_precision_transformations/tests/concat_with_strided_slice_transformation.cpp @@ -10,12 +10,12 @@ #include -#include -#include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" +#include "low_precision/strided_slice.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/concat_function.hpp" @@ -73,7 +73,7 @@ inline std::ostream& operator<<(std::ostream& out, const ConcatTransformationTes typedef std::tuple < ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ConcatTransformationTestValues > ConcatTransformationParams; @@ -81,7 +81,7 @@ class ConcatWithStridedSliceTransformation : public LayerTransformation, public public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); ConcatTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = ngraph::builder::subgraph::ConcatFunction::getOriginalWithStridedSlice( @@ -92,24 +92,24 @@ public: testValues.ssBeforeConcat, testValues.ssAfterConcat); - auto supportedPrecisions = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto supportedPrecisions = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, testValues.params.precisionsOnActivations}, {{1}, testValues.params.precisionsOnWeights}, }) }); auto quantizationRestrictions = testValues.multiChannels ? - std::vector() : - std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + std::vector() : + std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transform(supportedPrecisions, quantizationRestrictions); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ConcatFunction::getReferenceWithStridedSlice( @@ -128,7 +128,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape shape = std::get<1>(obj.param); + const ov::PartialShape shape = std::get<1>(obj.param); const ConcatTransformationTestValues testValues = std::get<2>(obj.param); std::ostringstream result; @@ -154,7 +154,7 @@ const std::vector precisions = { // ov::element::f16 }; -const std::vector shapes = { +const std::vector shapes = { { 1, 4, 9, 9 }, { 4, 4, 9, 9 }, { Dimension::dynamic(), 4, Dimension::dynamic(), Dimension::dynamic() } diff --git a/src/common/low_precision_transformations/tests/convert_subtract_constant_transformation.cpp b/src/common/low_precision_transformations/tests/convert_subtract_constant_transformation.cpp index 14b0b1b490c..1d56bc17d39 100644 --- a/src/common/low_precision_transformations/tests/convert_subtract_constant_transformation.cpp +++ b/src/common/low_precision_transformations/tests/convert_subtract_constant_transformation.cpp @@ -10,8 +10,8 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "low_precision/convert_subtract_constant.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -62,7 +62,7 @@ public: testValues.actual.dequantizationAfter); ov::pass::Manager manager; - manager.register_pass(); + manager.register_pass(); manager.run_passes(actualFunction); referenceFunction = ngraph::builder::subgraph::FakeQuantizeAndConvolutionFunction::get( diff --git a/src/common/low_precision_transformations/tests/convolution_backprop_data_transformation.cpp b/src/common/low_precision_transformations/tests/convolution_backprop_data_transformation.cpp index 15b66b41acb..cefd04bc163 100644 --- a/src/common/low_precision_transformations/tests/convolution_backprop_data_transformation.cpp +++ b/src/common/low_precision_transformations/tests/convolution_backprop_data_transformation.cpp @@ -10,10 +10,10 @@ #include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/convolution_backprop_data.hpp" +#include "low_precision/network_helper.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -25,10 +25,10 @@ using namespace ov; using namespace ov::pass; using namespace ngraph::builder::subgraph; -using const_node_ptr = const std::shared_ptr; +using const_node_ptr = const std::shared_ptr; using callback_function_type = std::function; -bool empty_callback(const std::shared_ptr& node) { +bool empty_callback(const std::shared_ptr& node) { return false; } @@ -98,7 +98,7 @@ public: typedef std::tuple< element::Type, - ngraph::PartialShape, + ov::PartialShape, ConvolutionBackpropDataTransformationTestValues> ConvolutionBackpropDataTransformationParams; class ConvolutionBackpropDataTransformation : public LayerTransformation, public testing::WithParamInterface { @@ -121,7 +121,7 @@ public: bool channelsIsDynamic = inputShape.rank().is_dynamic() || inputShape[1].is_dynamic(); const size_t inputChannels = channelsIsDynamic ? 8ul : static_cast(inputShape[1].get_length()); - std::shared_ptr actualWeights = ngraph::pass::low_precision::fold( + std::shared_ptr actualWeights = ov::pass::low_precision::fold( testValues.actual.weights, ov::op::v0::Constant::create( element::i64, @@ -157,11 +157,11 @@ public: actualWeights); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); - transform.get_pass_config()->set_callback(testValues.actual.callback); + transform.add(testValues.params); + transform.get_pass_config()->set_callback(testValues.actual.callback); transform.transform(actualFunction); - std::shared_ptr refWeights = ngraph::pass::low_precision::fold( + std::shared_ptr refWeights = ov::pass::low_precision::fold( testValues.expected.weights, ov::op::v0::Constant::create( element::i64, @@ -226,7 +226,7 @@ const std::vector netPrecisions = { }; namespace testValues1 { -const std::vector shapes = { +const std::vector shapes = { { 1, 8, 16, 16 }, { -1, -1, -1, -1 } }; @@ -524,7 +524,7 @@ const std::vector testValues = { 255ul, Shape({ 1, 2, 1, 1 }), { 0.f }, { 254.f }, { 0.f }, { 25.4f } }, op::v0::Constant::create(ov::element::i8, ov::Shape{}, std::vector{ 2.f }), [](const_node_ptr& node) { - return ngraph::pass::low_precision::LayerTransformation::isAsymmetricQuantization(node, + return ov::pass::low_precision::LayerTransformation::isAsymmetricQuantization(node, { ov::element::u8, ov::element::i8 }); } }, @@ -551,7 +551,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector shapesWithDynamicChannels = { +const std::vector shapesWithDynamicChannels = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/convolution_qdq_transformation.cpp b/src/common/low_precision_transformations/tests/convolution_qdq_transformation.cpp index 8513edac8e1..0b11a020fb0 100644 --- a/src/common/low_precision_transformations/tests/convolution_qdq_transformation.cpp +++ b/src/common/low_precision_transformations/tests/convolution_qdq_transformation.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/convolution.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -41,7 +41,7 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, ConvolutionQDqTransformationTestValues> ConvolutionQDqTransformationParams; class ConvolutionQDqTransformation : public LayerTransformation, public testing::WithParamInterface { @@ -63,7 +63,7 @@ public: testValues.actual.dequantizationAfter); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FakeQuantizeAndConvolutionFunction::get( @@ -106,11 +106,11 @@ TEST_P(ConvolutionQDqTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector suitablePartialShapes = { - ngraph::PartialShape({ 1, 3, 72, 48 }), - ngraph::PartialShape({ 4, 3, 72, 48 }), - ngraph::PartialShape({ -1, 3, 72, 48 }), - ngraph::PartialShape({ -1, -1, -1, -1 }), +const std::vector suitablePartialShapes = { + ov::PartialShape({ 1, 3, 72, 48 }), + ov::PartialShape({ 4, 3, 72, 48 }), + ov::PartialShape({ -1, 3, 72, 48 }), + ov::PartialShape({ -1, -1, -1, -1 }), }; const std::vector testValues = { @@ -513,7 +513,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector unsuitablePartialShapes = { +const std::vector unsuitablePartialShapes = { PartialShape::dynamic(), }; diff --git a/src/common/low_precision_transformations/tests/convolution_transformation.cpp b/src/common/low_precision_transformations/tests/convolution_transformation.cpp index d68abc6768c..03902f3f443 100644 --- a/src/common/low_precision_transformations/tests/convolution_transformation.cpp +++ b/src/common/low_precision_transformations/tests/convolution_transformation.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/convolution.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -50,7 +50,7 @@ public: typedef std::tuple< element::Type, - ngraph::PartialShape, + ov::PartialShape, ConvolutionTransformationTestValues> ConvolutionTransformationParams; class ConvolutionTransformation : public LayerTransformation, public testing::WithParamInterface { @@ -69,11 +69,11 @@ public: testValues.actual.fakeQuantizeOnWeights); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); if (testValues.params.supportAsymmetricQuantization == false) { - transform.get_pass_config()->set_callback( - [](const std::shared_ptr& node) -> bool { - return ngraph::pass::low_precision::LayerTransformation::isAsymmetricQuantization(node); + transform.get_pass_config()->set_callback( + [](const std::shared_ptr& node) -> bool { + return ov::pass::low_precision::LayerTransformation::isAsymmetricQuantization(node); }); } transform.transform(actualFunction); @@ -130,11 +130,11 @@ const std::vector netPrecisions = { element::f16 }; -const std::vector suitablePartialShapes = { - ngraph::PartialShape({ 1, 3, 72, 48 }), - ngraph::PartialShape({ 4, 3, 72, 48 }), - ngraph::PartialShape({ -1, 3, 72, 48 }), - ngraph::PartialShape({ -1, -1, -1, -1 }), +const std::vector suitablePartialShapes = { + ov::PartialShape({ 1, 3, 72, 48 }), + ov::PartialShape({ 4, 3, 72, 48 }), + ov::PartialShape({ -1, 3, 72, 48 }), + ov::PartialShape({ -1, -1, -1, -1 }), }; const std::vector testValues = { @@ -453,8 +453,8 @@ const std::vector netPrecisions = { element::f16 }; -const std::vector unsuitablePartialShapes = { - ngraph::PartialShape::dynamic() +const std::vector unsuitablePartialShapes = { + ov::PartialShape::dynamic() }; const std::vector testValues = { diff --git a/src/common/low_precision_transformations/tests/convolution_with_incorrect_weights.cpp b/src/common/low_precision_transformations/tests/convolution_with_incorrect_weights.cpp index 30e6781e933..56469c41702 100644 --- a/src/common/low_precision_transformations/tests/convolution_with_incorrect_weights.cpp +++ b/src/common/low_precision_transformations/tests/convolution_with_incorrect_weights.cpp @@ -4,13 +4,13 @@ #include -#include -#include -#include -#include +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/fold_fake_quantize.hpp" +#include "openvino/pass/constant_folding.hpp" #include #include -#include +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -60,14 +60,14 @@ public: testValues.isCorrect); SimpleLowPrecisionTransformer transform; - transform.add( + transform.add( testValues.params); - transform.add( + transform.add( testValues.params); transform.transform(actualFunction); ov::pass::Manager cleanupManager; - cleanupManager.register_pass(); + cleanupManager.register_pass(); cleanupManager.register_pass(); cleanupManager.run_passes(actualFunction); diff --git a/src/common/low_precision_transformations/tests/depth_to_space_transformation.cpp b/src/common/low_precision_transformations/tests/depth_to_space_transformation.cpp index 57c1da03659..3d5c0f87702 100644 --- a/src/common/low_precision_transformations/tests/depth_to_space_transformation.cpp +++ b/src/common/low_precision_transformations/tests/depth_to_space_transformation.cpp @@ -10,8 +10,8 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "low_precision/depth_to_space.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -21,7 +21,7 @@ namespace { using namespace ov::pass; using namespace ngraph::builder::subgraph; -using namespace ngraph::opset1; +using namespace ov::opset1; using namespace ov; class DepthToSpaceTransformationTestValues { @@ -48,13 +48,13 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, DepthToSpaceTransformationTestValues> DepthToSpaceTransformationParams; class DepthToSpaceTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const DepthToSpaceTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = DepthToSpaceFunction::getOriginal( @@ -65,7 +65,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = DepthToSpaceFunction::getReference( @@ -84,7 +84,7 @@ public: {DepthToSpace::DepthToSpaceMode::DEPTH_FIRST, "DEPTH_FIRST"}, }; - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const DepthToSpaceTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -107,7 +107,7 @@ TEST_P(DepthToSpaceTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapesForBlockSize2 = { +const std::vector inputShapesForBlockSize2 = { { 1, 4, 3, 3 }, {-1, -1, -1, -1} }; @@ -229,7 +229,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesForBlockSize3 = { +const std::vector inputShapesForBlockSize3 = { { 1, 9, 3, 3 }, {-1, -1, -1, -1} }; @@ -279,7 +279,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues2 namespace testValues3 { -const std::vector inputShapesWithDynamicRank = { +const std::vector inputShapesWithDynamicRank = { PartialShape::dynamic(), }; diff --git a/src/common/low_precision_transformations/tests/elementwise_with_multi_parent_dequantization_transformation.cpp b/src/common/low_precision_transformations/tests/elementwise_with_multi_parent_dequantization_transformation.cpp index 0fb524641c4..231ec42f968 100644 --- a/src/common/low_precision_transformations/tests/elementwise_with_multi_parent_dequantization_transformation.cpp +++ b/src/common/low_precision_transformations/tests/elementwise_with_multi_parent_dequantization_transformation.cpp @@ -11,13 +11,13 @@ #include #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "low_precision/add.hpp" #include "lpt_ngraph_functions/elementwise_with_multi_parent_dequantization_function.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -67,7 +67,7 @@ public: testValues.actual.dequantization2); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ElementwiseWithMultiParentDequantizationFunction::get( diff --git a/src/common/low_precision_transformations/tests/eliminate_fake_quantize_transformation.cpp b/src/common/low_precision_transformations/tests/eliminate_fake_quantize_transformation.cpp index 53ca84358e1..359143bc449 100644 --- a/src/common/low_precision_transformations/tests/eliminate_fake_quantize_transformation.cpp +++ b/src/common/low_precision_transformations/tests/eliminate_fake_quantize_transformation.cpp @@ -38,7 +38,7 @@ public: ngraph::builder::subgraph::DequantizationOperations dequantizationOperations2; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; TestTransformationParams params; Actual actual; Expected expected; @@ -56,12 +56,12 @@ public: testValues.actual.fakeQuantizeOnData2, {}); SimpleLowPrecisionTransformer transformer; - transformer.add( + transformer.add( testValues.params); - transformer.add(testValues.params); - transformer.add( + transformer.add(testValues.params); + transformer.add( testValues.params); - transformer.add( + transformer.add( testValues.params); transformer.transform(actualFunction); diff --git a/src/common/low_precision_transformations/tests/eltwise_transformation_is_broadcasted_test.cpp b/src/common/low_precision_transformations/tests/eltwise_transformation_is_broadcasted_test.cpp index 02befa422dc..b953ea7b14c 100644 --- a/src/common/low_precision_transformations/tests/eltwise_transformation_is_broadcasted_test.cpp +++ b/src/common/low_precision_transformations/tests/eltwise_transformation_is_broadcasted_test.cpp @@ -11,7 +11,7 @@ using namespace ::testing; using namespace std; using namespace ov; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; class EltwiseTransformationIsBroadcastedTests : public ::testing::Test { protected: diff --git a/src/common/low_precision_transformations/tests/fake_quantize_and_two_output_branches_with_convolution.cpp b/src/common/low_precision_transformations/tests/fake_quantize_and_two_output_branches_with_convolution.cpp index 7d1579e05e4..9347ac54519 100644 --- a/src/common/low_precision_transformations/tests/fake_quantize_and_two_output_branches_with_convolution.cpp +++ b/src/common/low_precision_transformations/tests/fake_quantize_and_two_output_branches_with_convolution.cpp @@ -11,8 +11,8 @@ #include -#include -#include +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -75,8 +75,8 @@ public: testValues.actual.fqOnWeights2); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); - transform.add(testValues.params); + transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FakeQuantizeAndTwoOutputBranchesWithConvolutionFunction::getReference( diff --git a/src/common/low_precision_transformations/tests/fake_quantize_on_weights_with_unsupported_child.cpp b/src/common/low_precision_transformations/tests/fake_quantize_on_weights_with_unsupported_child.cpp index a903bf9bb35..db0141f21b1 100644 --- a/src/common/low_precision_transformations/tests/fake_quantize_on_weights_with_unsupported_child.cpp +++ b/src/common/low_precision_transformations/tests/fake_quantize_on_weights_with_unsupported_child.cpp @@ -10,10 +10,10 @@ #include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/fold_fake_quantize.hpp" +#include "openvino/pass/constant_folding.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -62,11 +62,11 @@ public: testValues.actual.fakeQuantizeOnWeights); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); ov::pass::Manager cleanupManager; - cleanupManager.register_pass(); + cleanupManager.register_pass(); cleanupManager.register_pass(); cleanupManager.run_passes(actualFunction); diff --git a/src/common/low_precision_transformations/tests/fake_quantize_precision_selection_transformation.cpp b/src/common/low_precision_transformations/tests/fake_quantize_precision_selection_transformation.cpp index 2c55db412cc..e600403b067 100644 --- a/src/common/low_precision_transformations/tests/fake_quantize_precision_selection_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fake_quantize_precision_selection_transformation.cpp @@ -10,10 +10,10 @@ #include -#include -#include -#include -#include +#include "low_precision/prelu.hpp" +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/max_pool.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/fake_quantize_precision_selection_function.hpp" @@ -89,18 +89,18 @@ public: testValues.actual.fakeQuantizeOnWeights }); - auto supportedPrecisions = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto supportedPrecisions = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, testValues.precisionsOnActivationForLimitedOperation}, {{1}, { element::i8 }} }) }); SimpleLowPrecisionTransformer transform(supportedPrecisions); - transform.add(params); - transform.add(precisionLimitedOperationParams); - transform.add(params); - transform.add(params); + transform.add(params); + transform.add(precisionLimitedOperationParams); + transform.add(params); + transform.add(params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FakeQuantizePrecisionSelectionFunction::getReference( diff --git a/src/common/low_precision_transformations/tests/fake_quantize_transformation.cpp b/src/common/low_precision_transformations/tests/fake_quantize_transformation.cpp index 1a795f87a80..a6f357b00a7 100644 --- a/src/common/low_precision_transformations/tests/fake_quantize_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fake_quantize_transformation.cpp @@ -4,10 +4,10 @@ #include -#include -#include -#include -#include +#include "low_precision/avg_pool.hpp" +#include "low_precision/common/precisions_restriction.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/low_precision.hpp" #include #include #include @@ -55,7 +55,7 @@ inline std::ostream& operator<<(std::ostream& out, const FakeQuantizeTransformat return out << "_" << testValue.actual << "_" << testValue.expected; } -typedef std::tuple +typedef std::tuple FakeQuantizeTransformationParams; class FakeQuantizeTransformation : public LayerTransformation, @@ -63,13 +63,13 @@ class FakeQuantizeTransformation : public LayerTransformation, public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape shape = std::get<1>(GetParam()); + const ov::PartialShape shape = std::get<1>(GetParam()); const bool updatePrecision = std::get<2>(GetParam()); const FakeQuantizeTransformationTestValues fakeQuantizeOnData = std::get<3>(GetParam()); - std::vector defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_support; + std::vector defaultPrecisions = ov::pass::low_precision::precision_set::int8_support; if (fakeQuantizeOnData.actual.quantizationLevel != 256) { - defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_int16_int32_support; + defaultPrecisions = ov::pass::low_precision::precision_set::int8_int16_int32_support; } const auto params = TestTransformationParams(fakeQuantizeOnData.params) @@ -83,14 +83,14 @@ public: fakeQuantizeOnData.actual, fakeQuantizeOnData.addNotPrecisionPreservedOperation); - auto supportedPrecisions = std::vector( - {ngraph::pass::low_precision::PrecisionsRestriction::create( + auto supportedPrecisions = std::vector( + {ov::pass::low_precision::PrecisionsRestriction::create( {{{0}, params.precisionsOnActivations}})}); SimpleLowPrecisionTransformer transform(supportedPrecisions, {}, {ov::element::f32, defaultPrecisions}); - transform.add( + transform.add( params); - transform.add(params); + transform.add(params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FakeQuantizeFunction::getReference( @@ -106,7 +106,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { ov::element::Type precision; - ngraph::PartialShape shape; + ov::PartialShape shape; bool updatePrecision; FakeQuantizeTransformationTestValues fakeQuantizeOnData; std::tie(precision, shape, updatePrecision, fakeQuantizeOnData) = obj.param; @@ -133,7 +133,7 @@ const std::vector precisions = {ov::element::f32, const std::vector updatePrecisions = {true, false}; -const std::vector shapes = { +const std::vector shapes = { {1, 3, 72, 48}, {-1, -1, -1, -1}, PartialShape::dynamic(), diff --git a/src/common/low_precision_transformations/tests/fake_quantize_with_dq_not_optimal_transformation.cpp b/src/common/low_precision_transformations/tests/fake_quantize_with_dq_not_optimal_transformation.cpp index b0beed26c69..205b48122de 100644 --- a/src/common/low_precision_transformations/tests/fake_quantize_with_dq_not_optimal_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fake_quantize_with_dq_not_optimal_transformation.cpp @@ -11,8 +11,8 @@ #include -#include -#include +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -80,21 +80,21 @@ public: testValues.actual.dequantizationOnWeights, testValues.actual.dequantizationAfter); - auto precisionsRestrictions = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto precisionsRestrictions = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, {ov::element::u8}}, {{1}, {ov::element::i8}} }) }); - auto quantizationRestrictions = std::vector({ - ngraph::pass::low_precision::QuantizationGranularityRestriction::create() + auto quantizationRestrictions = std::vector({ + ov::pass::low_precision::QuantizationGranularityRestriction::create() }); SimpleLowPrecisionTransformer transformer(precisionsRestrictions, quantizationRestrictions); - transformer.add( + transformer.add( TestTransformationParams(params).setPrecisionsOnActivations({ element::u8 })); - transformer.add(params); + transformer.add(params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FakeQuantizeAndConvolutionFunction::get( diff --git a/src/common/low_precision_transformations/tests/fake_quantize_with_dynamic_intervals_transformation.cpp b/src/common/low_precision_transformations/tests/fake_quantize_with_dynamic_intervals_transformation.cpp index 7b8f379ba8a..5756d0471ed 100644 --- a/src/common/low_precision_transformations/tests/fake_quantize_with_dynamic_intervals_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fake_quantize_with_dynamic_intervals_transformation.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include "low_precision/fake_quantize.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -63,7 +63,7 @@ public: actualFunction = get(precision, shape, testValues.inputLowConst, testValues.inpuHighConst, testValues.outputLowConst, testValues.outputHighConst); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = get(precision, shape, testValues.inputLowConst, testValues.inpuHighConst, testValues.outputLowConst, testValues.outputHighConst); @@ -97,19 +97,19 @@ private: const std::vector high = { 1.f }; const auto inputLow = inputLowConst ? - std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, low)) : + std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, low)) : std::make_shared(constantPresition, constantShape); const auto inputHigh = inputLowConst ? - std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, high)) : + std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, high)) : std::make_shared(constantPresition, constantShape); const auto outputLow = outputLowConst ? - std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, low)) : + std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, low)) : std::make_shared(constantPresition, constantShape); const auto outputHigh = outputHighConst ? - std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, high)) : + std::dynamic_pointer_cast(std::make_shared(constantPresition, constantShape, high)) : std::make_shared(constantPresition, constantShape); const auto levels = 256ul; diff --git a/src/common/low_precision_transformations/tests/fold_convert_transformation.cpp b/src/common/low_precision_transformations/tests/fold_convert_transformation.cpp index fc81f373de6..bde3e6577b2 100644 --- a/src/common/low_precision_transformations/tests/fold_convert_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fold_convert_transformation.cpp @@ -11,13 +11,13 @@ #include #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "low_precision/fold_convert.hpp" #include "lpt_ngraph_functions/common/builders.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -36,21 +36,21 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, FoldConvertTransformationTestValues> FoldConvertTransformationParams; class FoldConvertTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const FoldConvertTransformationTestValues testValues = std::get<1>(GetParam()); const auto createFunction = []( const ov::element::Type precision, - const ngraph::PartialShape& inputShape, + const ov::PartialShape& inputShape, const ngraph::builder::subgraph::DequantizationOperations& dequantization) -> std::shared_ptr { auto input = std::make_shared(precision, inputShape); - std::shared_ptr output = makeDequantization(input, dequantization); + std::shared_ptr output = makeDequantization(input, dequantization); output->set_friendly_name("output"); return std::make_shared( @@ -61,14 +61,14 @@ public: actualFunction = createFunction(testValues.precision, inputShape, testValues.dequantizationActual); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = createFunction(testValues.precision, inputShape, testValues.dequantizationExpected); } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const FoldConvertTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -89,7 +89,7 @@ TEST_P(FoldConvertTransformation, CompareFunctions) { ASSERT_TRUE(LayerTransformation::allNamesAreUnique(actualFunction)) << "Not all names are unique"; } -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 4, 16, 16}, {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, PartialShape::dynamic() diff --git a/src/common/low_precision_transformations/tests/fold_fake_quantize_in_transformations.cpp b/src/common/low_precision_transformations/tests/fold_fake_quantize_in_transformations.cpp index 25d167cdc1e..1fcb322d2c1 100644 --- a/src/common/low_precision_transformations/tests/fold_fake_quantize_in_transformations.cpp +++ b/src/common/low_precision_transformations/tests/fold_fake_quantize_in_transformations.cpp @@ -4,7 +4,7 @@ #include -#include +#include "low_precision/fake_quantize.hpp" #include #include #include @@ -67,7 +67,7 @@ public: const auto params = TestTransformationParams(testValues.params).setUpdatePrecisions(testValues.updatePrecision); - std::shared_ptr dataSource; + std::shared_ptr dataSource; std::shared_ptr parameter; bool useParameterAsDataSource = (testValues.actual.constValues.size() == 0); @@ -86,9 +86,9 @@ public: ngraph::builder::subgraph::makeFakeQuantizeTypeRelaxed(dataSource, element::f32, testValues.actual.fakeQuantize); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(as_type_ptr(fq), + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(as_type_ptr(fq), testValues.actual.fqOutPrecision); - fq = ngraph::pass::low_precision::NetworkHelper::fold_fake_quantize(as_type_ptr(fq), + fq = ov::pass::low_precision::NetworkHelper::fold_fake_quantize(as_type_ptr(fq), testValues.roundValues); ngraph::ResultVector results{std::make_shared(fq)}; actualFunction = std::make_shared( diff --git a/src/common/low_precision_transformations/tests/fuse_convert_transformation.cpp b/src/common/low_precision_transformations/tests/fuse_convert_transformation.cpp index ab6b269cfd7..63f16a0dd36 100644 --- a/src/common/low_precision_transformations/tests/fuse_convert_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fuse_convert_transformation.cpp @@ -9,8 +9,8 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "low_precision/fuse_convert.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -47,13 +47,13 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, FuseConvertTransformationTestValues> FuseConvertTransformationParams; class FuseConvertTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const FuseConvertTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = ngraph::builder::subgraph::FuseConvertFunction::get( @@ -64,7 +64,7 @@ public: testValues.constInput); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FuseConvertFunction::get( @@ -76,7 +76,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const FuseConvertTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -102,7 +102,7 @@ TEST_P(FuseConvertTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 4, 16, 16}, {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, PartialShape::dynamic() @@ -182,7 +182,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 4, 16, 16}, }; diff --git a/src/common/low_precision_transformations/tests/fuse_dequantize_to_fake_quantize_transformation.cpp b/src/common/low_precision_transformations/tests/fuse_dequantize_to_fake_quantize_transformation.cpp index bdfcb3520d2..348bc65cf85 100644 --- a/src/common/low_precision_transformations/tests/fuse_dequantize_to_fake_quantize_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fuse_dequantize_to_fake_quantize_transformation.cpp @@ -4,13 +4,13 @@ #include -#include -#include +#include "low_precision/fake_quantize.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -49,7 +49,7 @@ public: ngraph::builder::subgraph::FakeQuantizeOnDataWithConstant fakeQuantizeOnData; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; TestTransformationParams params; Actual actual; Expected expected; @@ -73,11 +73,11 @@ public: testValues.actual.fakeQuantizeOnData); SimpleLowPrecisionTransformer transformer; - transformer.add( + transformer.add( testValues.params); transformer.transform(actualFunction); - transformer.add( + transformer.add( testValues.params); transformer.transform(actualFunction); diff --git a/src/common/low_precision_transformations/tests/fuse_fake_quantize_with_multi_inputs_transformation.cpp b/src/common/low_precision_transformations/tests/fuse_fake_quantize_with_multi_inputs_transformation.cpp index f9ad0b51bb8..ba6ea956d6b 100644 --- a/src/common/low_precision_transformations/tests/fuse_fake_quantize_with_multi_inputs_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fuse_fake_quantize_with_multi_inputs_transformation.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/fake_quantize.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -62,7 +62,7 @@ public: testValues.actual.fakeQuantizeOnData); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FuseFakeQuantizeFunction::get( diff --git a/src/common/low_precision_transformations/tests/fuse_multiply_to_fake_quantize_transformation.cpp b/src/common/low_precision_transformations/tests/fuse_multiply_to_fake_quantize_transformation.cpp index 413eda9c844..192d27b8970 100644 --- a/src/common/low_precision_transformations/tests/fuse_multiply_to_fake_quantize_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fuse_multiply_to_fake_quantize_transformation.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include "low_precision/fuse_multiply_to_fake_quantize.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -44,7 +44,7 @@ public: typedef std::tuple< size_t, - ngraph::PartialShape, + ov::PartialShape, FuseMultiplyToFakeQuantizeTransformationTestValues> FuseMultiplyToFakeQuantizeTransformationTestParams; class FuseMultiplyToFakeQuantizeTransformation : public LayerTransformation, @@ -52,7 +52,7 @@ class FuseMultiplyToFakeQuantizeTransformation : public LayerTransformation, public: void SetUp() override { const size_t quantizationLevel = std::get<0>(GetParam()); - const ngraph::PartialShape inputShape = std::get<1>(GetParam()); + const ov::PartialShape inputShape = std::get<1>(GetParam()); FuseMultiplyToFakeQuantizeTransformationTestValues testValues = std::get<2>(GetParam()); if (!testValues.actual.fakeQuantizeOnData.empty()) { @@ -68,7 +68,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::FuseMultiplyToFakeQuantizeFunction::get( @@ -79,7 +79,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const size_t quantizationLevel = std::get<0>(obj.param); - const ngraph::PartialShape inputShape = std::get<1>(obj.param); + const ov::PartialShape inputShape = std::get<1>(obj.param); FuseMultiplyToFakeQuantizeTransformationTestValues testValues = std::get<2>(obj.param); if (!testValues.actual.fakeQuantizeOnData.empty()) { @@ -110,7 +110,7 @@ TEST_P(FuseMultiplyToFakeQuantizeTransformation, CompareFunctions) { std::vector quantizationLevels = { 256ul, 128ul }; namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 3, 16, 16}, {Dimension::dynamic(), 3, Dimension::dynamic(), Dimension::dynamic()} }; @@ -177,9 +177,9 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesWithDynamicChannels = { +const std::vector inputShapesWithDynamicChannels = { {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, - ngraph::PartialShape::dynamic() + ov::PartialShape::dynamic() }; const std::vector testValues = { diff --git a/src/common/low_precision_transformations/tests/fuse_subtract_to_fake_quantize_transformation.cpp b/src/common/low_precision_transformations/tests/fuse_subtract_to_fake_quantize_transformation.cpp index 9023f78d12c..5bacc56c861 100644 --- a/src/common/low_precision_transformations/tests/fuse_subtract_to_fake_quantize_transformation.cpp +++ b/src/common/low_precision_transformations/tests/fuse_subtract_to_fake_quantize_transformation.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include "low_precision/fuse_subtract_to_fake_quantize.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -49,7 +49,7 @@ public: typedef std::tuple< size_t, - ngraph::PartialShape, + ov::PartialShape, FuseSubtractToFakeQuantizeTransformationTestValues> FuseSubtractToFakeQuantizeTransformationTestParams; class FuseSubtractToFakeQuantizeTransformation : public LayerTransformation, @@ -57,7 +57,7 @@ class FuseSubtractToFakeQuantizeTransformation : public LayerTransformation, public: void SetUp() override { const size_t quantizationLevel = std::get<0>(GetParam()); - const ngraph::PartialShape inputShape = std::get<1>(GetParam()); + const ov::PartialShape inputShape = std::get<1>(GetParam()); FuseSubtractToFakeQuantizeTransformationTestValues testValues = std::get<2>(GetParam()); if (!testValues.actual.fakeQuantizeOnData.empty()) { @@ -86,7 +86,7 @@ public: testValues.actual.dequantization2); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = testValues.expected.fakeQuantizeOnData2.empty() ? @@ -104,7 +104,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const size_t quantizationLevel = std::get<0>(obj.param); - const ngraph::PartialShape inputShape = std::get<1>(obj.param); + const ov::PartialShape inputShape = std::get<1>(obj.param); FuseSubtractToFakeQuantizeTransformationTestValues testValues = std::get<2>(obj.param); if (!testValues.actual.fakeQuantizeOnData.empty()) { @@ -143,7 +143,7 @@ TEST_P(FuseSubtractToFakeQuantizeTransformation, CompareFunctions) { const std::vector quantizationLevels = { 256ul, 128ul }; namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 4, 16, 16}, {Dimension::dynamic(), 4, Dimension::dynamic(), Dimension::dynamic()} }; @@ -256,7 +256,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesWithDynamicChannels = { +const std::vector inputShapesWithDynamicChannels = { {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}, PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/gather_transformation.cpp b/src/common/low_precision_transformations/tests/gather_transformation.cpp index d3355eec623..f5ac1b0359e 100644 --- a/src/common/low_precision_transformations/tests/gather_transformation.cpp +++ b/src/common/low_precision_transformations/tests/gather_transformation.cpp @@ -4,12 +4,12 @@ #include -#include +#include "low_precision/gather.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -47,13 +47,13 @@ public: Expected expected; }; -typedef std::tuple GatherTransformationParams; +typedef std::tuple GatherTransformationParams; class GatherTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const GatherTransformationTestValues testValues = std::get<1>(GetParam()); const int opset_version = std::get<2>(GetParam()); @@ -68,7 +68,7 @@ public: opset_version); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = @@ -85,7 +85,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const GatherTransformationTestValues testValues = std::get<1>(obj.param); const int opset_version = std::get<2>(obj.param); @@ -110,7 +110,7 @@ TEST_P(GatherTransformation, CompareFunctions) { namespace testValues1 { const std::vector opset_version = {1, 7, 8}; -const std::vector inputShapes3D = {{3, 3, 4}, {-1, -1, -1}}; +const std::vector inputShapes3D = {{3, 3, 4}, {-1, -1, -1}}; const std::vector testValues = { // U8: per-tensor quantization @@ -237,7 +237,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, namespace testValues2 { const std::vector opset_version = {8}; -const std::vector inputShapes3D = {{3, 3, 4}, {-1, -1, -1}}; +const std::vector inputShapes3D = {{3, 3, 4}, {-1, -1, -1}}; const std::vector testValues = { // U8: per-tensor quantization, negative indices value diff --git a/src/common/low_precision_transformations/tests/get_dequantization_below_transformation.cpp b/src/common/low_precision_transformations/tests/get_dequantization_below_transformation.cpp index c02a3bea236..764f14a7b9f 100644 --- a/src/common/low_precision_transformations/tests/get_dequantization_below_transformation.cpp +++ b/src/common/low_precision_transformations/tests/get_dequantization_below_transformation.cpp @@ -11,11 +11,11 @@ #include #include -#include +#include "low_precision/fake_quantize_decomposition.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/get_dequantization_function.hpp" -#include +#include "low_precision/common/fake_quantize_dequantization.hpp" #include "low_precision/network_helper.hpp" using namespace testing; @@ -63,7 +63,7 @@ public: testValues.dequantization); auto const fakeQuantize = model->get_parameters()[0]->output(0).get_target_inputs().begin()->get_node()->shared_from_this(); - auto dequantization = ngraph::pass::low_precision::NetworkHelper::getDequantizationBelow(fakeQuantize); + auto dequantization = ov::pass::low_precision::NetworkHelper::getDequantizationBelow(fakeQuantize); actualFunction = ngraph::builder::subgraph::GetDequantizationFunction::get( precision, diff --git a/src/common/low_precision_transformations/tests/get_dequantization_test.cpp b/src/common/low_precision_transformations/tests/get_dequantization_test.cpp index 8853e484f90..8be933bd723 100644 --- a/src/common/low_precision_transformations/tests/get_dequantization_test.cpp +++ b/src/common/low_precision_transformations/tests/get_dequantization_test.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -41,7 +41,7 @@ public: subDataInput, mulDataInput); auto dequantization = - ngraph::pass::low_precision::NetworkHelper::getDequantization(actualFunction->get_result()); + ov::pass::low_precision::NetworkHelper::getDequantization(actualFunction->get_result()); referenceFunction = ngraph::builder::subgraph::GetDequantizationFunction::getReference(dequantization); } diff --git a/src/common/low_precision_transformations/tests/get_dequantization_transformation.cpp b/src/common/low_precision_transformations/tests/get_dequantization_transformation.cpp index 5e37ae95084..7880acd578c 100644 --- a/src/common/low_precision_transformations/tests/get_dequantization_transformation.cpp +++ b/src/common/low_precision_transformations/tests/get_dequantization_transformation.cpp @@ -11,11 +11,11 @@ #include #include -#include +#include "low_precision/fake_quantize_decomposition.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/get_dequantization_function.hpp" -#include +#include "low_precision/common/fake_quantize_dequantization.hpp" #include "low_precision/network_helper.hpp" using namespace testing; @@ -66,7 +66,7 @@ public: testValues.actualDequantization); const auto output = actualFunction->get_output_op(0); - auto dequantization = ngraph::pass::low_precision::NetworkHelper::getDequantization(output); + auto dequantization = ov::pass::low_precision::NetworkHelper::getDequantization(output); } static std::string getTestCaseName(testing::TestParamInfo obj) { @@ -85,7 +85,7 @@ TEST_P(GetDequantizationTransformation, CompareFunctions) { const GetDequantizationTestValues testValues = std::get<2>(GetParam()); const auto output = actualFunction->get_output_op(0); - const ngraph::pass::low_precision::FakeQuantizeDequantization dequantization = ngraph::pass::low_precision::NetworkHelper::getDequantization(output); + const ov::pass::low_precision::FakeQuantizeDequantization dequantization = ov::pass::low_precision::NetworkHelper::getDequantization(output); DequantizationOperations actualDequantization = toDequantizationOperations(dequantization); actualDequantization.subtract.constantShapeIsDefined = testValues.expectedDequantization.subtract.constantShapeIsDefined; actualDequantization.subtract.outPrecision = testValues.expectedDequantization.subtract.outPrecision; diff --git a/src/common/low_precision_transformations/tests/group_convolution_transformation.cpp b/src/common/low_precision_transformations/tests/group_convolution_transformation.cpp index d9539ade735..9ab7fa04a7d 100644 --- a/src/common/low_precision_transformations/tests/group_convolution_transformation.cpp +++ b/src/common/low_precision_transformations/tests/group_convolution_transformation.cpp @@ -4,12 +4,12 @@ #include -#include +#include "low_precision/group_convolution.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -53,7 +53,7 @@ public: Expected expected; }; -typedef std::tuple, // inputShape - outputShape +typedef std::tuple, // inputShape - outputShape GroupConvolutionTestValues> ConvolutionTransformationParams; @@ -81,12 +81,12 @@ public: testValues.addReshape); SimpleLowPrecisionTransformer transform; - transform.add( + transform.add( testValues.params); if (testValues.params.supportAsymmetricQuantization == false) { - transform.get_pass_config()->set_callback( - [](const std::shared_ptr& node) -> bool { - return ngraph::pass::low_precision::LayerTransformation::isAsymmetricQuantization(node); + transform.get_pass_config()->set_callback( + [](const std::shared_ptr& node) -> bool { + return ov::pass::low_precision::LayerTransformation::isAsymmetricQuantization(node); }); } transform.transform(actualFunction); @@ -136,7 +136,7 @@ TEST_P(GroupConvolutionTransformation, CompareFunctions) { // clang-format off namespace testValues1 { -const std::vector> shapesForGroupConv = { +const std::vector> shapesForGroupConv = { {{1, 6, 224, 224}, {1, 24, 218, 218}}, {{-1, -1, -1, -1}, {-1, -1, -1, -1}} }; @@ -721,7 +721,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector> shapesForDepthWiseConv = { +const std::vector> shapesForDepthWiseConv = { {{1, 6, 224, 224}, {1, 6, 218, 218}}, {{-1, 6, -1, -1}, {-1, 6, -1, -1}}, }; @@ -933,7 +933,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues2 namespace testValues3 { -const std::vector> shapesWithDynamicChannel = { +const std::vector> shapesWithDynamicChannel = { {PartialShape::dynamic(), PartialShape::dynamic()} }; diff --git a/src/common/low_precision_transformations/tests/interpolate_transformation.cpp b/src/common/low_precision_transformations/tests/interpolate_transformation.cpp index 3083151609c..d27eb81e767 100644 --- a/src/common/low_precision_transformations/tests/interpolate_transformation.cpp +++ b/src/common/low_precision_transformations/tests/interpolate_transformation.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "openvino/opsets/opset4.hpp" +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "low_precision/interpolate.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -79,7 +79,7 @@ public: ngraph::builder::subgraph::DequantizationOperations dequantizationAfter; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; ov::Shape outputShape; ov::Shape scalesShape; TestTransformationParams params; @@ -112,7 +112,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::InterpolateFunction::getReference( @@ -139,7 +139,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::InterpolateFunction::getReference( diff --git a/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_dequantization.cpp b/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_dequantization.cpp index 26ed1f953da..92ad788740d 100644 --- a/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_dequantization.cpp +++ b/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_dequantization.cpp @@ -4,11 +4,11 @@ #include -#include +#include "low_precision/weightable_layer_transformation.hpp" #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include #include "layer_transformation.hpp" @@ -28,7 +28,7 @@ public: bool isAsymmetricOnWeights; }; -typedef std::tuple +typedef std::tuple IsAsymmetricOnWeightsDequantizationParams; class IsAsymmetricOnWeightsDequantizationTransformation @@ -73,7 +73,7 @@ TEST_P(IsAsymmetricOnWeightsDequantizationTransformation, CompareFunctions) { IsAsymmetricOnWeightsDequantizationTestValues testValues = std::get<2>(GetParam()); const auto isAsymmetricOnWeights = - ngraph::pass::low_precision::WeightableLayerTransformation::isAsymmetricOnWeights( + ov::pass::low_precision::WeightableLayerTransformation::isAsymmetricOnWeights( convolutions[0], testValues.params.defaultPrecisions); ASSERT_EQ(testValues.isAsymmetricOnWeights, isAsymmetricOnWeights); @@ -81,11 +81,11 @@ TEST_P(IsAsymmetricOnWeightsDequantizationTransformation, CompareFunctions) { const std::vector netPrecisions = {element::f32}; -const std::vector suitablePartialShapes = { - ngraph::PartialShape({1, 3, 72, 48}), - ngraph::PartialShape({4, 3, 72, 48}), - ngraph::PartialShape({Dimension::dynamic(), 3, 72, 48}), - ngraph::PartialShape({1, 3, Dimension::dynamic(), Dimension::dynamic()}), +const std::vector suitablePartialShapes = { + ov::PartialShape({1, 3, 72, 48}), + ov::PartialShape({4, 3, 72, 48}), + ov::PartialShape({Dimension::dynamic(), 3, 72, 48}), + ov::PartialShape({1, 3, Dimension::dynamic(), Dimension::dynamic()}), }; const std::vector testValues = { diff --git a/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_fq.cpp b/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_fq.cpp index f004c720738..c46f7a7cd43 100644 --- a/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_fq.cpp +++ b/src/common/low_precision_transformations/tests/is_asymmetric_on_weights_fq.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/weightable_layer_transformation.hpp" #include "lpt_ngraph_functions/convolution_function.hpp" using namespace testing; @@ -30,7 +30,7 @@ public: typedef std::tuple< element::Type, - ngraph::PartialShape, + ov::PartialShape, IsAsymmetricOnWeightsFakeQuantizeTestValues, std::pair, bool> > IsAsymmetricOnWeightsFakeQuantizeParams; @@ -90,7 +90,7 @@ TEST_P(IsAsymmetricOnWeightsFakeQuantizeTransformation, CompareFunctions) { ASSERT_TRUE(convolutions.size() == 1ul) << "convolution was not found"; auto defaultPrecisions = std::get<2>(GetParam()).params.defaultPrecisions; - const auto isAsymmetricOnWeights = ngraph::pass::low_precision::WeightableLayerTransformation::isAsymmetricOnWeights(convolutions[0], + const auto isAsymmetricOnWeights = ov::pass::low_precision::WeightableLayerTransformation::isAsymmetricOnWeights(convolutions[0], defaultPrecisions); std::pair, bool> transposeAndIsAsymmetricOnWeights = std::get<3>(GetParam()); ASSERT_EQ(transposeAndIsAsymmetricOnWeights.second, isAsymmetricOnWeights); @@ -100,11 +100,11 @@ const std::vector netPrecisions = { element::f32 }; -const std::vector suitablePartialShapes = { - ngraph::PartialShape({ 1, 3, 72, 48 }), - ngraph::PartialShape({ 4, 3, 72, 48 }), - ngraph::PartialShape({ Dimension::dynamic(), 3, 72, 48 }), - ngraph::PartialShape({ 1, 3, Dimension::dynamic(), Dimension::dynamic() }), +const std::vector suitablePartialShapes = { + ov::PartialShape({ 1, 3, 72, 48 }), + ov::PartialShape({ 4, 3, 72, 48 }), + ov::PartialShape({ Dimension::dynamic(), 3, 72, 48 }), + ov::PartialShape({ 1, 3, Dimension::dynamic(), Dimension::dynamic() }), }; const std::vector testValues = { diff --git a/src/common/low_precision_transformations/tests/is_constant_path_transformation.cpp b/src/common/low_precision_transformations/tests/is_constant_path_transformation.cpp index 50cb2ec95c3..090bdffb06f 100644 --- a/src/common/low_precision_transformations/tests/is_constant_path_transformation.cpp +++ b/src/common/low_precision_transformations/tests/is_constant_path_transformation.cpp @@ -22,7 +22,7 @@ TEST(LPT, isConstantPathFQAfterInputTransformation) { const auto fqOnActivations = makeFakeQuantize(input, ov::element::f32, FakeQuantizeOnData{ 256ul, {}, {0.f}, {2.55f}, {0.f}, {2.55f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(fqOnActivations); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(fqOnActivations); ASSERT_EQ(false, result); } @@ -32,7 +32,7 @@ TEST(LPT, isConstantPathFQAfterWeightsTransformation) { const auto fqOnWeights = makeFakeQuantize(weights, ov::element::f32, FakeQuantizeOnWeights{ 255ul, {}, {0.f}, {254.f}, {-1.27f}, {1.27f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(fqOnWeights); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(fqOnWeights); ASSERT_EQ(true, result); } @@ -41,7 +41,7 @@ TEST(LPT, isConstantPathDqAfterInputTransformation) { const auto input = std::make_shared(ov::element::f32, ov::Shape{ 1, 3, 16, 16 }); const auto dqOnActivations = makeDequantization(input, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(dqOnActivations); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(dqOnActivations); ASSERT_EQ(false, result); } @@ -50,7 +50,7 @@ TEST(LPT, isConstantPathDqAfterWeightsTransformation) { const auto weights = ov::op::v0::Constant::create(ov::element::f32, ov::Shape{ 3, 1, 1, 1 }, { 1.f }); const auto dqOnWeights = makeDequantization(weights, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(dqOnWeights); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(dqOnWeights); ASSERT_EQ(true, result); } @@ -60,9 +60,9 @@ TEST(LPT, isConstantPathTwoInputsTransformation) { const auto input2 = std::make_shared(ov::element::f32, ov::Shape{ 1, 3, 16, 16 }); const auto dq1 = makeDequantization(input1, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); const auto dq2 = makeDequantization(input2, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); - const auto matmul = std::make_shared(dq1, dq2); + const auto matmul = std::make_shared(dq1, dq2); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(matmul); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(matmul); ASSERT_EQ(false, result); } @@ -72,9 +72,9 @@ TEST(LPT, isConstantPathTwoConsantsTransformation) { const auto constant2 = ov::op::v0::Constant::create(ov::element::f32, ov::Shape{ 3, 1, 1, 1 }, { 1.f }); const auto dq1 = makeDequantization(constant1, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); const auto dq2 = makeDequantization(constant2, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); - const auto eltwise = std::make_shared(dq1, dq2); + const auto eltwise = std::make_shared(dq1, dq2); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(eltwise); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(eltwise); ASSERT_EQ(true, result); } @@ -84,11 +84,11 @@ TEST(LPT, isConstantPathMatMulParentFQTransformation) { const auto input2 = std::make_shared(ov::element::f32, ov::Shape{ 1, 3, 16, 16 }); const auto dq1 = makeDequantization(input1, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); const auto dq2 = makeDequantization(input2, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); - const auto matmul = std::make_shared(dq1, dq2); + const auto matmul = std::make_shared(dq1, dq2); const auto fqAfterMatMul = makeFakeQuantize(matmul, ov::element::f32, FakeQuantizeOnWeights{ 255ul, {}, {0.f}, {254.f}, {-1.27f}, {1.27f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(fqAfterMatMul); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(fqAfterMatMul); ASSERT_EQ(false, result); } @@ -98,10 +98,10 @@ TEST(LPT, isConstantPathMatMulParentDqTransformation) { const auto input2 = std::make_shared(ov::element::f32, ov::Shape{ 1, 3, 16, 16 }); const auto dq1 = makeDequantization(input1, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); const auto dq2 = makeDequantization(input2, DequantizationOperations{ ov::element::f32, {128.f}, {0.1f} }); - const auto matmul = std::make_shared(dq1, dq2); + const auto matmul = std::make_shared(dq1, dq2); const auto dqAfterMatMul = makeDequantization(matmul, DequantizationOperations{ {}, {}, {0.1f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(dqAfterMatMul); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(dqAfterMatMul); ASSERT_EQ(false, result); } @@ -109,7 +109,7 @@ TEST(LPT, isConstantPathMatMulParentDqTransformation) { TEST(LPT, isConstantPathConvParentDqTransformation) { const auto input = std::make_shared(ov::element::f32, ov::Shape{ 1, 3, 72, 16 }); const auto weights = ov::op::v0::Constant::create(ov::element::f32, ov::Shape{ 6, 3, 1, 1 }, { 1.f }); - const auto conv = std::make_shared( + const auto conv = std::make_shared( input, weights, ngraph::Strides{ 1, 1 }, @@ -118,7 +118,7 @@ TEST(LPT, isConstantPathConvParentDqTransformation) { ngraph::Strides{ 1, 1 }); const auto dqAfterConv = makeDequantization(conv, DequantizationOperations{ {}, {}, {0.1f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(dqAfterConv); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(dqAfterConv); ASSERT_EQ(false, result); } @@ -126,7 +126,7 @@ TEST(LPT, isConstantPathConvParentDqTransformation) { TEST(LPT, isConstantPathGroupConvParentDqTransformation) { const auto input = std::make_shared(ov::element::f32, ov::Shape{ 1, 3, 16, 16 }); const auto weights = ov::op::v0::Constant::create(ov::element::f32, ov::Shape{ 1, 6, 3, 1, 1 }, { 1.f }); - const auto groupConv = std::make_shared( + const auto groupConv = std::make_shared( input, weights, ngraph::Strides{ 1, 1 }, @@ -135,7 +135,7 @@ TEST(LPT, isConstantPathGroupConvParentDqTransformation) { ngraph::Strides{ 1, 1 }); const auto dqAfterGroupConv = makeDequantization(groupConv, DequantizationOperations{ {}, {}, {0.1f} }); - const bool result = ngraph::pass::low_precision::NetworkHelper::isConstantPath(dqAfterGroupConv); + const bool result = ov::pass::low_precision::NetworkHelper::isConstantPath(dqAfterGroupConv); ASSERT_EQ(false, result); } diff --git a/src/common/low_precision_transformations/tests/is_function_quantized_transformation.cpp b/src/common/low_precision_transformations/tests/is_function_quantized_transformation.cpp index 2d14abc1a54..ea6f7c7a6ad 100644 --- a/src/common/low_precision_transformations/tests/is_function_quantized_transformation.cpp +++ b/src/common/low_precision_transformations/tests/is_function_quantized_transformation.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include "low_precision/low_precision.hpp" #include #include "lpt_ngraph_functions/common/builders.hpp" @@ -68,7 +68,7 @@ protected: }; TEST_P(IsFunctionQuantizedTransformation, Run) { - const bool isQuantized = ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(model); + const bool isQuantized = ov::pass::low_precision::LowPrecision::isFunctionQuantized(model); const auto testValues = GetParam(); ASSERT_EQ(testValues.isQuantized, isQuantized); diff --git a/src/common/low_precision_transformations/tests/layer_transformation.cpp b/src/common/low_precision_transformations/tests/layer_transformation.cpp index feac3e237a5..cc341f66293 100644 --- a/src/common/low_precision_transformations/tests/layer_transformation.cpp +++ b/src/common/low_precision_transformations/tests/layer_transformation.cpp @@ -4,8 +4,8 @@ #include "layer_transformation.hpp" -#include -#include +#include "openvino/opsets/opset1.hpp" +#include "low_precision/network_helper.hpp" #include "simple_low_precision_transformer.hpp" using namespace testing; @@ -81,8 +81,8 @@ TestTransformationParams LayerTransformation::createParamsU8I8AndI8() { return TestTransformationParams(true, { ov::element::u8, ov::element::i8 }, { ov::element::i8 }); } -ngraph::pass::low_precision::LayerTransformation::Params TestTransformationParams::toParams(const TestTransformationParams& params) { - return ngraph::pass::low_precision::LayerTransformation::Params( +ov::pass::low_precision::LayerTransformation::Params TestTransformationParams::toParams(const TestTransformationParams& params) { + return ov::pass::low_precision::LayerTransformation::Params( params.updatePrecisions, params.deqPrecision, params.defaultPrecisions); @@ -101,7 +101,7 @@ std::string LayerTransformation::toString(const TestTransformationParams& params std::string LayerTransformation::getTestCaseNameByParams( const ov::element::Type& type, - const ngraph::PartialShape& shape, + const ov::PartialShape& shape, const TestTransformationParams& params) { std::ostringstream result; result << type << "_" << shape << "_" << toString(params); @@ -109,7 +109,7 @@ std::string LayerTransformation::getTestCaseNameByParams( } ngraph::builder::subgraph::DequantizationOperations LayerTransformation::toDequantizationOperations( - const ngraph::pass::low_precision::FakeQuantizeDequantization& dequantization) { + const ov::pass::low_precision::FakeQuantizeDequantization& dequantization) { const auto convert = dequantization.convert != nullptr ? ngraph::builder::subgraph::DequantizationOperations::Convert(dequantization.convert->output(0).get_element_type()) : ngraph::builder::subgraph::DequantizationOperations::Convert(); @@ -121,8 +121,8 @@ ngraph::builder::subgraph::DequantizationOperations LayerTransformation::toDequa true; const size_t constantIndex = dequantization.subtractConstant && dequantization.subtract ? - ngraph::pass::low_precision::NetworkHelper::getChildInputIndex( - dequantization.subtractConvert ? std::dynamic_pointer_cast(dequantization.subtractConvert) : dequantization.subtractConstant, + ov::pass::low_precision::NetworkHelper::getChildInputIndex( + dequantization.subtractConvert ? std::dynamic_pointer_cast(dequantization.subtractConvert) : dequantization.subtractConstant, dequantization.subtract) : 0ul; @@ -141,7 +141,7 @@ ngraph::builder::subgraph::DequantizationOperations LayerTransformation::toDequa ngraph::builder::subgraph::DequantizationOperations::Multiply multiply; { const size_t constantIndex = dequantization.multiplyConstant && dequantization.multiply ? - ngraph::pass::low_precision::NetworkHelper::getChildInputIndex(dequantization.multiplyConstant, dequantization.multiply) : + ov::pass::low_precision::NetworkHelper::getChildInputIndex(dequantization.multiplyConstant, dequantization.multiply) : 0ul; multiply = dequantization.multiplyConstant != nullptr ? diff --git a/src/common/low_precision_transformations/tests/layer_transformation.hpp b/src/common/low_precision_transformations/tests/layer_transformation.hpp index be51793f91e..a060fc5bfd7 100644 --- a/src/common/low_precision_transformations/tests/layer_transformation.hpp +++ b/src/common/low_precision_transformations/tests/layer_transformation.hpp @@ -17,7 +17,7 @@ using namespace ov; typedef std::tuple< element::Type, Shape, - ngraph::pass::low_precision::LayerTransformation::Params> LayerTransformationParams; + ov::pass::low_precision::LayerTransformation::Params> LayerTransformationParams; struct TestTransformationParams { TestTransformationParams( @@ -36,7 +36,7 @@ struct TestTransformationParams { TestTransformationParams& setDeconvolutionSpecificChannelsRatio(const bool deconvolutionSpecificChannelsRatio); TestTransformationParams& setDefaultPrecisions(const std::vector& defaultPrecisions); - static ngraph::pass::low_precision::LayerTransformation::Params toParams(const TestTransformationParams& params); + static ov::pass::low_precision::LayerTransformation::Params toParams(const TestTransformationParams& params); bool updatePrecisions; std::vector precisionsOnActivations; @@ -58,11 +58,11 @@ public: static std::string getTestCaseNameByParams( const ov::element::Type& type, - const ngraph::PartialShape& shape, + const ov::PartialShape& shape, const TestTransformationParams& params); static ngraph::builder::subgraph::DequantizationOperations toDequantizationOperations( - const ngraph::pass::low_precision::FakeQuantizeDequantization& dequantization); + const ov::pass::low_precision::FakeQuantizeDequantization& dequantization); static bool allNamesAreUnique(const std::shared_ptr& model); @@ -72,7 +72,7 @@ public: NodeVector nodes = model->get_ordered_ops(); for (auto& node : nodes) { - if (ngraph::is_type(node)) { + if (ov::is_type(node)) { foundNodes.push_back(node); } } @@ -83,7 +83,7 @@ public: for (size_t nodeIndex = 0ul; nodeIndex < nodes.size(); nodeIndex++) { auto& rt = nodes[nodeIndex]->get_rt_info(); for (auto& it : rt) { - auto& reference = it.second.as(); + auto& reference = it.second.as(); if ((reference.value().combinedInterval.low != intervalLow) && (reference.value().combinedInterval.high != intervalHigh)) { return false; @@ -95,8 +95,8 @@ public: } static bool compare( - const ngraph::IntervalsAlignmentAttribute& value1, - const ngraph::IntervalsAlignmentAttribute& value2) { + const ov::IntervalsAlignmentAttribute& value1, + const ov::IntervalsAlignmentAttribute& value2) { if ((value1.value().combinedInterval.low != value2.value().combinedInterval.low) || (value1.value().combinedInterval.high != value2.value().combinedInterval.high)) { return false; @@ -162,7 +162,7 @@ public: ov::Any first; for (auto node : nodes) { for (auto output : node->outputs()) { - auto value = ngraph::pass::low_precision::getAttributeFromOutput(output); + auto value = ov::pass::low_precision::getAttributeFromOutput(output); if (first.empty()) { first = value; } else { @@ -181,7 +181,7 @@ public: static bool checkIfAttributesSharedValuesAreTheSame(const NodeVector& nodes) { ov::Any first; for (auto node : nodes) { - auto value = ngraph::pass::low_precision::getAttribute(node); + auto value = ov::pass::low_precision::getAttribute(node); if (value.empty()) { return false; } @@ -203,7 +203,7 @@ public: static bool checkIfAttributesAreTheSame(const NodeVector& nodes) { ov::Any first; for (auto node : nodes) { - auto value = ngraph::pass::low_precision::getAttribute(node); + auto value = ov::pass::low_precision::getAttribute(node); if (value.empty()) { return false; } diff --git a/src/common/low_precision_transformations/tests/low_precision_transformations_test.cpp b/src/common/low_precision_transformations/tests/low_precision_transformations_test.cpp index 3365ea09909..8179503e732 100644 --- a/src/common/low_precision_transformations/tests/low_precision_transformations_test.cpp +++ b/src/common/low_precision_transformations/tests/low_precision_transformations_test.cpp @@ -10,7 +10,7 @@ #include "low_precision/fuse_convert.hpp" using namespace ::testing; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; class smoke_LPT_LowPrecisionTransformationsTests : public Test {}; @@ -22,7 +22,7 @@ TEST_F(smoke_LPT_LowPrecisionTransformationsTests, DISABLED_removeAll) { //auto transformation = transformations.find("Convolution"); //ASSERT_NE(0, transformation.size()); - //transformations.removeAll(); + //transformations.removeAll(); //transformation = transformations.find("Convolution"); //ASSERT_EQ(0, transformation.size()); } @@ -32,7 +32,7 @@ TEST_F(smoke_LPT_LowPrecisionTransformationsTests, DISABLED_removeAll) { // auto transformation = transformations.find("Concat"); // ASSERT_NE(0, transformation.size()); // -// transformations.removeBranchSpecific(); +// transformations.removeBranchSpecific(); // transformation = transformations.find("Concat"); // ASSERT_EQ(0, transformation.size()); //} @@ -42,7 +42,7 @@ TEST_F(smoke_LPT_LowPrecisionTransformationsTests, DISABLED_removeAll) { // auto transformation = transformations.find("MatMul"); // ASSERT_NE(0, transformation.size()); // -// transformations.remove(); +// transformations.remove(); // transformation = transformations.find("MatMul"); // ASSERT_EQ(0, transformation.size()); //} @@ -53,7 +53,7 @@ TEST_F(smoke_LPT_LowPrecisionTransformationsTests, DISABLED_removeAll) { // ASSERT_NE(0, transformation.size()); // const size_t originalSize = transformation.size(); // -// transformations.removeCleanup(); +// transformations.removeCleanup(); // transformation = transformations.find("Multiply"); // ASSERT_EQ(originalSize - 1, transformation.size()); //} @@ -64,7 +64,7 @@ TEST_F(smoke_LPT_LowPrecisionTransformationsTests, DISABLED_removeAll) { // ASSERT_NE(0, transformation.size()); // const size_t originalSize = transformation.size(); // -// transformations.removeStandaloneCleanup(); +// transformations.removeStandaloneCleanup(); // transformation = transformations.find("Multiply"); // ASSERT_EQ(originalSize - 1, transformation.size()); //} diff --git a/src/common/low_precision_transformations/tests/lpt_avoid_shapeof_propagation_test.cpp b/src/common/low_precision_transformations/tests/lpt_avoid_shapeof_propagation_test.cpp index f90ab8c4844..431c4459a4c 100644 --- a/src/common/low_precision_transformations/tests/lpt_avoid_shapeof_propagation_test.cpp +++ b/src/common/low_precision_transformations/tests/lpt_avoid_shapeof_propagation_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "low_precision/add.hpp" @@ -65,10 +65,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationAddTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input1, input2}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -86,10 +86,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationAvgPoolTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -106,10 +106,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationClampTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -131,10 +131,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationConcatTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input1, input2}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -162,9 +162,9 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationConvolutionTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -192,9 +192,9 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationConvolutionBackpropDataTransfor auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -211,10 +211,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationDepthToSpaceTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -226,18 +226,18 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationFakeQuantizeDecompositionTransf auto shapeOf = std::make_shared(fakeQuantize); auto& outInfo = fakeQuantize->output(0).get_rt_info(); - outInfo.emplace(ngraph::PrecisionsAttribute::get_type_info_static(), - ngraph::PrecisionsAttribute(element::TypeVector{element::u8, element::i8})); + outInfo.emplace(ov::PrecisionsAttribute::get_type_info_static(), + ov::PrecisionsAttribute(element::TypeVector{element::u8, element::i8})); auto result1 = std::make_shared(fakeQuantize); auto result2 = std::make_shared(shapeOf); auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -266,9 +266,9 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationGroupConvolutionTransformation) auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -293,10 +293,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationInterpolateTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -318,9 +318,9 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationMatMulTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -337,9 +337,9 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationMaxPoolTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -361,10 +361,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationMultiplyTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input1, input2}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -381,10 +381,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationMVNTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -402,10 +402,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationNormalizeL2Transformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -424,10 +424,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationPadTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -445,10 +445,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationPReluTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -466,10 +466,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationReduceMaxTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -487,10 +487,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationReduceMeanTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -508,10 +508,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationReduceMinTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -529,10 +529,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationReduceSumTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -550,10 +550,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationReshapeTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -570,10 +570,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationReluTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -591,10 +591,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationSqueezeTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -614,10 +614,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationSplitTransformation) { auto f = std::make_shared(ResultVector{result1, result2, result3, result4}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -634,10 +634,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationShuffleChannelsTransformation) auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -662,10 +662,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationStridedSliceTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -683,10 +683,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationTransposeTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -704,10 +704,10 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationUnsqueezeTransformation) { auto f = std::make_shared(ResultVector{result1, result2}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } @@ -727,9 +727,9 @@ TEST(LPT, AvoidDequantizationToShapeOfPropagationVariadicSplitTransformation) { auto f = std::make_shared(ResultVector{result1, result2, result3}, ParameterVector{input}); pass::Manager m; - m.register_pass(); + m.register_pass(); m.run_passes(f); - auto dqBeforeShapeOf = ngraph::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); + auto dqBeforeShapeOf = ov::pass::low_precision::NetworkHelper::getDequantization(result2->get_input_node_shared_ptr(0)); ASSERT_TRUE(dqBeforeShapeOf.empty()); } diff --git a/src/common/low_precision_transformations/tests/lpt_public_methods_test.cpp b/src/common/low_precision_transformations/tests/lpt_public_methods_test.cpp deleted file mode 100644 index 3b6716c5452..00000000000 --- a/src/common/low_precision_transformations/tests/lpt_public_methods_test.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include - -#include - -#include - -#include "common_test_utils/ov_test_utils.hpp" - -using namespace testing; -using namespace ov; -using namespace ov::pass; - -// TODO: LPT: not implemented -TEST(DISABLED_LPT, isQuantizedTransformation) { - const auto input = std::make_shared(element::f32, Shape{ 1, 3, 16, 16 }); - const auto mulConst = op::v0::Constant::create(element::f32, Shape{}, { 1.f }); - const auto mul = std::make_shared(input, mulConst); - const auto shapeConst = op::v0::Constant::create(ov::element::i64, ov::Shape{ 4 }, { 1, 3, 16, 16 }); - const auto layer = std::make_shared(mul, shapeConst, true); - - // TODO: FIXME - EXPECT_EQ(1, 0); - - //const auto transformations = ngraph::pass::low_precision::LowPrecisionTransformer::getAllTransformations(); - - //for (const auto& transformation : transformations.transformations) { - // ASSERT_NO_THROW(transformation.second->isQuantized(layer)); - //} -} diff --git a/src/common/low_precision_transformations/tests/mark_dequantization_subgraph_transformation.cpp b/src/common/low_precision_transformations/tests/mark_dequantization_subgraph_transformation.cpp index b30ebe7c1d1..92eb885c249 100644 --- a/src/common/low_precision_transformations/tests/mark_dequantization_subgraph_transformation.cpp +++ b/src/common/low_precision_transformations/tests/mark_dequantization_subgraph_transformation.cpp @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include +#include "openvino/opsets/opset10.hpp" +#include "openvino/pass/constant_folding.hpp" +#include "transformations/low_precision/mark_dequantization_subgraph.hpp" #include "transformations/fp16_compression/mark_decompression_convert_constant_folding.hpp" -#include -#include +#include "transformations/rt_info/decompression.hpp" +#include "transformations/rt_info/dequantization_node.hpp" #include "common_test_utils/ov_test_utils.hpp" diff --git a/src/common/low_precision_transformations/tests/markup_avg_pool_precisions_transformation.cpp b/src/common/low_precision_transformations/tests/markup_avg_pool_precisions_transformation.cpp index df46fed6ebe..11af9c70361 100644 --- a/src/common/low_precision_transformations/tests/markup_avg_pool_precisions_transformation.cpp +++ b/src/common/low_precision_transformations/tests/markup_avg_pool_precisions_transformation.cpp @@ -4,19 +4,19 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "low_precision/avg_pool.hpp" +#include "low_precision/convolution.hpp" +#include "low_precision/fake_quantize.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/fuse_multiply_to_fake_quantize.hpp" +#include "low_precision/fuse_subtract_to_fake_quantize.hpp" +#include "low_precision/low_precision.hpp" +#include "low_precision/max_pool.hpp" +#include "low_precision/rt_info/avg_pool_precision_preserved_attribute.hpp" #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "layer_transformation.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -79,22 +79,22 @@ public: 1, 0); - ngraph::pass::low_precision::TypeRelaxedReplacer pass; + ov::pass::low_precision::TypeRelaxedReplacer pass; pass.run_on_model(actualFunction); - auto supportedPrecisionsOnActivation = std::vector( - {ngraph::pass::low_precision::PrecisionsRestriction::create( + auto supportedPrecisionsOnActivation = std::vector( + {ov::pass::low_precision::PrecisionsRestriction::create( {{{0}, {ov::element::u8}}, {{1}, {ov::element::i8}}})}); SimpleLowPrecisionTransformer transform(supportedPrecisionsOnActivation); - transform.commonGraphRewrite->add_matcher(); - transform.commonGraphRewrite->add_matcher(); + transform.commonGraphRewrite->add_matcher(); + transform.commonGraphRewrite->add_matcher(); transform.commonGraphRewrite - ->add_matcher(); - transform.commonGraphRewrite->add_matcher(); - transform.cleanup->add_matcher(); - transform.cleanup->add_matcher(); - transform.cleanup->add_matcher(); + ->add_matcher(); + transform.commonGraphRewrite->add_matcher(); + transform.cleanup->add_matcher(); + transform.cleanup->add_matcher(); + transform.cleanup->add_matcher(); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::MarkupAvgPoolPrecisionsFunction::getReference( @@ -137,13 +137,13 @@ TEST_P(MarkupAvgPoolPrecisionsTransformation, CompareFunctions) { { auto avgPoolPrecisioinPreservedAttribute = - ngraph::pass::low_precision::getAttribute(*avgPoolOperations.begin()); + ov::pass::low_precision::getAttribute(*avgPoolOperations.begin()); ASSERT_FALSE(avgPoolPrecisioinPreservedAttribute.empty()); - ASSERT_EQ(true, avgPoolPrecisioinPreservedAttribute.as().value()); + ASSERT_EQ(true, avgPoolPrecisioinPreservedAttribute.as().value()); } const auto precisionPreserved = LayerTransformation::get(actualFunction); - ASSERT_TRUE(checkIfAttributesAreTheSame(precisionPreserved)) + ASSERT_TRUE(checkIfAttributesAreTheSame(precisionPreserved)) << "AvgPoolPrecisionPreservedAttribute are not the same"; // auto res = compare_functions(actualFunction, referenceFunction, true, true); diff --git a/src/common/low_precision_transformations/tests/markup_bias_transformation.cpp b/src/common/low_precision_transformations/tests/markup_bias_transformation.cpp index 510bd06af4b..95ee3c41790 100644 --- a/src/common/low_precision_transformations/tests/markup_bias_transformation.cpp +++ b/src/common/low_precision_transformations/tests/markup_bias_transformation.cpp @@ -4,8 +4,8 @@ #include -#include -#include +#include "low_precision/markup_bias.hpp" +#include "low_precision/rt_info/bias_attribute.hpp" #include #include @@ -63,7 +63,7 @@ TEST_P(MarkupBiasTests, CompareFunctions) { EXPECT_EQ(1ul, addOps.size()) << "unexpected addOps size"; const bool is_bias = std::get<1>(GetParam()).is_bias; - auto biasAttr = ngraph::pass::low_precision::getAttribute(addOps[0]); + auto biasAttr = ov::pass::low_precision::getAttribute(addOps[0]); EXPECT_EQ(!biasAttr.empty(), is_bias) << "Bias markup failed"; } diff --git a/src/common/low_precision_transformations/tests/mat_mul_transformation.cpp b/src/common/low_precision_transformations/tests/mat_mul_transformation.cpp index 10880b1b67e..944da4e3b47 100644 --- a/src/common/low_precision_transformations/tests/mat_mul_transformation.cpp +++ b/src/common/low_precision_transformations/tests/mat_mul_transformation.cpp @@ -4,12 +4,12 @@ #include -#include +#include "low_precision/mat_mul.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -66,7 +66,7 @@ inline std::ostream& operator<<(std::ostream& out, const MatMullTransformationTe } typedef std:: - tuple, MatMullTransformationTestValues> + tuple, MatMullTransformationTestValues> MatMulTransformationParams; class MatMulTransformation : public LayerTransformation, @@ -74,7 +74,7 @@ class MatMulTransformation : public LayerTransformation, public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const std::pair shapes = std::get<1>(GetParam()); + const std::pair shapes = std::get<1>(GetParam()); const MatMullTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = @@ -87,7 +87,7 @@ public: testValues.actual.dequantization2); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = (testValues.expected.precisionBeforeOperation1 == ov::element::f32) && @@ -113,7 +113,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { ov::element::Type precision; - std::pair shapes; + std::pair shapes; MatMullTransformationTestValues testValues; std::tie(precision, shapes, testValues) = obj.param; @@ -134,7 +134,7 @@ TEST_P(MatMulTransformation, CompareFunctions) { const std::vector precisions = {ov::element::f32, ov::element::f16}; namespace testValues1 { -const std::vector> shapes = { +const std::vector> shapes = { {{-1, -1, -1, -1}, {-1, -1, -1, -1}}, {{1, 16, 384, 64}, {1, 16, 64, 384}}, {{1, 1, 4, 16, 384, 64}, {1, 1, 4, 16, 64, 384}}, @@ -349,7 +349,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector> shapes = { +const std::vector> shapes = { {{-1, -1, -1, -1}, {-1, -1, -1, -1}}, {{1, 3, 384, 64}, {1, 3, 64, 384}}, }; @@ -399,7 +399,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues2 namespace testValues3 { -const std::vector> shapesWithDynamicChannels = { +const std::vector> shapesWithDynamicChannels = { {PartialShape::dynamic(), PartialShape::dynamic()}}; std::vector testValuesWithPerChannelDq = { diff --git a/src/common/low_precision_transformations/tests/mat_mul_with_constant_transformation.cpp b/src/common/low_precision_transformations/tests/mat_mul_with_constant_transformation.cpp index ff32c5a75ce..7e9a58cb819 100644 --- a/src/common/low_precision_transformations/tests/mat_mul_with_constant_transformation.cpp +++ b/src/common/low_precision_transformations/tests/mat_mul_with_constant_transformation.cpp @@ -4,11 +4,11 @@ #include -#include +#include "low_precision/mat_mul.hpp" #include #include #include -#include +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -68,7 +68,7 @@ inline std::ostream& operator<<(std::ostream& out, const MatMullTransformationTe return out << "_" << values.actual << "_" << values.expected; } -typedef std::tuple +typedef std::tuple MatMulTransformationParams; class MatMulWithConstantTransformation : public LayerTransformation, @@ -76,7 +76,7 @@ class MatMulWithConstantTransformation : public LayerTransformation, public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape inputShape = std::get<1>(GetParam()); + const ov::PartialShape inputShape = std::get<1>(GetParam()); MatMullTransformationTestValues testValues = std::get<2>(GetParam()); actualFunction = @@ -89,7 +89,7 @@ public: testValues.actual.dequantizationOnWeights); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = @@ -113,7 +113,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { ov::element::Type precision; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; MatMullTransformationTestValues testValues; std::tie(precision, inputShape, testValues) = obj.param; @@ -137,7 +137,7 @@ const std::vector precisions = { }; namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 384, 1024}, {4, 384, 1024}, {Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}}; @@ -184,7 +184,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector inputShapes = {{1, 3, 4}, +const std::vector inputShapes = {{1, 3, 4}, {4, 3, 4}, {Dimension::dynamic(), 3, Dimension::dynamic()}}; @@ -348,7 +348,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues2 namespace testValues3 { -const std::vector inputShapes = {{1, 2048}, +const std::vector inputShapes = {{1, 2048}, {4, 2048}, {Dimension::dynamic(), Dimension::dynamic()}}; @@ -467,7 +467,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues3 namespace testValues4 { -const std::vector inputShapes = {PartialShape::dynamic()}; +const std::vector inputShapes = {PartialShape::dynamic()}; std::vector testValues = { {LayerTransformation::createParamsU8I8(), diff --git a/src/common/low_precision_transformations/tests/max_pool_transformation.cpp b/src/common/low_precision_transformations/tests/max_pool_transformation.cpp index 1a4c1d9c040..ca69859e232 100644 --- a/src/common/low_precision_transformations/tests/max_pool_transformation.cpp +++ b/src/common/low_precision_transformations/tests/max_pool_transformation.cpp @@ -9,9 +9,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/max_pool.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -47,13 +47,13 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, MaxPoolTransformationTestValues> MaxPoolTransformationParams; class MaxPoolTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape shape = std::get<0>(GetParam()); + const ov::PartialShape shape = std::get<0>(GetParam()); const MaxPoolTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = ngraph::builder::subgraph::MaxPoolFunction::get( @@ -64,7 +64,7 @@ public: testValues.actual.dequantization2); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::MaxPoolFunction::get( @@ -76,7 +76,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape shape = std::get<0>(obj.param); + const ov::PartialShape shape = std::get<0>(obj.param); const MaxPoolTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -99,7 +99,7 @@ TEST_P(MaxPoolTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 72, 48 }, { 4, 3, 72, 48 }, { -1, -1, -1, -1 }, @@ -238,7 +238,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector shapesWithDynamicChannels = { +const std::vector shapesWithDynamicChannels = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/move_dequantization_after_transformation.cpp b/src/common/low_precision_transformations/tests/move_dequantization_after_transformation.cpp index 489972b884a..fe45e0480df 100644 --- a/src/common/low_precision_transformations/tests/move_dequantization_after_transformation.cpp +++ b/src/common/low_precision_transformations/tests/move_dequantization_after_transformation.cpp @@ -11,9 +11,9 @@ #include #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/network_helper.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/move_dequantization_after_function.hpp" @@ -62,8 +62,8 @@ public: testValues.actual.dequantization); const auto targetNode = actualFunction->get_output_op(0)->get_input_node_shared_ptr(0); - const auto dequantization = ngraph::pass::low_precision::NetworkHelper::getDequantization(targetNode); - ngraph::pass::low_precision::NetworkHelper::moveDequantizationAfter( + const auto dequantization = ov::pass::low_precision::NetworkHelper::getDequantization(targetNode); + ov::pass::low_precision::NetworkHelper::moveDequantizationAfter( targetNode, dequantization, testValues.updatePrecision, diff --git a/src/common/low_precision_transformations/tests/move_fake_quantize_transformation.cpp b/src/common/low_precision_transformations/tests/move_fake_quantize_transformation.cpp index 4439a99e2b3..2a71b357f70 100644 --- a/src/common/low_precision_transformations/tests/move_fake_quantize_transformation.cpp +++ b/src/common/low_precision_transformations/tests/move_fake_quantize_transformation.cpp @@ -4,15 +4,15 @@ #include -#include -#include -#include -#include +#include "low_precision/concat.hpp" +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/low_precision.hpp" +#include "low_precision/relu.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include #include "common_test_utils/ov_test_utils.hpp" @@ -97,7 +97,7 @@ inline std::ostream& operator<<(std::ostream& out, const MoveFakeQuantizeTransfo } typedef std:: - tuple, MoveFakeQuantizeTransformationTestValues, bool> + tuple, MoveFakeQuantizeTransformationTestValues, bool> MoveFakeQuantizeTransformationParams; class MoveFakeQuantizeTransformation : public LayerTransformation, @@ -105,7 +105,7 @@ class MoveFakeQuantizeTransformation : public LayerTransformation, public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - std::vector inputShapes = std::get<1>(GetParam()); + std::vector inputShapes = std::get<1>(GetParam()); // const auto shape = std::get<1>(GetParam()); MoveFakeQuantizeTransformationTestValues testValues = std::get<2>(GetParam()); const bool oneInputWithSplit = std::get<3>(GetParam()); @@ -115,7 +115,7 @@ public: testValues.actual.dequantizationBefore.multiply.outPrecision = precision; } - ngraph::IntervalsAlignmentSharedValue::Interval interval{-1.28f, 2.55f}; + ov::IntervalsAlignmentSharedValue::Interval interval{-1.28f, 2.55f}; actualFunction = ngraph::builder::subgraph::MoveFakeQuantize::get(precision, inputShapes, @@ -127,26 +127,26 @@ public: testValues.actual.fakeQuantizeAfter, testValues.actual.convertAfter, testValues.actual.dequantizationAfter, - {ngraph::PrecisionPreservedAttribute(true), - ngraph::IntervalsAlignmentAttribute(interval, 256), - ngraph::QuantizationAlignmentAttribute(false)}, + {ov::PrecisionPreservedAttribute(true), + ov::IntervalsAlignmentAttribute(interval, 256), + ov::QuantizationAlignmentAttribute(false)}, ov::element::undefined, testValues.axis, oneInputWithSplit); - auto supportedPrecisionsOnActivation = std::vector( - {ngraph::pass::low_precision::PrecisionsRestriction::create( + auto supportedPrecisionsOnActivation = std::vector( + {ov::pass::low_precision::PrecisionsRestriction::create( {{{0}, testValues.params.precisionsOnActivations}})}); auto quantizationRestrictions = testValues.multiChannels - ? std::vector() - : std::vector( - {ngraph::pass::low_precision::QuantizationGranularityRestriction::create()}); + ? std::vector() + : std::vector( + {ov::pass::low_precision::QuantizationGranularityRestriction::create()}); const auto params = TestTransformationParams::toParams(testValues.params); ov::pass::Manager manager; - manager.register_pass(params); + manager.register_pass(params); manager.run_passes(actualFunction); // dequantization output precision depends on input precision @@ -171,16 +171,16 @@ public: testValues.result.fakeQuantizeAfter, testValues.result.convertAfter, testValues.result.dequantizationAfter, - {ngraph::PrecisionPreservedAttribute(true), - ngraph::IntervalsAlignmentAttribute(interval, 256), - ngraph::QuantizationAlignmentAttribute(false)}, + {ov::PrecisionPreservedAttribute(true), + ov::IntervalsAlignmentAttribute(interval, 256), + ov::QuantizationAlignmentAttribute(false)}, testValues.result.precisionAfterOperation, testValues.axis, oneInputWithSplit); } static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const std::vector shape = std::get<1>(obj.param); + const std::vector shape = std::get<1>(obj.param); const MoveFakeQuantizeTransformationTestValues testValues = std::get<2>(obj.param); const bool oneInputWithSplit = std::get<3>(obj.param); @@ -200,14 +200,14 @@ TEST_P(MoveFakeQuantizeTransformation, CompareFunctions) { ASSERT_TRUE(LayerTransformation::allNamesAreUnique(actualFunction)) << "Not all names are unique"; const auto actualFakeQuantizes = LayerTransformation::get(actualFunction); - ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) - << "ngraph::PrecisionsAttribute are not the same"; + ASSERT_TRUE(checkIfOutputAttributesSharedValuesAreTheSame(actualFakeQuantizes)) + << "ov::PrecisionsAttribute are not the same"; } const std::vector precisions = {ov::element::f32, ov::element::f16}; namespace perTensorValues { -const std::vector> shapes = {{{1, 1, 9, 9}, {1, 1, 9, 9}}, +const std::vector> shapes = {{{1, 1, 9, 9}, {1, 1, 9, 9}}, {{4, 3, 9, 9}, {4, 3, 9, 9}}, {{-1, -1, -1, -1}, {-1, -1, -1, -1}}}; @@ -334,7 +334,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, namespace perChannelValues { const std::vector precisions = {ov::element::f32, ov::element::f16}; -const std::vector> shapes = { +const std::vector> shapes = { {{1, 1, 224, 224}, {1, 2, 224, 224}}, {{4, 1, 9, 9}, {4, 2, 9, 9}}, {{-1, 1, -1, -1}, {-1, 2, -1, -1}}, @@ -444,7 +444,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, namespace testValues3 { const std::vector precisions = {ov::element::f32, ov::element::f16}; -const std::vector> shapes = {{{1, 1}, {1, 2}}, {{4, 1}, {4, 2}}}; +const std::vector> shapes = {{{1, 1}, {1, 2}}, {{4, 1}, {4, 2}}}; const std::vector testValues = { // 2D shape {LayerTransformation::createParamsU8I8(), @@ -489,7 +489,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, namespace NegativeTestValues { const std::vector precisions = {ov::element::f32}; -const std::vector> shapes = { +const std::vector> shapes = { {{-1, -1, -1, -1}, {-1, -1, -1, -1}}, }; const std::vector testValues = { diff --git a/src/common/low_precision_transformations/tests/multiply_to_group_convolution_transformation.cpp b/src/common/low_precision_transformations/tests/multiply_to_group_convolution_transformation.cpp index ae13c2d0c6e..606cdea8041 100644 --- a/src/common/low_precision_transformations/tests/multiply_to_group_convolution_transformation.cpp +++ b/src/common/low_precision_transformations/tests/multiply_to_group_convolution_transformation.cpp @@ -10,8 +10,8 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "low_precision/multiply_to_group_convolution.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -40,7 +40,7 @@ public: ngraph::builder::subgraph::DequantizationOperations dequantization; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; TestTransformationParams params; bool transformed; bool haveMultiplyWithNoConstBeforeDequantization; @@ -61,15 +61,15 @@ public: testValues.actual.dequantization, testValues.haveMultiplyWithNoConstBeforeDequantization); - auto precisionRestrictions = std::vector({ - ngraph::pass::low_precision::PrecisionsRestriction::create({ + auto precisionRestrictions = std::vector({ + ov::pass::low_precision::PrecisionsRestriction::create({ {{0}, {ov::element::u8}}, {{1}, {ov::element::i8}} }) }); SimpleLowPrecisionTransformer transformer(precisionRestrictions); - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); if (testValues.transformed) { diff --git a/src/common/low_precision_transformations/tests/multiply_transformation.cpp b/src/common/low_precision_transformations/tests/multiply_transformation.cpp index 31544759323..f8925c75c9e 100644 --- a/src/common/low_precision_transformations/tests/multiply_transformation.cpp +++ b/src/common/low_precision_transformations/tests/multiply_transformation.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "low_precision/multiply.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -55,7 +55,7 @@ public: actualFunction = MultiplyFunction::get(precision, testParams.actual); SimpleLowPrecisionTransformer transform; - transform.add(testParams.transformationParams); + transform.add(testParams.transformationParams); transform.transform(actualFunction); referenceFunction = MultiplyFunction::get(precision, testParams.expected); diff --git a/src/common/low_precision_transformations/tests/mvn_transformation.cpp b/src/common/low_precision_transformations/tests/mvn_transformation.cpp index 52efb24903c..61813994435 100644 --- a/src/common/low_precision_transformations/tests/mvn_transformation.cpp +++ b/src/common/low_precision_transformations/tests/mvn_transformation.cpp @@ -10,8 +10,8 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" #include "low_precision/mvn.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -50,7 +50,7 @@ public: typedef std::tuple< ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, MVNTransformationTestValues, int > MVNTransformationParams; @@ -59,7 +59,7 @@ class MVNTransformation : public LayerTransformation, public testing::WithParamI public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const ngraph::PartialShape inputShape = std::get<1>(GetParam()); + const ov::PartialShape inputShape = std::get<1>(GetParam()); const MVNTransformationTestValues testValues = std::get<2>(GetParam()); const int opset_version = std::get<3>(GetParam()); @@ -73,7 +73,7 @@ public: opset_version); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::MVNFunction::getReference( @@ -90,7 +90,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const ngraph::PartialShape inputShape = std::get<1>(obj.param); + const ov::PartialShape inputShape = std::get<1>(obj.param); const MVNTransformationTestValues testValues = std::get<2>(obj.param); const int opset_version = std::get<3>(obj.param); @@ -128,7 +128,7 @@ const std::vector opset_version = { }; namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { { 1, 4, 16, 16 }, { -1, -1, -1, -1 }, }; @@ -268,7 +268,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapes = { +const std::vector inputShapes = { { 1, 2, 2, 2 }, { -1, -1, -1, -1} }; @@ -334,7 +334,7 @@ INSTANTIATE_TEST_SUITE_P( namespace testValues3 { -const std::vector inputShapesWithDynamicRank = { +const std::vector inputShapesWithDynamicRank = { PartialShape::dynamic(), }; diff --git a/src/common/low_precision_transformations/tests/normalize_dequantization_transformation.cpp b/src/common/low_precision_transformations/tests/normalize_dequantization_transformation.cpp index a6d919cf1e0..9afc867971a 100644 --- a/src/common/low_precision_transformations/tests/normalize_dequantization_transformation.cpp +++ b/src/common/low_precision_transformations/tests/normalize_dequantization_transformation.cpp @@ -9,10 +9,10 @@ #include -#include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "openvino/opsets/opset1.hpp" +#include "low_precision/network_helper.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -51,8 +51,8 @@ public: testValues.actual.dequantization); const auto targetNode = actualFunction->get_output_op(0)->get_input_node_shared_ptr(0); - const auto dequantization = ngraph::pass::low_precision::NetworkHelper::getDequantization(targetNode); - ngraph::pass::low_precision::NetworkHelper::normalizeDequantization(dequantization); + const auto dequantization = ov::pass::low_precision::NetworkHelper::getDequantization(targetNode); + ov::pass::low_precision::NetworkHelper::normalizeDequantization(dequantization); referenceFunction = ngraph::builder::subgraph::NormalizeDequantizationFunction::getOriginal( testValues.expected.precisionBeforeDequantization, diff --git a/src/common/low_precision_transformations/tests/normalize_l2_transformation.cpp b/src/common/low_precision_transformations/tests/normalize_l2_transformation.cpp index 23e4816aafa..f4e429ca445 100644 --- a/src/common/low_precision_transformations/tests/normalize_l2_transformation.cpp +++ b/src/common/low_precision_transformations/tests/normalize_l2_transformation.cpp @@ -10,9 +10,9 @@ #include -#include +#include "transformations/utils/utils.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "low_precision/normalize_l2.hpp" #include "common_test_utils/ov_test_utils.hpp" @@ -46,7 +46,7 @@ public: typedef std::tuple< ov::element::Type, - ngraph::PartialShape, + ov::PartialShape, ngraph::op::EpsMode, std::vector, NormalizeL2TransformationTestValues> NormalizeL2TransformationParams; @@ -55,7 +55,7 @@ class NormalizeL2Transformation : public LayerTransformation, public testing::Wi public: void SetUp() override { ov::element::Type precision; - ngraph::PartialShape shape; + ov::PartialShape shape; ngraph::op::EpsMode epsMode; std::vector axes; NormalizeL2TransformationTestValues params; @@ -70,7 +70,7 @@ public: params.actual.dequantization); SimpleLowPrecisionTransformer transform; - transform.add(params.transformationParams); + transform.add(params.transformationParams); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::NormalizeL2Function::getReference( @@ -86,7 +86,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { ov::element::Type precision; - ngraph::PartialShape shape; + ov::PartialShape shape; ov::Shape axes; ngraph::op::EpsMode epsMode; NormalizeL2TransformationTestValues params; @@ -126,7 +126,7 @@ std::vector> axes = { }; namespace testValues1 { -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 16, 16 }, { -1, -1, -1, -1} }; @@ -273,7 +273,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector shapesWithDynamicChannels = { +const std::vector shapesWithDynamicChannels = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/pad_transformation.cpp b/src/common/low_precision_transformations/tests/pad_transformation.cpp index 786724c2ca7..fd5c8eacd98 100644 --- a/src/common/low_precision_transformations/tests/pad_transformation.cpp +++ b/src/common/low_precision_transformations/tests/pad_transformation.cpp @@ -7,9 +7,9 @@ #include #include #include -#include -#include + +#include "low_precision/pad.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -44,7 +44,7 @@ public: }; typedef std::tuple < - ngraph::PartialShape, // input Shape + ov::PartialShape, // input Shape std::pair, std::vector>, // pads begin, pads end ngraph::op::PadMode, // pads mode float, // pads value (used if mode == CONSTANT) @@ -53,7 +53,7 @@ typedef std::tuple < class PadTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const auto pads = std::get<1>(GetParam()); const ngraph::op::PadMode padsMode = std::get<2>(GetParam()); const float padsValue = std::get<3>(GetParam()); @@ -74,7 +74,7 @@ public: { {}, {}, {} }); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::PadFunction::get( @@ -90,7 +90,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const auto pads = std::get<1>(obj.param); const ngraph::op::PadMode padsMode = std::get<2>(obj.param); const float padsValue = std::get<3>(obj.param); @@ -121,7 +121,7 @@ TEST_P(PadTransformation, CompareFunctions) { ASSERT_TRUE(LayerTransformation::allNamesAreUnique(actualFunction)) << "Not all names are unique"; } -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 3, 6, 6}, {4, 3, 6, 6}, {-1, 3, 6, -1} @@ -136,7 +136,7 @@ const std::pair, std::vector> padsBySpatialDimen // (per-tensor & per-channel quantizations without subtracts, pads by spatial dimensions) // and test-case without dequantization namespace commonTestCases { -const std::vector commonInputShapes = { +const std::vector commonInputShapes = { {4, 3, 6, 6}, {-1, -1, -1, -1} }; @@ -715,8 +715,8 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testCasesForSymetricMode namespace testCasesWithDynamicRank { -const std::vector inputShapesWithDynamicRank = { - ngraph::PartialShape::dynamic() +const std::vector inputShapesWithDynamicRank = { + ov::PartialShape::dynamic() }; std::vector allModes = { diff --git a/src/common/low_precision_transformations/tests/precision_details_test.cpp b/src/common/low_precision_transformations/tests/precision_details_test.cpp index 859ebe7347c..f0c158f4d00 100644 --- a/src/common/low_precision_transformations/tests/precision_details_test.cpp +++ b/src/common/low_precision_transformations/tests/precision_details_test.cpp @@ -11,7 +11,7 @@ using namespace ::testing; using namespace std; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; class PrecisionDetailsTests : public ::testing::Test { protected: diff --git a/src/common/low_precision_transformations/tests/prelu_transformation.cpp b/src/common/low_precision_transformations/tests/prelu_transformation.cpp index a645704a070..2315b94e269 100644 --- a/src/common/low_precision_transformations/tests/prelu_transformation.cpp +++ b/src/common/low_precision_transformations/tests/prelu_transformation.cpp @@ -4,12 +4,12 @@ #include -#include +#include "low_precision/prelu.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -44,7 +44,7 @@ public: Expected expected; }; -typedef std::tuple PReluTransformationParams; +typedef std::tuple PReluTransformationParams; class PReluTransformation : public LayerTransformation, public testing::WithParamInterface { public: @@ -58,7 +58,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = @@ -94,7 +94,7 @@ TEST_P(PReluTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector shapes = {{1, 3, 16, 16}, {-1, -1, -1, -1}, {1, 1, 2, 3, 4, 16}, {5}}; +const std::vector shapes = {{1, 3, 16, 16}, {-1, -1, -1, -1}, {1, 1, 2, 3, 4, 16}, {5}}; const std::vector testValues = { // U8: no subtract @@ -122,7 +122,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector shapesWithDynamicRank = {PartialShape::dynamic()}; +const std::vector shapesWithDynamicRank = {PartialShape::dynamic()}; const std::vector testValues = { {LayerTransformation::createParamsU8I8(), diff --git a/src/common/low_precision_transformations/tests/pull_reshape_through_dequantization_transformation.cpp b/src/common/low_precision_transformations/tests/pull_reshape_through_dequantization_transformation.cpp index 9f43ae1f9c4..efc757c7557 100644 --- a/src/common/low_precision_transformations/tests/pull_reshape_through_dequantization_transformation.cpp +++ b/src/common/low_precision_transformations/tests/pull_reshape_through_dequantization_transformation.cpp @@ -4,14 +4,14 @@ #include -#include -#include +#include "low_precision/pull_reshape_through_dequantization.hpp" +#include "low_precision/pull_transpose_through_dequantization.hpp" #include #include #include -#include -#include -#include +#include "transformations/common_optimizations/lin_op_sequence_fusion.hpp" +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -89,8 +89,8 @@ public: ov::pass::Manager manager; auto decomp = manager.register_pass(); const std::vector supportedTypes = {ov::element::i8, ov::element::u8}; - decomp->add_matcher(supportedTypes); - decomp->add_matcher(supportedTypes); + decomp->add_matcher(supportedTypes); + decomp->add_matcher(supportedTypes); decomp->add_matcher(); manager.run_passes(actualFunction); diff --git a/src/common/low_precision_transformations/tests/pull_transpose_through_dequantization_transformation.cpp b/src/common/low_precision_transformations/tests/pull_transpose_through_dequantization_transformation.cpp index b6d312f1361..722023f7b15 100644 --- a/src/common/low_precision_transformations/tests/pull_transpose_through_dequantization_transformation.cpp +++ b/src/common/low_precision_transformations/tests/pull_transpose_through_dequantization_transformation.cpp @@ -4,14 +4,14 @@ #include -#include -#include +#include "low_precision/pull_reshape_through_dequantization.hpp" +#include "low_precision/pull_transpose_through_dequantization.hpp" #include #include #include -#include -#include -#include +#include "transformations/common_optimizations/lin_op_sequence_fusion.hpp" +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -82,8 +82,8 @@ public: ov::pass::Manager manager; auto decomp = manager.register_pass(); const std::vector supportedTypes = {ov::element::i8, ov::element::u8}; - decomp->add_matcher(supportedTypes); - decomp->add_matcher(supportedTypes); + decomp->add_matcher(supportedTypes); + decomp->add_matcher(supportedTypes); decomp->add_matcher(); manager.run_passes(actualFunction); diff --git a/src/common/low_precision_transformations/tests/quantization_granularity_restriction_test.cpp b/src/common/low_precision_transformations/tests/quantization_granularity_restriction_test.cpp index dd4c06fef92..70ac76d08c4 100644 --- a/src/common/low_precision_transformations/tests/quantization_granularity_restriction_test.cpp +++ b/src/common/low_precision_transformations/tests/quantization_granularity_restriction_test.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "low_precision/common/port_quantization_granularity_restriction.hpp" +#include "low_precision/common/quantization_granularity_restriction.hpp" +#include "low_precision/markup_quantization_granularity.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/convolution_function.hpp" @@ -23,7 +23,7 @@ using namespace ov::pass; class OperationQuantizationRestrictionTestValues { public: - std::vector restrictions; + std::vector restrictions; }; typedef std::tuple< @@ -52,12 +52,12 @@ public: { 255ul, Shape({ 1, 1, 1, 1 }), { 0.f }, { 254.f }, { -1.27f }, { 1.27f } }); ov::pass::Manager manager; - const auto quantizationRestrictions = std::vector({ + const auto quantizationRestrictions = std::vector({ explicitly ? - ngraph::pass::low_precision::QuantizationGranularityRestriction::create(testValues.restrictions, false) : - ngraph::pass::low_precision::QuantizationGranularityRestriction::create(ports) + ov::pass::low_precision::QuantizationGranularityRestriction::create(testValues.restrictions, false) : + ov::pass::low_precision::QuantizationGranularityRestriction::create(ports) }); - manager.register_pass(quantizationRestrictions); + manager.register_pass(quantizationRestrictions); manager.run_passes(actualFunction); referenceFunction = ngraph::builder::subgraph::ConvolutionFunction::get( @@ -89,10 +89,10 @@ const std::vector testValues = { {} }, { - {{0, ngraph::QuantizationGranularityAttribute::Granularity::PerTensor}} + {{0, ov::QuantizationGranularityAttribute::Granularity::PerTensor}} }, { - {{0, ngraph::QuantizationGranularityAttribute::Granularity::PerTensor}, {1, ngraph::QuantizationGranularityAttribute::Granularity::PerChannel}} + {{0, ov::QuantizationGranularityAttribute::Granularity::PerTensor}, {1, ov::QuantizationGranularityAttribute::Granularity::PerChannel}} } }; diff --git a/src/common/low_precision_transformations/tests/recurrent_cell_transformation.cpp b/src/common/low_precision_transformations/tests/recurrent_cell_transformation.cpp index 7303e9734f2..d225a7b0bc9 100644 --- a/src/common/low_precision_transformations/tests/recurrent_cell_transformation.cpp +++ b/src/common/low_precision_transformations/tests/recurrent_cell_transformation.cpp @@ -4,15 +4,15 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "low_precision/common/precisions_restriction.hpp" +#include "low_precision/recurrent_cell.hpp" +#include "low_precision/fold_convert.hpp" +#include "low_precision/fuse_convert.hpp" +#include "low_precision/fuse_multiply_to_fake_quantize.hpp" +#include "low_precision/fuse_subtract_to_fake_quantize.hpp" +#include "low_precision/rt_info/intervals_alignment_attribute.hpp" +#include "low_precision/rt_info/precision_preserved_attribute.hpp" +#include "low_precision/rt_info/quantization_alignment_attribute.hpp" #include #include #include @@ -23,7 +23,7 @@ #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/recurrent_cell_function.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "openvino/opsets/opset5.hpp" using namespace testing; using namespace ov; @@ -81,14 +81,14 @@ inline std::ostream& operator<<(std::ostream& out, const RecurrentCellTransforma return out << "_" << values.actual << "_" << values.result; } -typedef std::tuple, std::vector, RecurrentCellTransformationTestValues> +typedef std::tuple, std::vector, RecurrentCellTransformationTestValues> RecurrentCellTransformationParams; class RecurrentCellTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { const ov::element::Type precision = std::get<0>(GetParam()); - const std::vector activations_shapes = std::get<1>(GetParam()); + const std::vector activations_shapes = std::get<1>(GetParam()); const std::vector weights_shapes = std::get<2>(GetParam()); RecurrentCellTransformationTestValues testValues = std::get<3>(GetParam()); @@ -118,14 +118,14 @@ public: const auto params = TestTransformationParams::toParams(testValues.params); SimpleLowPrecisionTransformer transformer; - transformer.commonGraphRewrite->add_matcher(params); + transformer.commonGraphRewrite->add_matcher(params); transformer.transform(actualFunction); SimpleLowPrecisionTransformer clenup_transformer; - clenup_transformer.commonGraphRewrite->add_matcher(params); - clenup_transformer.commonGraphRewrite->add_matcher(params); - clenup_transformer.commonGraphRewrite->add_matcher(params); - clenup_transformer.commonGraphRewrite->add_matcher(params); + clenup_transformer.commonGraphRewrite->add_matcher(params); + clenup_transformer.commonGraphRewrite->add_matcher(params); + clenup_transformer.commonGraphRewrite->add_matcher(params); + clenup_transformer.commonGraphRewrite->add_matcher(params); clenup_transformer.transform(actualFunction); // dequantization output precision depends on input precision @@ -161,7 +161,7 @@ public: static std::string getTestCaseName(testing::TestParamInfo obj) { const ov::element::Type precision = std::get<0>(obj.param); - const std::vector activations_shapes = std::get<1>(obj.param); + const std::vector activations_shapes = std::get<1>(obj.param); const std::vector weights_shapes = std::get<2>(obj.param); const RecurrentCellTransformationTestValues testValues = std::get<3>(obj.param); @@ -186,7 +186,7 @@ const std::vector precisions = { }; namespace testValues2 { -const std::vector> activations_shapes = {{{1, 1, 16}, {1, 1, 128}, {1, 1, 128}}}; +const std::vector> activations_shapes = {{{1, 1, 16}, {1, 1, 128}, {1, 1, 128}}}; const std::vector> weights_shapes = {{{1, 512, 16}, {1, 512, 128}, {1, 512}}}; @@ -268,7 +268,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues2 namespace testValues3 { -const std::vector> activations_shapes = {{{1, 2, 3}, {1, 1, 3}, {}}}; +const std::vector> activations_shapes = {{{1, 2, 3}, {1, 1, 3}, {}}}; const std::vector> weights_shapes = {{{1, 9, 3}, {1, 9, 3}, {1, 9}}}; diff --git a/src/common/low_precision_transformations/tests/reduce_max_transformation.cpp b/src/common/low_precision_transformations/tests/reduce_max_transformation.cpp index 6f91d37e39f..5dcbdb88a35 100644 --- a/src/common/low_precision_transformations/tests/reduce_max_transformation.cpp +++ b/src/common/low_precision_transformations/tests/reduce_max_transformation.cpp @@ -11,12 +11,12 @@ #include #include -#include +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "low_precision/reduce_max.hpp" #include "lpt_ngraph_functions/reduce_function.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" #include "lpt_ngraph_functions/common/constant.hpp" @@ -33,7 +33,7 @@ class ReduceMaxTransformation : public ReduceTransformation(GetParam()).params; SimpleLowPrecisionTransformer transform; - transform.add(transformationParams); + transform.add(transformationParams); transform.transform(actualFunction); } }; @@ -47,7 +47,7 @@ TEST_P(ReduceMaxTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 3, 16, 16}, {4, 3, 16, 16}, {-1, -1, -1, -1} @@ -314,7 +314,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesWithDynamicRank = { +const std::vector inputShapesWithDynamicRank = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/reduce_mean_transformation.cpp b/src/common/low_precision_transformations/tests/reduce_mean_transformation.cpp index 0742b44f450..a1443c3e26b 100644 --- a/src/common/low_precision_transformations/tests/reduce_mean_transformation.cpp +++ b/src/common/low_precision_transformations/tests/reduce_mean_transformation.cpp @@ -11,12 +11,12 @@ #include #include -#include +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "low_precision/reduce_mean.hpp" #include "lpt_ngraph_functions/reduce_function.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" #include "lpt_ngraph_functions/common/constant.hpp" @@ -33,7 +33,7 @@ class ReduceMeanTransformation : public ReduceTransformation(GetParam()).params; SimpleLowPrecisionTransformer transform; - transform.add(transformationParams); + transform.add(transformationParams); transform.transform(actualFunction); } }; @@ -47,7 +47,7 @@ TEST_P(ReduceMeanTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 3, 16, 16}, {4, 3, 16, 16}, {-1, -1, -1, -1} @@ -282,7 +282,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesWithDynamicRank = { +const std::vector inputShapesWithDynamicRank = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/reduce_min_transformation.cpp b/src/common/low_precision_transformations/tests/reduce_min_transformation.cpp index 90aa35868b7..f31305e96f7 100644 --- a/src/common/low_precision_transformations/tests/reduce_min_transformation.cpp +++ b/src/common/low_precision_transformations/tests/reduce_min_transformation.cpp @@ -11,12 +11,12 @@ #include #include -#include +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "low_precision/reduce_min.hpp" #include "lpt_ngraph_functions/reduce_function.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" #include "lpt_ngraph_functions/common/constant.hpp" @@ -33,7 +33,7 @@ class ReduceMinTransformation : public ReduceTransformation(GetParam()).params; SimpleLowPrecisionTransformer transform; - transform.add(transformationParams); + transform.add(transformationParams); transform.transform(actualFunction); } }; @@ -47,7 +47,7 @@ TEST_P(ReduceMinTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 3, 16, 16}, {4, 3, 16, 16}, {-1, -1, -1, -1} @@ -314,7 +314,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesWithDynamicRank = { +const std::vector inputShapesWithDynamicRank = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/reduce_sum_transformation.cpp b/src/common/low_precision_transformations/tests/reduce_sum_transformation.cpp index ecd9d23dbd6..cfe745016b7 100644 --- a/src/common/low_precision_transformations/tests/reduce_sum_transformation.cpp +++ b/src/common/low_precision_transformations/tests/reduce_sum_transformation.cpp @@ -11,12 +11,12 @@ #include #include -#include +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" -#include +#include "low_precision/reduce_sum.hpp" #include "lpt_ngraph_functions/reduce_function.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" #include "lpt_ngraph_functions/common/constant.hpp" @@ -33,7 +33,7 @@ class ReduceSumTransformation : public ReduceTransformation(GetParam()).params; SimpleLowPrecisionTransformer transform; - transform.add(transformationParams); + transform.add(transformationParams); transform.transform(actualFunction); } }; @@ -47,7 +47,7 @@ TEST_P(ReduceSumTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 3, 16, 16}, {4, 3, 16, 16}, {-1, -1, 16, 16} @@ -306,7 +306,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesWithDynamicRank = { +const std::vector inputShapesWithDynamicRank = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/reduce_transformation.hpp b/src/common/low_precision_transformations/tests/reduce_transformation.hpp index a7dfcb14f38..f81c06e9d19 100644 --- a/src/common/low_precision_transformations/tests/reduce_transformation.hpp +++ b/src/common/low_precision_transformations/tests/reduce_transformation.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/reduce_function.hpp" @@ -47,7 +47,7 @@ public: }; typedef std::tuple < - ngraph::PartialShape, + ov::PartialShape, ReduceTransformationTestValues > ReduceTransformationParams; @@ -55,7 +55,7 @@ template class ReduceTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const ReduceTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = ngraph::builder::subgraph::ReduceFunction::getOriginal( @@ -76,7 +76,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const ReduceTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; diff --git a/src/common/low_precision_transformations/tests/relu_transformation.cpp b/src/common/low_precision_transformations/tests/relu_transformation.cpp index a7cdf5a5564..79645125093 100644 --- a/src/common/low_precision_transformations/tests/relu_transformation.cpp +++ b/src/common/low_precision_transformations/tests/relu_transformation.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/relu.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" @@ -47,7 +47,7 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, ReluTransformationTestValues> ReluTransformationParams; class ReluTransformation : public LayerTransformation, public testing::WithParamInterface { @@ -62,7 +62,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ReluFunction::getReference( @@ -101,7 +101,7 @@ TEST_P(ReluTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector shapes = { +const std::vector shapes = { { 1, 3, 16, 16 }, { -1, -1, -1, -1 }, }; @@ -245,7 +245,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector shapesWithDynamicRank = { +const std::vector shapesWithDynamicRank = { PartialShape::dynamic() }; diff --git a/src/common/low_precision_transformations/tests/reshape_transformation.cpp b/src/common/low_precision_transformations/tests/reshape_transformation.cpp index e29e698b8d2..5224d9e4fd0 100644 --- a/src/common/low_precision_transformations/tests/reshape_transformation.cpp +++ b/src/common/low_precision_transformations/tests/reshape_transformation.cpp @@ -4,12 +4,12 @@ #include -#include +#include "low_precision/reshape.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -39,7 +39,7 @@ public: ngraph::builder::subgraph::DequantizationOperations dequantizationAfter; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; std::vector reshapeConstValues; // if empty then create shapeOf TestTransformationParams params; Actual actual; @@ -59,7 +59,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = diff --git a/src/common/low_precision_transformations/tests/round_transformation.cpp b/src/common/low_precision_transformations/tests/round_transformation.cpp index 5385cd57fdb..ec72c7d5d40 100644 --- a/src/common/low_precision_transformations/tests/round_transformation.cpp +++ b/src/common/low_precision_transformations/tests/round_transformation.cpp @@ -36,16 +36,16 @@ public: testValues.inputShape, testValues.actualDequantization); const auto lastNode = actualFunction->get_output_op(0)->get_input_node_shared_ptr(0); - const auto dequantization = ngraph::pass::low_precision::NetworkHelper::getDequantization(lastNode); + const auto dequantization = ov::pass::low_precision::NetworkHelper::getDequantization(lastNode); const auto subtractConstant = dequantization.subtract->get_input_node_shared_ptr(1); const auto roundedConst = - ngraph::pass::low_precision::NetworkHelper::round(subtractConstant, testValues.inputPrecision); + ov::pass::low_precision::NetworkHelper::round(subtractConstant, testValues.inputPrecision); if (roundedConst->get_element_type() == testValues.inputPrecision) { const auto replacement = std::make_shared>(dequantization.data, roundedConst); - ngraph::pass::low_precision::NetworkHelper::copyInfo(dequantization.subtract, replacement); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed( + ov::pass::low_precision::NetworkHelper::copyInfo(dequantization.subtract, replacement); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed( replacement, dequantization.convert->get_element_type()); replace_node(dequantization.subtract, replacement); diff --git a/src/common/low_precision_transformations/tests/separate_in_standalone_branch_transformation.cpp b/src/common/low_precision_transformations/tests/separate_in_standalone_branch_transformation.cpp index 38b40411c0b..16190cd9584 100644 --- a/src/common/low_precision_transformations/tests/separate_in_standalone_branch_transformation.cpp +++ b/src/common/low_precision_transformations/tests/separate_in_standalone_branch_transformation.cpp @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/mat_mul.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/common/builders.hpp" @@ -59,13 +59,13 @@ public: const auto relu = std::make_shared(input); const auto dequantizationsNode = ngraph::builder::subgraph::makeDequantization(relu, dequantizations); - const std::shared_ptr reshape1 = std::make_shared( + const std::shared_ptr reshape1 = std::make_shared( dequantizationsNode, std::make_shared(ov::element::i32, ov::Shape{ 2 }, std::vector({0, -1})), true); reshape1->set_friendly_name("reshape1"); - const std::shared_ptr reshape2 = std::make_shared( + const std::shared_ptr reshape2 = std::make_shared( dequantizationsNode, std::make_shared(ov::element::i32, ov::Shape{ 2 }, std::vector({0, -1})), true); @@ -81,7 +81,7 @@ public: }; actualFunction = createActualFunction(testValues.precisionBefore, shape, testValues.dequantization); const auto result = actualFunction->get_results()[0]; - ngraph::pass::low_precision::NetworkHelper::separateInStandaloneBranch(result->get_input_node_shared_ptr(0)); + ov::pass::low_precision::NetworkHelper::separateInStandaloneBranch(result->get_input_node_shared_ptr(0)); const auto createReferenceFunction = []( const ov::element::Type precision, @@ -90,13 +90,13 @@ public: const std::shared_ptr input = std::make_shared(precision, inputShape); const auto relu = std::make_shared(input); - const std::shared_ptr reshape1 = std::make_shared( + const std::shared_ptr reshape1 = std::make_shared( ngraph::builder::subgraph::makeDequantization(relu, dequantization), std::make_shared(ov::element::i32, ov::Shape{ 2 }, std::vector({0, -1})), true); reshape1->set_friendly_name("reshape1"); - const std::shared_ptr reshape2 = std::make_shared( + const std::shared_ptr reshape2 = std::make_shared( ngraph::builder::subgraph::makeDequantization(relu, dequantization), std::make_shared(ov::element::i32, ov::Shape{ 2 }, std::vector({0, -1})), true); diff --git a/src/common/low_precision_transformations/tests/shuffle_channels_transformation.cpp b/src/common/low_precision_transformations/tests/shuffle_channels_transformation.cpp index 21e02419036..285d84cac30 100644 --- a/src/common/low_precision_transformations/tests/shuffle_channels_transformation.cpp +++ b/src/common/low_precision_transformations/tests/shuffle_channels_transformation.cpp @@ -9,8 +9,8 @@ #include -#include -#include +#include "transformations/utils/utils.hpp" +#include "low_precision/shuffle_channels.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -47,13 +47,13 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, ShuffleChannelsTransformationTestValues> ShuffleChannelsTransformationParams; class ShuffleChannelsTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - ngraph::PartialShape inputShape = std::get<0>(GetParam()); + ov::PartialShape inputShape = std::get<0>(GetParam()); ShuffleChannelsTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = ngraph::builder::subgraph::ShuffleChannelsFunction::getOriginal( @@ -64,7 +64,7 @@ public: testValues.group); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::ShuffleChannelsFunction::getReference( @@ -78,7 +78,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - ngraph::PartialShape inputShape = std::get<0>(obj.param); + ov::PartialShape inputShape = std::get<0>(obj.param); ShuffleChannelsTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -100,7 +100,7 @@ TEST_P(ShuffleChannelsTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes = { +const std::vector inputShapes = { { 1, 3, 8, 10 }, { 4, 3, 8, 10 }, { -1, -1, -1, -1 } @@ -319,8 +319,8 @@ INSTANTIATE_TEST_SUITE_P( } // namespace testValues1 namespace testValues2 { -const std::vector inputShapesWithDynamicRank = { - ngraph::PartialShape::dynamic() +const std::vector inputShapesWithDynamicRank = { + ov::PartialShape::dynamic() }; const std::vector testValues = { diff --git a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp index f1463cffdf4..a805aadb8f4 100644 --- a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp +++ b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp @@ -4,14 +4,14 @@ #include "simple_low_precision_transformer.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include "low_precision/align_quantization_parameters.hpp" +#include "low_precision/layer_transformation.hpp" +#include "low_precision/low_precision.hpp" +#include "low_precision/markup_bias.hpp" +#include "low_precision/markup_can_be_quantized.hpp" +#include "low_precision/markup_quantization_granularity.hpp" +#include "low_precision/transformation_context.hpp" + #include using namespace testing; @@ -20,22 +20,22 @@ using namespace ov::pass; OPENVINO_SUPPRESS_DEPRECATED_START SimpleLowPrecisionTransformer::SimpleLowPrecisionTransformer( - const std::vector& precisionRestrictions, - const std::vector& quantizationRestrictions, + const std::vector& precisionRestrictions, + const std::vector& quantizationRestrictions, const AttributeParameters& params) { auto passConfig = get_pass_config(); // TODO: use one pass manager markup = std::make_shared(passConfig); - markup->register_pass(params.defaultPrecisions); - markup->register_pass(precisionRestrictions, + markup->register_pass(params.defaultPrecisions); + markup->register_pass(precisionRestrictions, params.defaultPrecisions); - markup->register_pass(quantizationRestrictions); - markup->register_pass(params.defaultPrecisions); - markup->register_pass(params); - markup->register_pass(params.defaultPrecisions); - markup->register_pass(params.defaultPrecisions); - markup->register_pass(); + markup->register_pass(quantizationRestrictions); + markup->register_pass(params.defaultPrecisions); + markup->register_pass(params); + markup->register_pass(params.defaultPrecisions); + markup->register_pass(params.defaultPrecisions); + markup->register_pass(); common = std::make_shared(passConfig); commonGraphRewrite = common->register_pass(); @@ -47,7 +47,7 @@ void SimpleLowPrecisionTransformer::transform(std::shared_ptr& model) } bool SimpleLowPrecisionTransformer::run_on_model(const std::shared_ptr& model) { - ngraph::pass::low_precision::TypeRelaxedReplacer pass; + ov::pass::low_precision::TypeRelaxedReplacer pass; pass.run_on_model(model); markup->run_passes(model); diff --git a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp index 3beb10915e8..c0efed9ea0d 100644 --- a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp +++ b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp @@ -6,7 +6,7 @@ #include -#include + #include "layer_transformation.hpp" #include "common_test_utils/test_common.hpp" @@ -17,8 +17,8 @@ class SimpleLowPrecisionTransformer : public ngraph::pass::FunctionPass{ public: SimpleLowPrecisionTransformer( - const std::vector& precisionRestrictions = {}, - const std::vector& quantizationRestrictions = {}, + const std::vector& precisionRestrictions = {}, + const std::vector& quantizationRestrictions = {}, const AttributeParameters& params = AttributeParameters()); template @@ -26,8 +26,8 @@ public: commonGraphRewrite->add_matcher(TestTransformationParams::toParams(params)); } template - void add(const std::shared_ptr function, const TestTransformationParams& params) { - commonGraphRewrite->add_matcher(function, TestTransformationParams::toParams(params)); + void add(const std::shared_ptr model, const TestTransformationParams& params) { + commonGraphRewrite->add_matcher(model, TestTransformationParams::toParams(params)); } void transform(std::shared_ptr& model); diff --git a/src/common/low_precision_transformations/tests/split_transformation.cpp b/src/common/low_precision_transformations/tests/split_transformation.cpp index 716d6d02ce3..39ac426d204 100644 --- a/src/common/low_precision_transformations/tests/split_transformation.cpp +++ b/src/common/low_precision_transformations/tests/split_transformation.cpp @@ -4,10 +4,10 @@ #include -#include +#include "low_precision/split.hpp" #include -#include -#include + +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -36,7 +36,7 @@ public: std::vector dequantizationAfter; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; std::int64_t splitedAxis; size_t numSplits; TestTransformationParams params; @@ -61,7 +61,7 @@ public: testValues.numSplits); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = diff --git a/src/common/low_precision_transformations/tests/squeeze_transformation.cpp b/src/common/low_precision_transformations/tests/squeeze_transformation.cpp index d06639f0d6c..91f0bff5381 100644 --- a/src/common/low_precision_transformations/tests/squeeze_transformation.cpp +++ b/src/common/low_precision_transformations/tests/squeeze_transformation.cpp @@ -9,9 +9,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/squeeze.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -40,7 +40,7 @@ public: ngraph::builder::subgraph::DequantizationOperations dequantizationAfter; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; std::vector axes; TestTransformationParams params; Actual actual; @@ -59,7 +59,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); diff --git a/src/common/low_precision_transformations/tests/strided_slice_transformation.cpp b/src/common/low_precision_transformations/tests/strided_slice_transformation.cpp index be0b5590297..c91987fd37d 100644 --- a/src/common/low_precision_transformations/tests/strided_slice_transformation.cpp +++ b/src/common/low_precision_transformations/tests/strided_slice_transformation.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -60,13 +60,13 @@ public: }; typedef std::tuple< - ngraph::PartialShape, + ov::PartialShape, StridedSliceTransformationTestValues> StridedSliceTransformationParams; class StridedSliceTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const StridedSliceTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = ngraph::builder::subgraph::StridedSliceFunction::getOriginal( @@ -83,7 +83,7 @@ public: testValues.layerParams.elipsisMask); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::StridedSliceFunction::getReference( @@ -103,7 +103,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const StridedSliceTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -193,7 +193,7 @@ StridedSliceTransformationTestValues::LayerParams sliceWithAdditionalAxis = { { 0, 0, 0, 0 } // elipsisMask }; -const std::vector inputShapes = { +const std::vector inputShapes = { {1, 3, 24, 24}, {-1, -1, -1, -1} }; @@ -553,7 +553,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace inputs_4d namespace inputs_4d_spatial { -const std::vector inputShapes = { +const std::vector inputShapes = { { -1, -1, -1, -1 }, { 1, 3, 4, 4 } }; @@ -594,7 +594,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace inputs_4d_spatial namespace dynamic_inputs { -const std::vector inputShapesWithDynamicChannels = { +const std::vector inputShapesWithDynamicChannels = { PartialShape::dynamic() }; @@ -641,7 +641,7 @@ INSTANTIATE_TEST_SUITE_P( } // namespace dynamic_inputs namespace inputs_3d { -const std::vector inputShapes = { +const std::vector inputShapes = { { 1, 3, 4 }, { 1, -1, 4 } }; diff --git a/src/common/low_precision_transformations/tests/subgraph/src/fq_decomposition_with_shared_constants.cpp b/src/common/low_precision_transformations/tests/subgraph/src/fq_decomposition_with_shared_constants.cpp index 2d550ad313e..a2f590542e2 100644 --- a/src/common/low_precision_transformations/tests/subgraph/src/fq_decomposition_with_shared_constants.cpp +++ b/src/common/low_precision_transformations/tests/subgraph/src/fq_decomposition_with_shared_constants.cpp @@ -4,8 +4,8 @@ #include -#include -#include +#include "low_precision/fake_quantize_decomposition.hpp" +#include "low_precision/low_precision.hpp" #include #include #include @@ -43,15 +43,15 @@ public: if (addIntervalsAlignment) { addAttributes( {fq_before, fq_after}, - {ngraph::IntervalsAlignmentAttribute(ngraph::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}); - addAttributes({fq_after, relu}, {ngraph::QuantizationAlignmentAttribute(true)}); + {ov::IntervalsAlignmentAttribute(ov::IntervalsAlignmentSharedValue::Interval{0.f, 2.55f}, 256ul)}); + addAttributes({fq_after, relu}, {ov::QuantizationAlignmentAttribute(true)}); } ResultVector results{std::make_shared(relu)}; actualFunction = std::make_shared(results, ParameterVector{input}, "FakeQuantizeFunction"); } SimpleLowPrecisionTransformer transform; - transform.add( + transform.add( LayerTransformation::createParamsU8I8()); transform.transform(actualFunction); diff --git a/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp b/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp index d80dc63c745..4f1a6b3e68e 100644 --- a/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp +++ b/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include "transformations/utils/utils.hpp" // general transformations #include "low_precision/add.hpp" @@ -53,7 +53,7 @@ void getTransformerWithTransformationByName( SimpleLowPrecisionTransformer& transformer, const TestTransformationParams& params, const std::string name) { - using namespace ngraph::pass::low_precision; + using namespace ov::pass::low_precision; if (name == "AddTransformationWithoutConcat" || name == "AddTransformationWithConcat") { transformer.add(params); @@ -96,7 +96,7 @@ void getTransformerWithTransformationByName( return; } if (name == "MVNTransformation") { - transformer.add(params); + transformer.add(params); return; } if (name == "NormalizeL2Transformation") { diff --git a/src/common/low_precision_transformations/tests/transformer_is_function_quantized.cpp b/src/common/low_precision_transformations/tests/transformer_is_function_quantized.cpp index f5cbdd4225f..940a89c027f 100644 --- a/src/common/low_precision_transformations/tests/transformer_is_function_quantized.cpp +++ b/src/common/low_precision_transformations/tests/transformer_is_function_quantized.cpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include "low_precision/fake_quantize.hpp" +#include "low_precision/low_precision.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" @@ -56,7 +56,7 @@ public: TEST_P(TransformerIsFunctionQuantized, isFunctionQuantized) { actualFunction->validate_nodes_and_infer_types(); - const bool isFunctionQuantized = ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(actualFunction); + const bool isFunctionQuantized = ov::pass::low_precision::LowPrecision::isFunctionQuantized(actualFunction); const TestValues testValues = GetParam(); const bool expected = !testValues.fqOnData.empty() || !testValues.fqOnWeights.empty(); diff --git a/src/common/low_precision_transformations/tests/transpose_transformation.cpp b/src/common/low_precision_transformations/tests/transpose_transformation.cpp index f88971bebae..05f6e25facb 100644 --- a/src/common/low_precision_transformations/tests/transpose_transformation.cpp +++ b/src/common/low_precision_transformations/tests/transpose_transformation.cpp @@ -4,12 +4,12 @@ #include -#include +#include "low_precision/transpose.hpp" #include #include #include -#include -#include +#include "transformations/init_node_info.hpp" +#include "transformations/utils/utils.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -44,13 +44,13 @@ public: Expected expected; }; -typedef std::tuple TransposeTransformationParams; +typedef std::tuple TransposeTransformationParams; class TransposeTransformation : public LayerTransformation, public testing::WithParamInterface { public: void SetUp() override { - const ngraph::PartialShape inputShape = std::get<0>(GetParam()); + const ov::PartialShape inputShape = std::get<0>(GetParam()); const TransposeTransformationTestValues testValues = std::get<1>(GetParam()); actualFunction = @@ -60,7 +60,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transformer; - transformer.add(testValues.params); + transformer.add(testValues.params); transformer.transform(actualFunction); referenceFunction = ngraph::builder::subgraph::TransposeFunction::getReference( @@ -73,7 +73,7 @@ public: } static std::string getTestCaseName(testing::TestParamInfo obj) { - const ngraph::PartialShape inputShape = std::get<0>(obj.param); + const ov::PartialShape inputShape = std::get<0>(obj.param); const TransposeTransformationTestValues testValues = std::get<1>(obj.param); std::ostringstream result; @@ -94,7 +94,7 @@ TEST_P(TransposeTransformation, CompareFunctions) { } namespace testValues1 { -const std::vector inputShapes4D = {{1, 3, 16, 16}, {-1, -1, -1, -1}}; +const std::vector inputShapes4D = {{1, 3, 16, 16}, {-1, -1, -1, -1}}; const std::vector testValues = { // U8: per-tensor quantization @@ -172,7 +172,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues1 namespace testValues2 { -const std::vector inputShapes3D = {{1, 16, 512}, {-1, -1, -1}}; +const std::vector inputShapes3D = {{1, 16, 512}, {-1, -1, -1}}; const std::vector testValues = { {{0, 2, 1}, @@ -188,7 +188,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues2 namespace testValues3 { -const std::vector inputShapesWithDynamicRank = {PartialShape::dynamic()}; +const std::vector inputShapesWithDynamicRank = {PartialShape::dynamic()}; const std::vector testValues = { {{0, 1, 3, 2}, @@ -209,7 +209,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_LPT, } // namespace testValues3 namespace testValues4 { -const std::vector inputShapes6D = {{-1, -1, -1, -1, -1, -1}}; +const std::vector inputShapes6D = {{-1, -1, -1, -1, -1, -1}}; const std::vector testValues = { {{0, 1, 2, 3, 4, 5}, diff --git a/src/common/low_precision_transformations/tests/unit/calclulate_levels_test.cpp b/src/common/low_precision_transformations/tests/unit/calclulate_levels_test.cpp index 0b328f6bc2e..6344f22f359 100644 --- a/src/common/low_precision_transformations/tests/unit/calclulate_levels_test.cpp +++ b/src/common/low_precision_transformations/tests/unit/calclulate_levels_test.cpp @@ -22,7 +22,7 @@ size_t calculateLevels(const float dataPrecisionMin, float updatedOutputLowValue; float updatedOutputHighValue; - const auto levels = ngraph::pass::low_precision::NetworkHelper::calculateLevels(dataPrecisionMin, + const auto levels = ov::pass::low_precision::NetworkHelper::calculateLevels(dataPrecisionMin, dataPrecisionMax, combinedIntervalLow, combinedIntervalHigh, @@ -39,13 +39,13 @@ size_t calculateLevels(const float dataPrecisionMin, } // namespace TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_U8_256) { const auto levels = - calculateLevels(0.f, ngraph::pass::low_precision::DataPrecision::getMaxValue(256ul), 0.f, 2.55f, 0.f, 2.55f); + calculateLevels(0.f, ov::pass::low_precision::DataPrecision::getMaxValue(256ul), 0.f, 2.55f, 0.f, 2.55f); ASSERT_EQ(256ul, levels); } TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_I8_256) { const auto levels = calculateLevels(0.f, - ngraph::pass::low_precision::DataPrecision::getMaxValue(256ul), + ov::pass::low_precision::DataPrecision::getMaxValue(256ul), -1.28f, 1.27f, -1.28f, @@ -55,7 +55,7 @@ TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_I8_256) { TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_U8_128) { const auto levels = calculateLevels(0.f, - ngraph::pass::low_precision::DataPrecision::getMaxValue(256ul), + ov::pass::low_precision::DataPrecision::getMaxValue(256ul), 0.f, 2.55f, 0.f, @@ -65,7 +65,7 @@ TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_U8_128) { TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_I8_128) { const auto levels = calculateLevels(0.f, - ngraph::pass::low_precision::DataPrecision::getMaxValue(256ul), + ov::pass::low_precision::DataPrecision::getMaxValue(256ul), -1.28f, 1.27f, -1.28f / 2.f, @@ -75,12 +75,12 @@ TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_I8_128) { TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_0) { const auto levels = - calculateLevels(0.f, ngraph::pass::low_precision::DataPrecision::getMaxValue(256ul), 0.f, 2.55f, 0.f, 0.f); + calculateLevels(0.f, ov::pass::low_precision::DataPrecision::getMaxValue(256ul), 0.f, 2.55f, 0.f, 0.f); ASSERT_EQ(1ul, levels); } TEST(LPT_CalculateLevelsTestTransformation, calculateLevels_3) { const auto levels = - calculateLevels(0.f, ngraph::pass::low_precision::DataPrecision::getMaxValue(256ul), 0.f, 2.55f, 0.f, 0.0255f); + calculateLevels(0.f, ov::pass::low_precision::DataPrecision::getMaxValue(256ul), 0.f, 2.55f, 0.f, 0.0255f); ASSERT_EQ(4ul, levels); } diff --git a/src/common/low_precision_transformations/tests/unit/data_precision_check.cpp b/src/common/low_precision_transformations/tests/unit/data_precision_check.cpp index 86a702e1375..a6ca04227d7 100644 --- a/src/common/low_precision_transformations/tests/unit/data_precision_check.cpp +++ b/src/common/low_precision_transformations/tests/unit/data_precision_check.cpp @@ -5,14 +5,14 @@ #include #include #include -#include -#include +#include "low_precision/layer_transformation.hpp" +#include "low_precision/network_helper.hpp" #include "ngraph_functions/builders.hpp" using namespace ov; TEST(smoke_LPT_DataPrecision, check) { - using namespace ngraph::pass::low_precision; + using namespace ov::pass::low_precision; const std::vector type_items = { element::i4, diff --git a/src/common/low_precision_transformations/tests/unit/layer_transformation_get_data_precision.cpp b/src/common/low_precision_transformations/tests/unit/layer_transformation_get_data_precision.cpp index 1a2e89bd2cd..b7082782a30 100644 --- a/src/common/low_precision_transformations/tests/unit/layer_transformation_get_data_precision.cpp +++ b/src/common/low_precision_transformations/tests/unit/layer_transformation_get_data_precision.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include "low_precision/layer_transformation.hpp" +#include "low_precision/network_helper.hpp" #include "ngraph_functions/builders.hpp" using namespace ov; @@ -17,9 +17,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqU8_U8_to_U8) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{2.55f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); ASSERT_EQ(element::u8, precisionDetails.precision); ASSERT_EQ(0.f, precisionDetails.min); ASSERT_EQ(255.f, precisionDetails.max); @@ -33,9 +33,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqU8_65535_to_U8) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{2.55f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 65535); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); ASSERT_TRUE(precisionDetails.empty()); } @@ -45,10 +45,10 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqI8_I8_to_I8) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{1.27f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); auto const precisionDetails = - ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::i8}); + ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::i8}); ASSERT_EQ(element::i8, precisionDetails.precision); ASSERT_EQ(-128.f, precisionDetails.min); ASSERT_EQ(127.f, precisionDetails.max); @@ -62,9 +62,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqU8_I8_to_U8zp) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{1.27f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); ASSERT_EQ(element::u8, precisionDetails.precision); ASSERT_EQ(0.f, precisionDetails.min); ASSERT_EQ(255.f, precisionDetails.max); @@ -78,9 +78,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqI8_U8_to_I8zp) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{2.55f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::i8}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::i8}); ASSERT_EQ(element::i8, precisionDetails.precision); ASSERT_EQ(-128.f, precisionDetails.min); ASSERT_EQ(127.f, precisionDetails.max); @@ -94,9 +94,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqU8_I8zp_to_U8zp) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{0.882119000f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::u8}); ASSERT_EQ(element::u8, precisionDetails.precision); ASSERT_EQ(0.f, precisionDetails.min); ASSERT_EQ(255.f, precisionDetails.max); @@ -110,9 +110,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqI8_U8zp_to_I8zp) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{0.882119000f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::i8}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {element::i8}); ASSERT_EQ(element::i8, precisionDetails.precision); ASSERT_EQ(-128.f, precisionDetails.min); ASSERT_EQ(127.f, precisionDetails.max); @@ -126,9 +126,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqNone_I8zp_to_undefzp) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{0.882119000f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {}); ASSERT_EQ(element::undefined, precisionDetails.precision); ASSERT_EQ(0.f, precisionDetails.min); ASSERT_EQ(0.f, precisionDetails.max); @@ -142,9 +142,9 @@ TEST(smoke_LPT_LayerTransformation, getDataPrecision_reqNone_U8zp_to_undefzp) { const auto high = std::make_shared(element::f32, Shape{}, std::vector{0.882119000f}); const auto fakeQuantize = std::make_shared(input, low, high, low, high, 256); - auto const dequantization = ngraph::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); + auto const dequantization = ov::pass::low_precision::QuantizationDetails::getDetails(fakeQuantize); - auto const precisionDetails = ngraph::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {}); + auto const precisionDetails = ov::pass::low_precision::LayerTransformation::getDataPrecision(fakeQuantize, dequantization, {}); ASSERT_EQ(element::undefined, precisionDetails.precision); ASSERT_EQ(0.f, precisionDetails.min); ASSERT_EQ(0.f, precisionDetails.max); diff --git a/src/common/low_precision_transformations/tests/unit/reshape_test.cpp b/src/common/low_precision_transformations/tests/unit/reshape_test.cpp index 17307b9a0f7..74e0e8224d7 100644 --- a/src/common/low_precision_transformations/tests/unit/reshape_test.cpp +++ b/src/common/low_precision_transformations/tests/unit/reshape_test.cpp @@ -9,7 +9,7 @@ using LPT_ReshapeTransformation = ::testing::Test; TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perTensor) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({}), ov::Shape({}), ov::Shape({ 1, 3, 4, 5 }), @@ -17,7 +17,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perTensor) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perTensor2) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1 }), ov::Shape({ 1 }), ov::Shape({ 1, 3, 4, 5 }), @@ -25,7 +25,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perTensor2) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perChannels) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3 }), ov::Shape({ 1, 3 }), ov::Shape({ 1, 3, 4, 5 }), @@ -33,7 +33,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perChannels) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perChannels2) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 4, 5 }), @@ -41,7 +41,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perChannels2) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perChannels3) { - ASSERT_FALSE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_FALSE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 4, 5 }), @@ -49,7 +49,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perChannels3) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_spatial) { - ASSERT_FALSE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_FALSE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 4, 1 }), ov::Shape({ 1, 3, 4, 1 }), ov::Shape({ 1, 3, 4, 5 }), @@ -57,7 +57,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_spatial) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perTensor) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({}), ov::Shape({}), ov::Shape({1, 3, 4, 5}), @@ -65,7 +65,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perTensor) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perTensor2) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1 }), ov::Shape({ 1 }), ov::Shape({ 1, 3, 4, 5 }), @@ -73,7 +73,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perTensor2) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perChannels) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3 }), ov::Shape({ 1, 3 }), ov::Shape({ 1, 3, 4, 5 }), @@ -81,7 +81,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perChannels) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perChannels2) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 4, 5 }), @@ -89,7 +89,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perChannels2) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perSpacial1) { - ASSERT_FALSE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_FALSE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 4, 1 }), ov::Shape({ 1, 3, 4, 1 }), ov::Shape({ 1, 3, 4, 5 }), @@ -97,7 +97,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perSpacial1) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perSpacial2) { - ASSERT_FALSE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_FALSE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 1, 4 }), ov::Shape({ 1, 3, 1, 4 }), ov::Shape({ 1, 3, 4, 5 }), @@ -105,7 +105,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_3D_perSpacial2) { } TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perTensor) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({}), ov::Shape({}), ov::Shape({ 1, 3, 20 }), @@ -113,7 +113,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perTensor) { } TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perTensor2) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1 }), ov::Shape({ 1 }), ov::Shape({ 1, 3, 20 }), @@ -121,7 +121,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perTensor2) { } TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perChannels) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3 }), ov::Shape({ 1, 3 }), ov::Shape({ 1, 3, 20 }), @@ -129,7 +129,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perChannels) { } TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perChannels2) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 1, 1 }), ov::Shape({ 1, 3, 20 }), @@ -137,7 +137,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perChannels2) { } TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perSpacial) { - ASSERT_FALSE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_FALSE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 3, 20 }), ov::Shape({ 1, 3, 20 }), ov::Shape({ 1, 3, 20 }), @@ -145,7 +145,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_3D_to_4D_perSpacial) { } TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perSpacial_TRUE) { - ASSERT_TRUE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_TRUE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 256, 1, 1 }), ov::Shape({ 1, 256, 1, 1 }), ov::Shape({ 1, 256, 6, 6 }), @@ -153,7 +153,7 @@ TEST(LPT_ReshapeTransformation, canBeTransformed_4D_to_2D_perSpacial_TRUE) { } TEST(LPT_ReshapeTransformation, canBeTransformed_5D_to_5D_perBatch) { - ASSERT_FALSE(ngraph::pass::low_precision::ReshapeTransformation::canBeTransformed( + ASSERT_FALSE(ov::pass::low_precision::ReshapeTransformation::canBeTransformed( ov::Shape({ 1, 16, 1, 1, 1 }), ov::Shape({ 1, 16, 1, 1, 1 }), ov::Shape({ 1, 16, 128, 128, 128 }), diff --git a/src/common/low_precision_transformations/tests/unit/shared_attribute_add.cpp b/src/common/low_precision_transformations/tests/unit/shared_attribute_add.cpp index a120d812899..4d220fa1f3e 100644 --- a/src/common/low_precision_transformations/tests/unit/shared_attribute_add.cpp +++ b/src/common/low_precision_transformations/tests/unit/shared_attribute_add.cpp @@ -10,13 +10,13 @@ using LPT_ReshapeTransformation = ::testing::Test; TEST(LPT_SharedAttribute, assign) { - const auto attribute1 = ngraph::PrecisionPreservedAttribute(); + const auto attribute1 = ov::PrecisionPreservedAttribute(); ASSERT_EQ(1ul, attribute1.attribute->sharedValue->getAttributes().size()); - const auto attribute2 = ngraph::AvgPoolPrecisionPreservedAttribute(); + const auto attribute2 = ov::AvgPoolPrecisionPreservedAttribute(); ASSERT_EQ(1ul, attribute2.attribute->sharedValue->getAttributes().size()); - ngraph::pass::low_precision::NetworkHelper::reassign( + ov::pass::low_precision::NetworkHelper::reassign( attribute1.attribute->sharedValue, { attribute1.attribute, attribute2.attribute }); diff --git a/src/common/low_precision_transformations/tests/unit/update_reshape_values.cpp b/src/common/low_precision_transformations/tests/unit/update_reshape_values.cpp index 86630b202ed..1b29f8f18a8 100644 --- a/src/common/low_precision_transformations/tests/unit/update_reshape_values.cpp +++ b/src/common/low_precision_transformations/tests/unit/update_reshape_values.cpp @@ -11,5 +11,5 @@ using LPT_ReshapeTransformation = ::testing::Test; TEST(LPT_UpdateReshapeValuesTransformation, updateReshapeValues_3_3_32_1_to_1_1_32_1) { ASSERT_EQ( ov::Shape({1, 1, 32, 1}), - ngraph::pass::low_precision::NetworkHelper::updateReshapeValues({ 1, 32 }, { 9, 32 }, { 3, 3, 32, 1 })); + ov::pass::low_precision::NetworkHelper::updateReshapeValues({ 1, 32 }, { 9, 32 }, { 3, 3, 32, 1 })); } diff --git a/src/common/low_precision_transformations/tests/unsqueeze_transformation.cpp b/src/common/low_precision_transformations/tests/unsqueeze_transformation.cpp index d4525c3c6fe..ea074dbea0c 100644 --- a/src/common/low_precision_transformations/tests/unsqueeze_transformation.cpp +++ b/src/common/low_precision_transformations/tests/unsqueeze_transformation.cpp @@ -9,9 +9,9 @@ #include -#include -#include -#include +#include "transformations/utils/utils.hpp" +#include "transformations/init_node_info.hpp" +#include "low_precision/unsqueeze.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "simple_low_precision_transformer.hpp" @@ -40,7 +40,7 @@ public: ngraph::builder::subgraph::DequantizationOperations dequantizationAfter; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; std::vector axes; TestTransformationParams params; Actual actual; @@ -59,7 +59,7 @@ public: testValues.actual.dequantization); SimpleLowPrecisionTransformer transform; - transform.add(testValues.params); + transform.add(testValues.params); transform.transform(actualFunction); diff --git a/src/common/low_precision_transformations/tests/variadic_split_transformation.cpp b/src/common/low_precision_transformations/tests/variadic_split_transformation.cpp index f091f451109..1d8b1badfb5 100644 --- a/src/common/low_precision_transformations/tests/variadic_split_transformation.cpp +++ b/src/common/low_precision_transformations/tests/variadic_split_transformation.cpp @@ -4,10 +4,10 @@ #include -#include +#include "low_precision/variadic_split.hpp" #include -#include -#include + +#include "transformations/init_node_info.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "layer_transformation.hpp" @@ -36,7 +36,7 @@ public: std::vector dequantizationAfter; }; - ngraph::PartialShape inputShape; + ov::PartialShape inputShape; std::int64_t axis; std::vector splitLengths; TestTransformationParams params; @@ -58,7 +58,7 @@ public: testValues.splitLengths); SimpleLowPrecisionTransformer transformer; - transformer.add( + transformer.add( testValues.params); transformer.transform(actualFunction); diff --git a/src/core/include/ngraph/pass/graph_rewrite.hpp b/src/core/include/ngraph/pass/graph_rewrite.hpp index 45007d449f5..19e69e1db65 100644 --- a/src/core/include/ngraph/pass/graph_rewrite.hpp +++ b/src/core/include/ngraph/pass/graph_rewrite.hpp @@ -27,73 +27,11 @@ namespace ngraph { using ov::graph_rewrite_callback; using ov::handler_callback; using ov::matcher_pass_callback; -using ov::recurrent_graph_rewrite_callback; namespace pass { + using ov::pass::BackwardGraphRewrite; using ov::pass::GraphRewrite; using ov::pass::MatcherPass; -class NGRAPH_API_DEPRECATED NGRAPH_API RecurrentGraphRewrite : public FunctionPass { -public: - RecurrentGraphRewrite(size_t num_iters = 10) : ModelPass(), m_num_iters(num_iters) {} - - void add_matcher(const std::shared_ptr& m, - const ov::recurrent_graph_rewrite_callback& callback, - const PassPropertyMask& property) { - NGRAPH_SUPPRESS_DEPRECATED_START - m_matchers.push_back(std::make_shared( - "Recurrent matcher", - nullptr, - [m, callback](const std::shared_ptr& node) { - NGRAPH_DEBUG << "Running recurrent matcher on " << node; - if (m->match(node->output(0))) { - NGRAPH_DEBUG << "Recurrent matcher matched " << m.get(); - return callback(*m.get()); - } - return false; - }, - property)); - NGRAPH_SUPPRESS_DEPRECATED_END - } - - // TODO: This interface may deprecate after all passes are refactored. - void add_matcher(const std::shared_ptr& m, - const ov::recurrent_graph_rewrite_callback& callback) { - NGRAPH_SUPPRESS_DEPRECATED_START - // TODO: before deprecate this function, by default expect the - // callback require static shape. - add_matcher(m, callback, {PassProperty::REQUIRE_STATIC_SHAPE}); - NGRAPH_SUPPRESS_DEPRECATED_END - } - - bool run_on_model(const std::shared_ptr& m) override { - NGRAPH_SUPPRESS_DEPRECATED_START - bool changed = false; - size_t i = 0; - - auto run_matchers = [&]() -> bool { - for (const auto& node : m->get_ops()) { - for (auto& m_pass : m_matchers) { - if (m_pass->apply(node)) { - return true; - } - } - } - return false; - }; - - do { - changed = run_matchers(); - i++; - } while (changed && i < m_num_iters); - return changed; - NGRAPH_SUPPRESS_DEPRECATED_END - } - -private: - size_t m_num_iters; - - std::vector> m_matchers; -}; } // namespace pass } // namespace ngraph diff --git a/src/core/include/ngraph/pattern/matcher.hpp b/src/core/include/ngraph/pattern/matcher.hpp index fd45a86bbf1..947dcfb4d58 100644 --- a/src/core/include/ngraph/pattern/matcher.hpp +++ b/src/core/include/ngraph/pattern/matcher.hpp @@ -41,6 +41,5 @@ using ov::pass::GraphRewrite; namespace pattern { using ov::pass::pattern::Matcher; using ov::pass::pattern::MatcherState; -using ov::pass::pattern::RecurrentMatcher; } // namespace pattern } // namespace ngraph diff --git a/src/core/include/openvino/pass/graph_rewrite.hpp b/src/core/include/openvino/pass/graph_rewrite.hpp index 9ccca3d35ab..0b49f77ee7e 100644 --- a/src/core/include/openvino/pass/graph_rewrite.hpp +++ b/src/core/include/openvino/pass/graph_rewrite.hpp @@ -14,7 +14,6 @@ namespace ov { using matcher_pass_callback = std::function; using graph_rewrite_callback = std::function; -using recurrent_graph_rewrite_callback = std::function; using handler_callback = std::function& node)>; namespace pass { /// \brief Register openvino node pointers into container. diff --git a/src/core/include/openvino/pass/pattern/matcher.hpp b/src/core/include/openvino/pass/pattern/matcher.hpp index c0a92dd6fb1..d23613a2a31 100644 --- a/src/core/include/openvino/pass/pattern/matcher.hpp +++ b/src/core/include/openvino/pass/pattern/matcher.hpp @@ -184,88 +184,6 @@ protected: bool m_strict_mode{false}; }; -class OPENVINO_API RecurrentMatcher { -public: - /// \brief Constructs a RecurrentMatcher object. Reccurent Matchers are used to match - /// repeating patterns (e.g. RNN, LSTM, GRU cells) - /// - /// \param initial_pattern is a pattern sub graph describing the initial cell - /// \param pattern is a pattern sub graph describing an individual cell - /// \param rpattern is a (recurring) label to denote which node the next match should - /// start at - /// \param correlated_patterns is a set of labels whose bound nodes must remain the same - /// across all cells - RecurrentMatcher(const Output& initial_pattern, - const Output& pattern, - const std::shared_ptr& rpattern, - const std::set>& correlated_patterns) - : m_initial_pattern(initial_pattern), - m_pattern(pattern), - m_recurrent_pattern(rpattern), - m_correlated_patterns(correlated_patterns) {} - - /// \brief Constructs a RecurrentMatcher object. Reccurent Matchers are used to match - /// repeating patterns (e.g. RNN, LSTM, GRU cells) - /// - /// \param pattern is a pattern sub graph describing an individual cell - /// \param rpattern is a (recurring) label to denote which node the next match should - /// start at - /// \param correlated_patterns is a set of labels whose bound nodes must remain the same - /// across all cells - RecurrentMatcher(const Output& pattern, - const std::shared_ptr& rpattern, - const std::set>& correlated_patterns) - : RecurrentMatcher(pattern, pattern, rpattern, correlated_patterns) {} - - RecurrentMatcher(const Output& initial_pattern, - const Output& pattern, - const std::shared_ptr& rpattern, - const std::set>& correlated_patterns); - - RecurrentMatcher(const Output& pattern, - const std::shared_ptr& rpattern, - const std::set>& correlated_patterns) - : RecurrentMatcher(pattern, pattern, rpattern, correlated_patterns) {} - - /// \brief Returns a vector of bound nodes for a given label (used in a pattern - /// describing an individual cell - NodeVector get_bound_nodes_for_pattern(const std::shared_ptr& pattern) const { - if (m_matches.count(pattern) == 0) { - OPENVINO_THROW("No bound nodes for a given label"); - } - - return as_node_vector(m_matches.at(pattern)); - } - - size_t get_number_of_recurrent_matches() const { - if (m_matches.size() == 0) { - return 0; - } - - return (*m_matches.begin()).second.size(); - } - - size_t get_number_of_bound_labels() const { - return m_matches.size(); - } - /// \brief Tries to match a pattern for an individual cell to a given \p graph - bool match(Output graph); - - std::shared_ptr get_match_root() { - return m_match_root.get_node_shared_ptr(); - } - Output get_match_value() { - return m_match_root; - } - -private: - Output m_initial_pattern; - Output m_pattern; - std::shared_ptr m_recurrent_pattern; - const std::set> m_correlated_patterns; - RPatternValueMap m_matches; - Output m_match_root; -}; } // namespace pattern } // namespace pass } // namespace ov diff --git a/src/core/src/pattern/matcher.cpp b/src/core/src/pattern/matcher.cpp index da553dcc64d..b38cb7acdbb 100644 --- a/src/core/src/pattern/matcher.cpp +++ b/src/core/src/pattern/matcher.cpp @@ -185,59 +185,6 @@ void Matcher::clear_state() { m_pattern_value_maps.clear(); m_matched_list.clear(); } - -namespace { -std::set> as_node_set(const std::set>& label_set) { - std::set> result; - for (const auto& label : label_set) { - result.insert(label); - } - return result; -} -} // namespace - -RecurrentMatcher::RecurrentMatcher(const Output& initial_pattern, - const Output& pattern, - const std::shared_ptr& rpattern, - const std::set>& correlated_patterns) - : RecurrentMatcher(initial_pattern, pattern, rpattern, as_node_set(correlated_patterns)) {} - -bool RecurrentMatcher::match(Output graph) { - bool matched = false; - Matcher m_initial(m_initial_pattern); - Matcher m_repeat(m_pattern); - Matcher& m = m_initial; - PatternValueMap previous_matches; - m_matches.clear(); - m_match_root = graph; - - // try to match one cell (i.e. pattern) - while (m.match(graph, previous_matches)) { - matched = true; - // move to the next cell - graph = m.get_pattern_value_map()[m_recurrent_pattern]; - - // copy bound nodes for the current pattern graph into a global matches map - for (const auto& cur_match : m.get_pattern_value_map()) { - m_matches[cur_match.first].push_back(cur_match.second); - } - - // pre-populate the pattern map for the next cell with the bound nodes - // from the current match. Only bound nodes whose labels are in - // correlated_patterns are pre-populated. Skip other labels are - // unbounded by default - for (const auto& cor_pat : m_correlated_patterns) { - previous_matches[cor_pat] = m.get_pattern_value_map()[cor_pat]; - } - m = m_repeat; - } - - if (!matched) { - m_match_root.reset(); - } - - return matched; -} } // namespace pattern } // namespace pass } // namespace ov diff --git a/src/core/tests/pattern.cpp b/src/core/tests/pattern.cpp index 3cc87150491..6ad549524bb 100644 --- a/src/core/tests/pattern.cpp +++ b/src/core/tests/pattern.cpp @@ -564,151 +564,6 @@ TEST(pattern, test_sort) { } } -TEST(pattern, recurrent_pattern) { - Shape shape{}; - pass::pattern::Matcher::PatternMap previous_matches; - auto a = make_shared(element::i32, shape); - auto b = make_shared(element::i32, shape); - auto rpattern = std::make_shared(b); - auto iconst0 = construct_constant_node(0); - auto abs = make_shared(a); - auto add1 = make_shared(iconst0, b); - auto add2 = make_shared(iconst0, add1); - auto add3 = make_shared(iconst0, add2); - auto padd = make_shared(iconst0, rpattern); - std::set> empty_correlated_matches; - pattern::RecurrentMatcher rm(padd, rpattern, empty_correlated_matches); - ASSERT_TRUE(rm.match(add3)); - ASSERT_EQ(rm.get_number_of_bound_labels(), 3); - auto recurrent_matches = rm.get_bound_nodes_for_pattern(rpattern); - ASSERT_EQ(recurrent_matches.at(0), add2); - ASSERT_EQ(recurrent_matches.at(1), add1); - ASSERT_EQ(recurrent_matches.at(2), b); - - // Multiple labels in a reccuring pattern - auto iconst1 = construct_constant_node(1); - auto iconst_label = std::make_shared(iconst1, nullptr, NodeVector{iconst1}); - auto add2_2 = make_shared(iconst1, add1); - auto add3_2 = make_shared(iconst0, add2_2); - auto padd2 = make_shared(iconst_label, rpattern); - pattern::RecurrentMatcher rm2(padd2, rpattern, empty_correlated_matches); - ASSERT_TRUE(rm2.match(add3_2)); - ASSERT_EQ(rm2.get_number_of_bound_labels(), 4); - recurrent_matches = rm2.get_bound_nodes_for_pattern(rpattern); - ASSERT_EQ(recurrent_matches.at(0), add2_2); - ASSERT_EQ(recurrent_matches.at(1), add1); - ASSERT_EQ(recurrent_matches.at(2), b); - auto iconst_matches = rm2.get_bound_nodes_for_pattern(iconst_label); - ASSERT_EQ(iconst_matches.at(0), iconst0); - ASSERT_EQ(iconst_matches.at(1), iconst1); - ASSERT_EQ(iconst_matches.at(2), iconst0); - - // Non-matching correlated labels - std::set> correlated_matches; - correlated_matches.insert(iconst_label); - pattern::RecurrentMatcher rm3(padd2, rpattern, correlated_matches); - ASSERT_TRUE(rm3.match(add3_2)); - ASSERT_EQ(rm3.get_number_of_bound_labels(), 4); - iconst_matches = rm3.get_bound_nodes_for_pattern(iconst_label); - ASSERT_EQ(iconst_matches.size(), 1); - ASSERT_EQ(iconst_matches.at(0), iconst0); - - // Matching correlated labels and - // testing if RecurrentMatcher can be reused for different nodes - ASSERT_TRUE(rm3.match(add3)); - ASSERT_EQ(rm3.get_number_of_bound_labels(), 4); - recurrent_matches = rm3.get_bound_nodes_for_pattern(rpattern); - ASSERT_EQ(recurrent_matches.at(0), add2); - ASSERT_EQ(recurrent_matches.at(1), add1); - ASSERT_EQ(recurrent_matches.at(2), b); - iconst_matches = rm3.get_bound_nodes_for_pattern(iconst_label); - ASSERT_EQ(iconst_matches.at(0), iconst0); - ASSERT_EQ(iconst_matches.at(1), iconst0); - ASSERT_EQ(iconst_matches.at(2), iconst0); -} - -OPENVINO_SUPPRESS_DEPRECATED_START -class TestRecurrentGraphRewrite : public ngraph::pass::RecurrentGraphRewrite { -public: - void construct_recurrent_add() { - Shape shape{}; - auto iconst0 = construct_constant_node(0); - auto iconst_label = std::make_shared(iconst0, nullptr, NodeVector{iconst0}); - auto rpattern = std::make_shared(element::i32, shape); - auto padd = make_shared(iconst_label, rpattern); - - auto callback = [iconst_label, rpattern](pattern::RecurrentMatcher& rm) { - OPENVINO_DEBUG << "In a callback for construct_recurrent_add against " << rm.get_match_root()->get_name(); - - auto iconst_matches = rm.get_bound_nodes_for_pattern(iconst_label); - - auto is_iconst_zero = [](std::shared_ptr n) { - bool result = ngraph::is_zero(n); - OPENVINO_DEBUG << n->get_name() << " is " << (result ? " a zero " : " not a zero"); - return ngraph::is_zero(n); - }; - - bool are_all_iconst_zeros = std::all_of(iconst_matches.begin(), iconst_matches.end(), is_iconst_zero); - - if (!are_all_iconst_zeros) { - return false; - } - - auto number_of_adds = rm.get_number_of_recurrent_matches(); - // replace the topmost add with the seed (i.e. the first parameter to add) - // matches are added in reverse order (i.e. the first match is the topmost node) - auto arg = rm.get_bound_nodes_for_pattern(rpattern).at(number_of_adds - 1); - OPENVINO_DEBUG << "Replacing " << rm.get_match_root()->get_name() << " with " << arg->get_name(); - ov::replace_node(rm.get_match_root(), arg); - return true; - }; - - std::set> empty_correlated_matches; - auto rm = make_shared(padd, rpattern, empty_correlated_matches); - NGRAPH_SUPPRESS_DEPRECATED_START - this->add_matcher(rm, callback); - NGRAPH_SUPPRESS_DEPRECATED_END - } - - TestRecurrentGraphRewrite() : RecurrentGraphRewrite() { - construct_recurrent_add(); - } -}; - -TEST(pattern, recurrent_graph_rewrite) { - Shape shape{}; - pass::Manager pass_manager; - pass_manager.register_pass(); - - { - auto a = make_shared(element::i32, shape); - auto iconst0 = construct_constant_node(0); - auto add_a1 = make_shared(a, iconst0); - auto add_a2 = make_shared(add_a1, iconst0); - auto add_a3 = make_shared(add_a2, iconst0); - auto abs_add_a3 = std::make_shared(add_a3); - - auto b = make_shared(element::i32, shape); - auto add_b1 = make_shared(b, iconst0); - auto add_b2 = make_shared(add_b1, iconst0); - auto abs_add_b2 = std::make_shared(add_b2); - - auto graph = make_shared(abs_add_a3, abs_add_b2); - - auto f = std::make_shared(ov::NodeVector{graph}, ParameterVector{a, b}); - pass_manager.run_passes(f); - - auto left_abs = graph->input_value(0).get_node_shared_ptr(); - auto add_a = left_abs->input_value(0).get_node_shared_ptr(); - ASSERT_EQ(add_a, a); - - auto right_abs = graph->input_value(1).get_node_shared_ptr(); - auto add_b = right_abs->input_value(0).get_node_shared_ptr(); - ASSERT_EQ(add_b, b); - } -} -OPENVINO_SUPPRESS_DEPRECATED_END - TEST(pattern, label_on_skip) { Shape shape{2, 2}; auto a = make_shared(element::i32, shape); diff --git a/src/plugins/intel_cpu/src/exec_network.cpp b/src/plugins/intel_cpu/src/exec_network.cpp index b779891df09..d694ab52378 100644 --- a/src/plugins/intel_cpu/src/exec_network.cpp +++ b/src/plugins/intel_cpu/src/exec_network.cpp @@ -180,7 +180,7 @@ ExecNetwork::GraphGuard::Lock ExecNetwork::GetGraph() const { auto isQuantizedFlag = (_cfg.lpTransformsMode == Config::On) && - ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(_network.getFunction()); + ov::pass::low_precision::LowPrecision::isFunctionQuantized(_network.getFunction()); ctx = std::make_shared(_cfg, extensionManager, weightsCache, isQuantizedFlag); } diff --git a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp index 2b1a61aa2b4..aa49c14f074 100644 --- a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp +++ b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp @@ -158,20 +158,20 @@ bool Transformations::fuse_type_to_convert(const std::shared_ptr& void Transformations::UpToLpt() { const bool useLpt = enableLpt && - ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(model) && + ov::pass::low_precision::LowPrecision::isFunctionQuantized(model) && CPU_DEBUG_CAP_IS_TRANSFORMATION_ENABLED(config.debugCaps, Lpt); - auto defaultPrecisions = useLpt ? ngraph::pass::low_precision::precision_set::int8_support : std::vector{}; + auto defaultPrecisions = useLpt ? ov::pass::low_precision::precision_set::int8_support : std::vector{}; bool hasINT16orINT32Levels = false; if (useLpt) { CPU_LPT_SCOPE(LowPrecisionTransformations_Part1); - hasINT16orINT32Levels = ngraph::pass::low_precision::LowPrecision::isFQLevelsPresent( + hasINT16orINT32Levels = ov::pass::low_precision::LowPrecision::isFQLevelsPresent( model, - {ngraph::pass::low_precision::levels::int16, ngraph::pass::low_precision::levels::int16_narrow_range, - ngraph::pass::low_precision::levels::int32, ngraph::pass::low_precision::levels::int32_narrow_range}); + {ov::pass::low_precision::levels::int16, ov::pass::low_precision::levels::int16_narrow_range, + ov::pass::low_precision::levels::int32, ov::pass::low_precision::levels::int32_narrow_range}); if (hasINT16orINT32Levels) { - defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_int16_int32_support; + defaultPrecisions = ov::pass::low_precision::precision_set::int8_int16_int32_support; } } @@ -281,7 +281,7 @@ void Transformations::PreLpt(const std::vector& defaultPrecis if (useLpt) { CPU_LPT_SCOPE(LowPrecisionTransformations_Part2); - CPU_REGISTER_PASS_COMMON(manager, ngraph::pass::low_precision::ConvertSubtractConstant, defaultPrecisions); + CPU_REGISTER_PASS_COMMON(manager, ov::pass::low_precision::ConvertSubtractConstant, defaultPrecisions); } CPU_REGISTER_PASS_COMMON(manager, ov::pass::Validate); // Common ConvertPrecision pass handles only a limited set of opevino operations to match the list of precisions supported by the plugin. @@ -422,7 +422,7 @@ void Transformations::PreLpt(const std::vector& defaultPrecis CPU_SET_CALLBACK_COMMON(manager, [&defaultPrecisions](const_node_ptr &node) -> bool { - return ngraph::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(node, defaultPrecisions); + return ov::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(node, defaultPrecisions); }, ov::pass::ConvertQuantizeDequantize); } @@ -440,7 +440,7 @@ void Transformations::PreLpt(const std::vector& defaultPrecis void Transformations::Lpt(const bool hasINT16orINT32Levels, const std::vector& defaultPrecisions) { CPU_DEBUG_CAP_TRANSFORMATION_SCOPE(this, Lpt); - using namespace ngraph::pass::low_precision; + using namespace ov::pass::low_precision; CPU_LPT_SCOPE(LowPrecisionTransformations_Part4); OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::intel_cpu_LT, "LowPrecisionTransformations"); //Only enable conv/group conv signed input on AMX platform. @@ -503,7 +503,7 @@ void Transformations::Lpt(const bool hasINT16orINT32Levels, const std::vector bool { return LayerTransformation::isAsymmetricQuantization(node, defaultPrecisions) || WeightableLayerTransformation::isAsymmetricOnWeights(node, defaultPrecisions); }, - ngraph::pass::low_precision::ConvolutionBackpropDataTransformation); + ov::pass::low_precision::ConvolutionBackpropDataTransformation); - lptManager.get_pass_config()->set_callback( + lptManager.get_pass_config()->set_callback( [](const_node_ptr& node) -> bool { return ov::marked_as_bias(node); }); - CPU_DISABLE_PASS_ARM(lptManager, ngraph::pass::low_precision::RecurrentCellTransformation); - CPU_DISABLE_PASS_COMMON(lptManager, ngraph::pass::low_precision::MultiplyToGroupConvolutionTransformation); + CPU_DISABLE_PASS_ARM(lptManager, ov::pass::low_precision::RecurrentCellTransformation); + CPU_DISABLE_PASS_COMMON(lptManager, ov::pass::low_precision::MultiplyToGroupConvolutionTransformation); lptManager.run_passes(model); } diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp index 9a0c186021b..9304b63da83 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp @@ -22,7 +22,7 @@ const std::vector opsetVersions = { 6 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp index 64cfcc80d89..7e32d5ddf53 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp index 31ba5b12c8c..ceceaddea51 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp index e84b91ca918..28cd434791e 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp index 9b7ecef44db..4f57f15313c 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp @@ -16,7 +16,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_transformation.cpp index 15e9011497e..691509a2536 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_transformation.cpp @@ -16,7 +16,7 @@ const std::vector precisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp index 661731fe8fa..b8fe75b2975 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp index a58b1943a1f..4cfc66b1189 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp @@ -14,7 +14,7 @@ const std::vector netPrecisions = { ngraph::element::f32 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(true) }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp index 1c13b69eda1..71af1b4f12c 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp @@ -16,7 +16,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp index 98add2194fc..8ba25053345 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp @@ -16,7 +16,7 @@ const std::vector netPrecisions = { // ngraph::element::f16, }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp index 6c2617e30cb..119cf197851 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp @@ -16,7 +16,7 @@ const std::vector precisions = { ngraph::element::f32 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp index 76c6e6d891e..226c7aa1861 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp @@ -16,7 +16,7 @@ const std::vector precisions = { ngraph::element::f32 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp index 1177d0a163d..ee4b7ce29b4 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { @@ -16,7 +16,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp index ea84287c2f0..bd6036edbe3 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fake_quantize_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp index e79fa4429f2..1541d67dc8e 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fake_quantize_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp index 03c9ed8413d..6e974a62302 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fake_quantize_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp index 8a73aa812ee..6f19bde8288 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp @@ -37,7 +37,7 @@ const std::vector shapes = { }, }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp index e1ba2d79dc4..ea6f3c3d817 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fuse_fake_quantize_and_scale_shift_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp index b31518cc156..7b463b61b31 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp index 8f9066f2a2f..381ad56a2a1 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp @@ -14,7 +14,7 @@ const std::vector netPrecisions = { ngraph::element::f32 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp index 6438c549285..59c24a03d7c 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp @@ -18,7 +18,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp index 42f9b67992b..52667010cf3 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp @@ -14,7 +14,7 @@ const std::vector netPrecisions = { //ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(true) }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp index 6035a643782..0573b240e1d 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp index 78f595bfe31..847ac5c3273 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp index 994a52501ff..3e2b1c01a99 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp index 0fcf943dedc..e9ecd234ef2 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp @@ -22,7 +22,7 @@ const std::vector inputShapes = { { 4, 3, 16, 16} }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp index dbabe861bed..0b102311330 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(true), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp index 6f16ac323be..f13a30ddd1a 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp @@ -14,7 +14,7 @@ const std::vector netPrecisions = { //ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(true) }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp index e4fdd7e4270..b2895ddb70c 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp index a0e752f04e9..f5fe193dc18 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp @@ -16,7 +16,7 @@ const std::vector netPrecisions = { ngraph::element::f32 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp index 302d407504c..f0ef6846fc6 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp index b795dafb54d..6cf203bf5e8 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp index 2d4ec519527..9d4c856970b 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp index d0d56c56830..df22a554c1d 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp @@ -20,7 +20,7 @@ const std::vector inputShapes = { { 4, 3, 16, 16 } }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(true), }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp index 60ebcf20010..7ea0b65146b 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp @@ -18,7 +18,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp index cb476542517..794ddb29868 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector precisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp index 8c47af0fb31..1f089815105 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp index fb68ca34475..8d7fda0b607 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp index 7402f1abec7..663efad28b2 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp index 1eff3a19eeb..8b03c6c000f 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector precisions = { diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp index 61318de8628..afc6ca568aa 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp @@ -18,7 +18,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp b/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp index e3bfbac3f3e..ff29a7a4522 100644 --- a/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp +++ b/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp @@ -34,6 +34,7 @@ #include "openvino/pass/manager.hpp" #include "openvino/pass/constant_folding.hpp" #include "openvino/core/deprecated.hpp" +#include "openvino/core/validation_util.hpp" #include "openvino/pass/visualize_tree.hpp" #include "transformations/einsum_decomposition.hpp" @@ -147,7 +148,7 @@ void TransformationsPipeline::apply(std::shared_ptr func) { OV_ITT_SCOPED_TASK(itt::domains::intel_gpu_plugin, "TransformationsPipeline::apply"); using const_node_ptr = const std::shared_ptr; - const auto& defaultPrecisions = ngraph::pass::low_precision::precision_set::int8_support; + const auto& defaultPrecisions = ov::pass::low_precision::precision_set::int8_support; bool enableInt8; bool unroll_loop = config.get_property(ov::intel_gpu::enable_loop_unrolling); { @@ -155,7 +156,7 @@ void TransformationsPipeline::apply(std::shared_ptr func) { auto pass_config = manager.get_pass_config(); manager.set_per_pass_validation(false); - enableInt8 = config.get_property(ov::intel_gpu::enable_lp_transformations) && ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(func); + enableInt8 = config.get_property(ov::intel_gpu::enable_lp_transformations) && ov::pass::low_precision::LowPrecision::isFunctionQuantized(func); if (enableInt8) { manager.register_pass( std::vector{ ov::element::i8, ov::element::u8, ov::element::i4, ov::element::u4 }); @@ -489,7 +490,7 @@ void TransformationsPipeline::apply(std::shared_ptr func) { if (enableInt8) { pass_config->set_callback([&](const_node_ptr &node) -> bool { - return ngraph::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(node, defaultPrecisions); + return ov::pass::low_precision::NetworkHelper::areQuantizeAndDequantizeSupportedForMultiply(node, defaultPrecisions); }); } @@ -498,7 +499,7 @@ void TransformationsPipeline::apply(std::shared_ptr func) { if (enableInt8) { OV_ITT_SCOPED_TASK(itt::domains::intel_gpu_plugin, "TransformationsPipeline::apply::lpt"); - using namespace ngraph::pass::low_precision; + using namespace ov::pass::low_precision; auto supportedPrecisions = std::vector({ PrecisionsRestriction::create({ @@ -526,8 +527,8 @@ void TransformationsPipeline::apply(std::shared_ptr func) { auto lptPassConfig = lptManager.get_pass_config(); // quantized LSTMSequence / GPUSequence are not supported yet. Avoid extra transformation - lptPassConfig->disable(); - lptPassConfig->set_callback([](const_node_ptr& node) -> bool { + lptPassConfig->disable(); + lptPassConfig->set_callback([](const_node_ptr& node) -> bool { if (const auto mulitply = std::dynamic_pointer_cast(node)) { return !MultiplyToGroupConvolutionTransformation::canBeTransformedToGroupConvolution(mulitply); } diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp index c33b18ff438..8d60739c8a7 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/assign_and_read_value_transformation.cpp @@ -22,7 +22,7 @@ const std::vector opsetVersions = { // 6 // not supported on GPU }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp index b47f3920a5a..dc0e8b43fe5 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/clamp_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp index 5fa02c5ca5b..6bf9daea59e 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_child_and_output.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp index 1bdd7b7c559..31da220ecab 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_different_precision_on_children.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp index c3b45ad3dd2..8a440e8c824 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_intermediate_transformation.cpp @@ -16,7 +16,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp index 3a59b23a417..1d39bf69a87 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp @@ -16,7 +16,7 @@ const std::vector precisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp index 91ce5714f49..e220a6ec552 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/concat_with_split_transformation.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp index 3b947abf508..c10197eb800 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_backprop_data_transformation.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(true) }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp index f698ab2f2b8..522ed21b2b5 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_qdq_transformation.cpp @@ -16,7 +16,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp index 59d63e04841..d5d76692c35 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp @@ -16,7 +16,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp index 791cde79ec2..4f0eb7992f7 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_avg_pool_transformation.cpp @@ -17,7 +17,7 @@ const std::vector precisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp index 6a958fa00bf..d283299b693 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_max_pool_transformation.cpp @@ -17,7 +17,7 @@ const std::vector precisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp index 61a25f3b7ce..f3d389a94af 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_and_two_output_branches_with_convolution.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp index 32d37bb451a..4048550b9f9 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_precision_selection_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fake_quantize_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp index cb937b2f63c..939617d59eb 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fake_quantize_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp index f5390a97213..0c7ea8e2297 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fake_quantize_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp index 14ab80dfd3f..e8238c9b370 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fully_connected_transformation.cpp @@ -37,7 +37,7 @@ const std::vector shapes = { }, }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp index c9ae540342b..1fd986206e6 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_fq_and_scale_shift_transformation.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/fuse_fake_quantize_and_scale_shift_function.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp index 356fbf84ecc..d225f91e9ca 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/gemm_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp index 770d205581a..d5b86e0f2ba 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/group_convolution_transformation.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp index d959d4d053d..ce9ed2b6e73 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/groupconvolution_qdq_transformation.cpp @@ -18,7 +18,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp index 0cce896fb75..69b83bc34b2 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/move_fake_quantize_transformation.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp index 7b7ff3b802b..5273842172f 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp index ded978c1ff0..3b2add93d25 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp index 9b1990eed5a..70a024b6012 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/output_layers_concat_multi_channel.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp index d6e9f740e0a..8e21e3c4c16 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pad_transformation.cpp @@ -21,7 +21,7 @@ const std::vector inputShapes = { { 1, 3, 16, 16}, }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp index ddf7dab747f..394ffbb1ff5 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/pull_reshape_through_dequantization.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { // ngraph::element::f16 // TODO: enable f16 test inference (change ngraph function + fp32 to fp16 replacements) }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp index ea2c3a8a80d..87a11b0cb76 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/recurrent_cell_transformation.cpp @@ -14,7 +14,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(true) }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp index fdf04ccc251..0413b20fad4 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_max_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp index 79715bdb22f..b6db9007b2c 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_mean_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp index 5e525111b3e..bbe489493f5 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_min_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp index d93325bcab7..74b7d26ee7f 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reduce_sum_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsU8I8() }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp index 848bdc1ecc2..a73e6002714 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp @@ -15,7 +15,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp index b0e54c031c3..bceaf8fd31f 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/shuffle_channels_transformation.cpp @@ -19,7 +19,7 @@ const std::vector inputShapes = { { 1, 3, 16, 16 } }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp index c629912f7e2..8f28760f2c7 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/split_transformation.cpp @@ -18,7 +18,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp index 87d33ae36c6..adf09280b3b 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/squeeze_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp index 72bd2933d12..0c24c71f76e 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/strided_slice_transformation.cpp @@ -17,7 +17,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), }; diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp index c445ad4988e..985c2f9de0e 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp index daa24739186..f82e9de2ad2 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/transpose_after_matmul_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp index be32e0acd87..d7665bfc1fb 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp @@ -8,7 +8,7 @@ #include "common_test_utils/test_constants.hpp" using namespace LayerTestsDefinitions; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace { const std::vector netPrecisions = { diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp index 73d3baa0a24..2861447c881 100644 --- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp +++ b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/variadic_split_transformation.cpp @@ -18,7 +18,7 @@ const std::vector netPrecisions = { ngraph::element::f16 }; -const std::vector trasformationParamValues = { +const std::vector trasformationParamValues = { LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams(), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParams().setUpdatePrecisions(false), // LayerTestsUtils::LayerTransformationParamsNGraphFactory::createParamsI8I8(), diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/assign_and_read_value_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/assign_and_read_value_transformation.hpp index 0b86e56d0b1..a7b26ab515a 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/assign_and_read_value_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/assign_and_read_value_transformation.hpp @@ -19,7 +19,7 @@ typedef std::tuple < ngraph::PartialShape, // input shape size_t, // opset version std::string, // device - ngraph::pass::low_precision::LayerTransformation::Params, // transformation params + ov::pass::low_precision::LayerTransformation::Params, // transformation params AssignAndReadValueTransformationParam // test params > AssignAndReadValueTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp index 3bba1eeaf74..0748f5d0f9c 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp @@ -21,7 +21,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ClampTransformationParam > ClampTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_child_and_output.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_child_and_output.hpp index 8e040785b3d..0b676d83146 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_child_and_output.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_child_and_output.hpp @@ -22,7 +22,7 @@ typedef std::tuple< ngraph::PartialShape, std::string, // target device: CPU, GPU ConcatWithChildAndOutputTransformationParam, - ngraph::pass::low_precision::LayerTransformation::Params // transformation parameters + ov::pass::low_precision::LayerTransformation::Params // transformation parameters > ConcatWithChildAndOutputTransformationParams; class ConcatWithChildAndOutputTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_children.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_children.hpp index 72af85cc97b..209500c9d56 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_children.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_children.hpp @@ -23,7 +23,7 @@ typedef std::tuple< ngraph::PartialShape, std::string, // target device: CPU, GPU ConcatWithDifferentChildrenTransformationParam, - ngraph::pass::low_precision::LayerTransformation::Params // transformation parameters + ov::pass::low_precision::LayerTransformation::Params // transformation parameters > ConcatWithDifferentChildrenTransformationParams; class ConcatWithDifferentChildrenTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp index 09dcfcf776f..a7706937656 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp @@ -15,7 +15,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, // target device: CPU, GPU - ngraph::pass::low_precision::LayerTransformation::Params, // transformation parameters + ov::pass::low_precision::LayerTransformation::Params, // transformation parameters bool, // transparent intermediate // multichannel bool> ConcatWithIntermediateTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp index f9d8108c30c..fc55d9f2ec6 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp @@ -15,7 +15,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params> ConcatNeighboringGraphTransformationParams; + ov::pass::low_precision::LayerTransformation::Params> ConcatNeighboringGraphTransformationParams; class ConcatWithNeighborsGraphTransformation : public testing::WithParamInterface, diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp index a68984aad58..2491549e266 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp @@ -22,7 +22,7 @@ typedef std::tuple< ngraph::PartialShape, std::string, ConcatWithSplitTransformationParam, - ngraph::pass::low_precision::LayerTransformation::Params> ConcatWithSplitTransformationParams; + ov::pass::low_precision::LayerTransformation::Params> ConcatWithSplitTransformationParams; class ConcatWithSplitTransformation : public testing::WithParamInterface, diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_backprop_data_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_backprop_data_transformation.hpp index 43649fffaf7..8ed8498b79a 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_backprop_data_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_backprop_data_transformation.hpp @@ -46,7 +46,7 @@ typedef std::tuple< std::pair, // input shape and shape support flag ngraph::Shape, // outputShape std::string, // targetDevice - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ConvolutionBackpropDataTransformationParam > ConvolutionBackpropDataTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_qdq_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_qdq_transformation.hpp index a4931513956..cd268238291 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_qdq_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_qdq_transformation.hpp @@ -49,7 +49,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ConvolutionQDqTransformationParam > ConvolutionQDqTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp index 857a7d0fd7e..5fa546c3096 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp @@ -27,7 +27,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::Shape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ConvolutionTransformationParam > ConvolutionTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp index c8e26ab8d54..90d2d63d260 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp @@ -24,7 +24,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::Shape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ConvolutionWIthIncorrectWeightsParam > ConvolutionWIthIncorrectWeightsParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/eliminate_fake_quantize_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/eliminate_fake_quantize_transformation.hpp index 5e5f45d54b9..0758b7e3fa8 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/eliminate_fake_quantize_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/eliminate_fake_quantize_transformation.hpp @@ -32,7 +32,7 @@ public: }; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; Actual actual; Expected expected; }; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp index cf3fbee3a01..d93aca06192 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp @@ -16,7 +16,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ngraph::builder::subgraph::FakeQuantizeOnData> FakeQuantizeAndAvgPoolTransformationParams; class FakeQuantizeAndAvgPoolTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp index 039bc513db6..b2f1d56e137 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp @@ -16,7 +16,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ngraph::builder::subgraph::FakeQuantizeOnData> FakeQuantizeAndMaxPoolTransformationParams; class FakeQuantizeAndMaxPoolTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp index 6d41b850b7a..3ac87adf356 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp @@ -24,7 +24,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, FakeQuantizeAndTwoOutputBranchesWithConvolution > FakeQuantizeAndTwoOutputBranchesWithConvolutionParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp index 023e1e92489..657669dfcf6 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp @@ -52,7 +52,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, FakeQuantizePrecisionSelectionTransformationTestValues> FakeQuantizeTransformationParams; class FakeQuantizePrecisionSelectionTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp index 9ebf693c871..44b89e0b053 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp @@ -22,7 +22,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, FakeQuantizeTransformationParam, bool> FakeQuantizeTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.hpp index 0726d34ec95..66736533664 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.hpp @@ -52,7 +52,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, FakeQuantizeWithNotOptimalTransformationTestValues> FakeQuantizeTransformationParams; class FakeQuantizeWithNotOptimalTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp index 758ee10ad59..f598aeed560 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp @@ -21,7 +21,7 @@ typedef std::tuple< ngraph::element::Type, MatMulShapes, std::string, - ngraph::pass::low_precision::LayerTransformation::Params> FullyConnectedTransformationParams; + ov::pass::low_precision::LayerTransformation::Params> FullyConnectedTransformationParams; namespace LayerTestsDefinitions { diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_dequantize_to_fake_quantize_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_dequantize_to_fake_quantize_transformation.hpp index e3f1b7c8467..ff488cb8a44 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_dequantize_to_fake_quantize_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_dequantize_to_fake_quantize_transformation.hpp @@ -27,7 +27,7 @@ public: }; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; Actual actual; }; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp index 6398d9863f1..9d53eba2aff 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp @@ -15,7 +15,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ngraph::builder::subgraph::FakeQuantizeOnData> FuseFakeQuantizeAndScaleShiftTransformationParams; class FuseFakeQuantizeAndScaleShiftTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp index 2734073da08..6f9830a746a 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp @@ -23,7 +23,7 @@ public: }; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; Actual actual; }; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp index 56cf82ca8a6..64398a3ea18 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp @@ -23,7 +23,7 @@ public: }; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; Actual actual; }; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/gather_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/gather_transformation.hpp index b700a72226c..ab4fe46b6e0 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/gather_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/gather_transformation.hpp @@ -19,7 +19,7 @@ public: std::vector gatherIndicesValues; std::vector axis; int64_t batch_dims; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::element::Type precisionBeforeFq; ngraph::builder::subgraph::FakeQuantizeOnData fqOnData; }; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp index ed2b1de50e9..231f7bae9c8 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp @@ -15,7 +15,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params> GemmTransformationParams; + ov::pass::low_precision::LayerTransformation::Params> GemmTransformationParams; // TODO: use MatMulTransformation class GemmTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp index bc17ade361e..bb24d0ea0a4 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp @@ -43,7 +43,7 @@ public: typedef std::tuple< ngraph::element::Type, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, std::pair, GroupConvolutionTransformationParam, bool // add precision preserved operation diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/groupconvolution_qdq_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/groupconvolution_qdq_transformation.hpp index 0873adf01c2..93d0bad2305 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/groupconvolution_qdq_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/groupconvolution_qdq_transformation.hpp @@ -53,7 +53,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, GroupConvolutionQDqTransformationParam > GroupConvolutionQDqTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/move_fake_quantize_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/move_fake_quantize_transformation.hpp index a752a97d113..bbfa6999a02 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/move_fake_quantize_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/move_fake_quantize_transformation.hpp @@ -33,7 +33,7 @@ typedef std::tuple < ngraph::element::Type, std::vector, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, bool, MoveFakeQuantizeTransformationParam > MoveFakeQuantizeTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_concat_multi_channel.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_concat_multi_channel.hpp index 6f61f2f57d8..48c4a33d79f 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_concat_multi_channel.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_concat_multi_channel.hpp @@ -15,7 +15,7 @@ typedef std::tuple< InferenceEngine::Precision, InferenceEngine::SizeVector, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, bool> OutputLayersHandlingInTransformationsParams; class OutputLayersConcatMultiChannel : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/pad_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/pad_transformation.hpp index 77db97866db..8ea8dbaecb5 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/pad_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/pad_transformation.hpp @@ -23,7 +23,7 @@ typedef std::tuple< ngraph::PartialShape, ngraph::op::PadMode, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, PadTransformationParam > PadTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/pull_reshape_through_dequantization_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/pull_reshape_through_dequantization_transformation.hpp index f2d0c10a587..e3be928bca6 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/pull_reshape_through_dequantization_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/pull_reshape_through_dequantization_transformation.hpp @@ -38,7 +38,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ngraph::Shape, PullReshapeThroughDequantizationTestValues> PullReshapeThroughDequantizationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/recurrent_cell_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/recurrent_cell_transformation.hpp index 8117c932e10..4e5e894e922 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/recurrent_cell_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/recurrent_cell_transformation.hpp @@ -41,7 +41,7 @@ typedef std::tuple< std::vector, std::vector, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, RecurrentCellTransformationParam >RecurrentCellTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_max_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_max_transformation.hpp index 71c141262a1..cfac5f7ec36 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_max_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_max_transformation.hpp @@ -22,7 +22,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ReduceMaxTransformationParam > ReduceMaxTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_mean_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_mean_transformation.hpp index fe63a698add..a9394f7fe7c 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_mean_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_mean_transformation.hpp @@ -34,7 +34,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ReduceMeanTransformationParam > ReduceMeanTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_min_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_min_transformation.hpp index 1b83de746af..69e55744381 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_min_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_min_transformation.hpp @@ -22,7 +22,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ReduceMinTransformationParam > ReduceMinTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_sum_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_sum_transformation.hpp index 34b0db06bf7..cad728ef357 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_sum_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/reduce_sum_transformation.hpp @@ -22,7 +22,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ReduceSumTransformationParam > ReduceSumTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp index 3902a9063ac..bf3f3693037 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp @@ -24,7 +24,7 @@ public: typedef std::tuple< ngraph::element::Type, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ReshapeTransformationParam > ReshapeTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/shuffle_channels_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/shuffle_channels_transformation.hpp index b93773219c0..97536d3b4d5 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/shuffle_channels_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/shuffle_channels_transformation.hpp @@ -25,7 +25,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, ShuffleChannelsTransformationParam > ShuffleChannelsTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp index abf805bc4ab..4e55309730e 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp @@ -19,7 +19,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, SplitTransformationParam > SplitTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp index 147c14e6f66..538a99b0a4b 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp @@ -24,7 +24,7 @@ std::string stringifySqueezeArgs(const std::vector& axes); typedef std::tuple< ngraph::element::Type, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, SqueezeTransformationParam > SqueezeTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/strided_slice_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/strided_slice_transformation.hpp index 3b9e3347ee4..e6e1f9ef1f1 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/strided_slice_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/strided_slice_transformation.hpp @@ -26,7 +26,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, StridedSliceTransformationParam > StridedSliceTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp index ac7f0a3ba3b..803d330c65b 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp @@ -15,7 +15,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params + ov::pass::low_precision::LayerTransformation::Params > SubtractTransformationParams; class SubtractTransformation : diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp index 1be9ffea229..ee96f953344 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp @@ -15,7 +15,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, bool, bool> TransposeAfterMatMulTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp index 75aaba5b15e..758a358e9f3 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp @@ -16,7 +16,7 @@ class TransposeTransformationTestValues { public: ngraph::PartialShape inputShape; std::vector transposeConstValues; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::element::Type precisionBeforeFq; ngraph::builder::subgraph::FakeQuantizeOnData fqOnData; }; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp index c9bf39e29fd..bf96a3868f0 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp @@ -22,7 +22,7 @@ public: typedef std::tuple< ngraph::element::Type, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, UnsqueezeTransformationParam > UnsqueezeTransformationParams; diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp index 1806df48c71..61b3f8b707a 100644 --- a/src/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp +++ b/src/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp @@ -19,7 +19,7 @@ typedef std::tuple< ngraph::element::Type, ngraph::PartialShape, std::string, - ngraph::pass::low_precision::LayerTransformation::Params, + ov::pass::low_precision::LayerTransformation::Params, VariadicSplitTransformationParam > VariadicSplitTransformationParams; diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/assign_and_read_value_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/assign_and_read_value_transformation.cpp index cb36f582132..054c7e081f0 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/assign_and_read_value_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/assign_and_read_value_transformation.cpp @@ -17,7 +17,7 @@ std::string AssignAndReadValueTransformation::getTestCaseName(const testing::Tes ngraph::PartialShape inputShape; size_t opset; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; AssignAndReadValueTransformationParam param;; std::tie(netPrecision, inputShape, opset, targetDevice, params, param) = obj.param; @@ -31,7 +31,7 @@ void AssignAndReadValueTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; size_t opset; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; AssignAndReadValueTransformationParam param; std::tie(netPrecision, inputShape, opset, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/clamp_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/clamp_transformation.cpp index 66e70ddab92..cb5bfa1c261 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/clamp_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/clamp_transformation.cpp @@ -16,7 +16,7 @@ std::string ClampTransformation::getTestCaseName(const testing::TestParamInfoGetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_child_and_output.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_child_and_output.cpp index 05672fd4628..e588a9edeb9 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_child_and_output.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_child_and_output.cpp @@ -24,7 +24,7 @@ std::string ConcatWithChildAndOutputTransformation::getTestCaseName(const testin ngraph::PartialShape inputShapes; std::string targetDevice; ConcatWithChildAndOutputTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = obj.param; std::ostringstream result; @@ -49,7 +49,7 @@ void ConcatWithChildAndOutputTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; ConcatWithChildAndOutputTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = this->GetParam(); function = ngraph::builder::subgraph::ConcatFunction::getOriginalWithChildAndOutput( diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_different_precision_on_children.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_different_precision_on_children.cpp index be1c497496c..91d15a73b63 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_different_precision_on_children.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_different_precision_on_children.cpp @@ -24,7 +24,7 @@ std::string ConcatWithDifferentChildrenTransformation::getTestCaseName(const tes ngraph::PartialShape inputShapes; std::string targetDevice; ConcatWithDifferentChildrenTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = obj.param; std::ostringstream result; @@ -40,7 +40,7 @@ InferenceEngine::Blob::Ptr ConcatWithDifferentChildrenTransformation::GenerateIn ngraph::PartialShape inputShapes; std::string targetDevice; ConcatWithDifferentChildrenTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = this->GetParam(); const float k = (info.name() == "input1") ? 1.f : (info.name() == "input2" ? 2.f : 3.f); @@ -51,7 +51,7 @@ void ConcatWithDifferentChildrenTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; ConcatWithDifferentChildrenTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = this->GetParam(); function = ngraph::builder::subgraph::ConcatFunction::getOriginalWithDifferentPrecisionOnChildren( diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_intermediate_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_intermediate_transformation.cpp index ef3794509d8..cf9938ac4bb 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_intermediate_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_intermediate_transformation.cpp @@ -23,7 +23,7 @@ std::string ConcatWithIntermediateTransformation::getTestCaseName(const testing: ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; bool transparentIntermediate; bool multichannel; std::tie(netPrecision, inputShapes, targetDevice, params, transparentIntermediate, multichannel) = obj.param; @@ -41,7 +41,7 @@ InferenceEngine::Blob::Ptr ConcatWithIntermediateTransformation::GenerateInput(c ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params trasformationParams; + ov::pass::low_precision::LayerTransformation::Params trasformationParams; bool transparentIntermediate; bool multichannel; std::tie(netPrecision, inputShape, targetDevice, trasformationParams, transparentIntermediate, multichannel) = this->GetParam(); @@ -61,7 +61,7 @@ InferenceEngine::Blob::Ptr ConcatWithIntermediateTransformation::GenerateInput(c void ConcatWithIntermediateTransformation::SetUp() { ngraph::element::Type ngPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params trasformationParams; + ov::pass::low_precision::LayerTransformation::Params trasformationParams; bool transparentIntermediate; bool multichannel; std::tie(ngPrecision, inputShape, targetDevice, trasformationParams, transparentIntermediate, multichannel) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp index f91da3852a1..c28f137e13d 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_neighbors_graph_transformation.cpp @@ -20,7 +20,7 @@ std::string ConcatWithNeighborsGraphTransformation::getTestCaseName(const testin ngraph::element::Type precision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(precision, inputShapes, targetDevice, params) = obj.param; return getTestCaseNameByParams(precision, inputShapes, targetDevice, params); @@ -30,7 +30,7 @@ InferenceEngine::Blob::Ptr ConcatWithNeighborsGraphTransformation::GenerateInput ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShape, targetDevice, params) = this->GetParam(); if ((info.name() != "input1") && (info.name() != "input2") && (info.name() != "input3")) { @@ -44,7 +44,7 @@ void ConcatWithNeighborsGraphTransformation::SetUp() { threshold = 2.e-2; ngraph::element::Type ngPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(ngPrecision, inputShape, targetDevice, params) = this->GetParam(); function = ngraph::builder::subgraph::ConcatFunction::getOriginalWithNeighbors( diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_split_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_split_transformation.cpp index dddc9575099..931433870e3 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_split_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/concat_with_split_transformation.cpp @@ -24,7 +24,7 @@ std::string ConcatWithSplitTransformation::getTestCaseName(const testing::TestPa ngraph::PartialShape inputShapes; std::string targetDevice; ConcatWithSplitTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = obj.param; std::ostringstream result; @@ -37,7 +37,7 @@ InferenceEngine::Blob::Ptr ConcatWithSplitTransformation::GenerateInput(const In ngraph::PartialShape inputShapes; std::string targetDevice; ConcatWithSplitTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = this->GetParam(); const float k = (info.name() == "input1") ? 1.f : (info.name() == "input2" ? 2.f : 3.f); @@ -56,7 +56,7 @@ void ConcatWithSplitTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; ConcatWithSplitTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, param, params) = this->GetParam(); function = ngraph::builder::subgraph::ConcatFunction::getOriginalWithSplitedIntermediate( diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_backprop_data_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_backprop_data_transformation.cpp index 2573bae1b83..5a75d712c78 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_backprop_data_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_backprop_data_transformation.cpp @@ -17,7 +17,7 @@ std::string ConvolutionBackpropDataTransformation::getTestCaseName(const testing std::pair inputShape; ngraph::Shape outputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionBackpropDataTransformationParam param; std::tie(netPrecision, inputShape, outputShape, targetDevice, params, param) = obj.param; @@ -36,7 +36,7 @@ void ConvolutionBackpropDataTransformation::SetUp() { ngraph::element::Type netPrecision; std::pair inputShapeAndHandling; ngraph::Shape outputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionBackpropDataTransformationParam param; std::tie(netPrecision, inputShapeAndHandling, outputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_qdq_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_qdq_transformation.cpp index f73cd7f4529..43ee1c173e9 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_qdq_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_qdq_transformation.cpp @@ -24,7 +24,7 @@ std::string ConvolutionQDqTransformation::getTestCaseName(const testing::TestPar ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionQDqTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -38,7 +38,7 @@ void ConvolutionQDqTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionQDqTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp index 4a589494dae..dc3bc4eccc9 100755 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp @@ -24,7 +24,7 @@ std::string ConvolutionTransformation::getTestCaseName(const testing::TestParamI ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -41,7 +41,7 @@ void ConvolutionTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp index f53a0908d2e..dda20a6afd3 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp @@ -24,7 +24,7 @@ std::string ConvolutionWIthIncorrectWeightsTransformation::getTestCaseName(const ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionWIthIncorrectWeightsParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -41,7 +41,7 @@ void ConvolutionWIthIncorrectWeightsTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ConvolutionWIthIncorrectWeightsParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_avg_pool_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_avg_pool_transformation.cpp index 49087c50819..bce876247eb 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_avg_pool_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_avg_pool_transformation.cpp @@ -20,7 +20,7 @@ std::string FakeQuantizeAndAvgPoolTransformation::getTestCaseName(const testing: ngraph::element::Type precision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::builder::subgraph::FakeQuantizeOnData fakeQuantize; std::tie(precision, inputShapes, targetDevice, params, fakeQuantize) = obj.param; @@ -31,7 +31,7 @@ void FakeQuantizeAndAvgPoolTransformation::SetUp() { threshold = 0.5f; ngraph::element::Type precision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::builder::subgraph::FakeQuantizeOnData fakeQuantize; std::tie(precision, inputShape, targetDevice, params, fakeQuantize) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_max_pool_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_max_pool_transformation.cpp index e874d741a09..8960c081f23 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_max_pool_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_max_pool_transformation.cpp @@ -20,7 +20,7 @@ std::string FakeQuantizeAndMaxPoolTransformation::getTestCaseName(const testing: ngraph::element::Type precision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::builder::subgraph::FakeQuantizeOnData fakeQuantize; std::tie(precision, inputShapes, targetDevice, params, fakeQuantize) = obj.param; @@ -30,7 +30,7 @@ std::string FakeQuantizeAndMaxPoolTransformation::getTestCaseName(const testing: void FakeQuantizeAndMaxPoolTransformation::SetUp() { ngraph::element::Type precision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::builder::subgraph::FakeQuantizeOnData fakeQuantize; std::tie(precision, inputShape, targetDevice, params, fakeQuantize) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp index 1094a49837d..36ae033af96 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp @@ -24,7 +24,7 @@ std::string FakeQuantizeAndTwoOutputBranchesWithConvolutionTransformation::getTe ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizeAndTwoOutputBranchesWithConvolution testValues; std::tie(netPrecision, inputShape, targetDevice, params, testValues) = obj.param; @@ -39,7 +39,7 @@ void FakeQuantizeAndTwoOutputBranchesWithConvolutionTransformation::SetUp() { threshold = 0.1f; ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizeAndTwoOutputBranchesWithConvolution testValues; std::tie(netPrecision, inputShape, targetDevice, params, testValues) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_precision_selection_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_precision_selection_transformation.cpp index f68ed23dc08..0d3ed87d9da 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_precision_selection_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_precision_selection_transformation.cpp @@ -19,7 +19,7 @@ std::string FakeQuantizePrecisionSelectionTransformation::getTestCaseName(const ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizePrecisionSelectionTransformationTestValues testValues; std::tie(netPrecision, inputShape, targetDevice, params, testValues) = obj.param; @@ -31,7 +31,7 @@ std::string FakeQuantizePrecisionSelectionTransformation::getTestCaseName(const void FakeQuantizePrecisionSelectionTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizePrecisionSelectionTransformationTestValues testValues; std::tie(netPrecision, inputShape, targetDevice, params, testValues) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_transformation.cpp index ca0419be5ed..00cf867321a 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_transformation.cpp @@ -21,7 +21,7 @@ std::string FakeQuantizeTransformation::getTestCaseName(const testing::TestParam ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizeTransformationParam testParams; bool isConvertOnConstants; std::tie(netPrecision, inputShape, targetDevice, params, testParams, isConvertOnConstants) = obj.param; @@ -35,7 +35,7 @@ std::string FakeQuantizeTransformation::getTestCaseName(const testing::TestParam void FakeQuantizeTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizeTransformationParam testParams; bool isConvertOnConstants; std::tie(netPrecision, inputShape, targetDevice, params, testParams, isConvertOnConstants) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.cpp index 3c555b3089e..b2ed6e3bef0 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.cpp @@ -19,7 +19,7 @@ std::string FakeQuantizeWithNotOptimalTransformation::getTestCaseName(const test ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizeWithNotOptimalTransformationTestValues testValues; std::tie(netPrecision, inputShapes, targetDevice, params, testValues) = obj.param; @@ -32,7 +32,7 @@ void FakeQuantizeWithNotOptimalTransformation::SetUp() { SKIP_IF_CURRENT_TEST_IS_DISABLED(); ngraph::PartialShape inputShape; ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; FakeQuantizeWithNotOptimalTransformationTestValues testValues; std::tie(netPrecision, inputShape, targetDevice, params, testValues) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp index e84509bcb17..4cdee6b5d21 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp @@ -25,7 +25,7 @@ std::string FullyConnectedTransformation::getTestCaseName(const testing::TestPar ngraph::element::Type precision; MatMulShapes shapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(precision, shapes, targetDevice, params) = obj.param; std::ostringstream result; @@ -41,7 +41,7 @@ std::string FullyConnectedTransformation::getTestCaseName(const testing::TestPar void FullyConnectedTransformation::SetUp() { ngraph::element::Type precision; MatMulShapes shapes; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(precision, shapes, targetDevice, params) = this->GetParam(); function = ngraph::builder::subgraph::MatMulFunction::getOriginal( diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp index b1221d56c97..b8525a25817 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp @@ -18,7 +18,7 @@ std::string FuseFakeQuantizeAndScaleShiftTransformation::getTestCaseName(const t ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::builder::subgraph::FakeQuantizeOnData fakeQuantizeOnData; std::tie(netPrecision, inputShape, targetDevice, params, fakeQuantizeOnData) = obj.param; @@ -30,7 +30,7 @@ std::string FuseFakeQuantizeAndScaleShiftTransformation::getTestCaseName(const t void FuseFakeQuantizeAndScaleShiftTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::builder::subgraph::FakeQuantizeOnData fakeQuantizeOnData; std::tie(netPrecision, inputShape, targetDevice, params, fakeQuantizeOnData) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp index f57b22d9fff..dcb5e9af464 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp @@ -25,7 +25,7 @@ std::string GemmTransformation::getTestCaseName(const testing::TestParamInfoGetParam(); const float low = 0.f; // params.precisionsOnActivations[0] == ngraph::element::u8 ? 0.f : -128.f; diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp index 6cde4070585..4461749510e 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp @@ -22,7 +22,7 @@ namespace LayerTestsDefinitions { std::string GroupConvolutionTransformation::getTestCaseName(const testing::TestParamInfo& obj) { ngraph::element::Type netPrecision; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::pair inputShapes; GroupConvolutionTransformationParam param; bool addPrecisionPreserved; @@ -47,7 +47,7 @@ void GroupConvolutionTransformation::SetUp() { threshold = 0.1f; ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::pair inputShapes; GroupConvolutionTransformationParam param; bool addPrecisionPreserved; diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/groupconvolution_qdq_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/groupconvolution_qdq_transformation.cpp index 59af85d0ed3..e771223c3f4 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/groupconvolution_qdq_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/groupconvolution_qdq_transformation.cpp @@ -24,7 +24,7 @@ std::string GroupConvolutionQDqTransformation::getTestCaseName(const testing::Te ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; GroupConvolutionQDqTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -38,7 +38,7 @@ void GroupConvolutionQDqTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; GroupConvolutionQDqTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fq.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fq.cpp index 72d70b8caac..02e9a345be4 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fq.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fq.cpp @@ -25,7 +25,7 @@ std::string MatMulWithOptimizedConstantFq::getTestCaseName( ngraph::element::Type netPrecision; std::pair shapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; MatMulWithOptimizedConstantFakeQuantizeTransformationTestValues param; std::tie(netPrecision, shapes, targetDevice, param) = obj.param; @@ -44,7 +44,7 @@ void MatMulWithOptimizedConstantFq::SetUp() { ngraph::element::Type precision; std::pair shapes; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; MatMulWithOptimizedConstantFakeQuantizeTransformationTestValues param; std::tie(precision, shapes, targetDevice, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/move_fake_quantize_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/move_fake_quantize_transformation.cpp index 1e14a9005ff..2bcfaf6e93b 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/move_fake_quantize_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/move_fake_quantize_transformation.cpp @@ -22,7 +22,7 @@ std::string MoveFakeQuantizeTransformation::getTestCaseName(testing::TestParamIn ngraph::element::Type netPrecision; std::vector inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; bool oneInputWithSplit; MoveFakeQuantizeTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, oneInputWithSplit, param) = obj.param; @@ -39,7 +39,7 @@ std::string MoveFakeQuantizeTransformation::getTestCaseName(testing::TestParamIn void MoveFakeQuantizeTransformation::SetUp() { ngraph::element::Type netPrecision; std::vector inputShapes; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; bool oneInputWithSplit; MoveFakeQuantizeTransformationParam param; std::tie(netPrecision, inputShapes, targetDevice, params, oneInputWithSplit, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/multiply_with_one_parent_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/multiply_with_one_parent_transformation.cpp index 82fb73dbdb9..8a13a66fc99 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/multiply_with_one_parent_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/multiply_with_one_parent_transformation.cpp @@ -33,7 +33,7 @@ void MultiplyWithOneParentTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; MultiplyWithOneParentTransformationValues values; std::tie(netPrecision, inputShape, targetDevice, values) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat.cpp index 759fe60fe87..a06a2c46d89 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat.cpp @@ -25,7 +25,7 @@ std::string OutputLayersConcat::getTestCaseName(const testing::TestParamInfoGetParam(); if ((info.name() != "input1") && (info.name() != "input2")) { @@ -65,7 +65,7 @@ InferenceEngine::Blob::Ptr OutputLayersConcat::GenerateInput(const InferenceEngi void OutputLayersConcat::SetUp() { InferenceEngine::SizeVector inputShape1; InferenceEngine::Precision netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShape1, targetDevice, params) = this->GetParam(); auto ngPrecision = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat_multi_channel.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat_multi_channel.cpp index 85310a0b51c..345c633f73a 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat_multi_channel.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_concat_multi_channel.cpp @@ -33,7 +33,7 @@ std::string OutputLayersConcatMultiChannel::getTestCaseName( InferenceEngine::Precision netPrecision; InferenceEngine::SizeVector inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, params) = obj.param; return getTestCaseNameByParams(netPrecision, inputShapes, targetDevice, params); @@ -43,7 +43,7 @@ InferenceEngine::Blob::Ptr OutputLayersConcatMultiChannel::GenerateInput(const I InferenceEngine::SizeVector inputShape; InferenceEngine::Precision netPrecision; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShape, targetDevice, params) = this->GetParam(); if ((info.name() != "input1") && (info.name() != "input2")) { @@ -77,7 +77,7 @@ void OutputLayersConcatMultiChannel::SetUp() { InferenceEngine::SizeVector inputShape1; InferenceEngine::Precision netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShape1, targetDevice, params) = this->GetParam(); auto ngPrecision = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp index 81f92e9d9dc..5e5d98354d4 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp @@ -25,7 +25,7 @@ std::string OutputLayers::getTestCaseName(const testing::TestParamInfoGetParam(); const float k = 1.f; @@ -49,7 +49,7 @@ InferenceEngine::Blob::Ptr OutputLayers::GenerateInput(const InferenceEngine::In void OutputLayers::SetUp() { InferenceEngine::SizeVector inputShape; InferenceEngine::Precision netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShape, targetDevice, params) = this->GetParam(); auto ngPrecision = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/pad_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/pad_transformation.cpp index a4ecd177b4b..29933ae1bfe 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/pad_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/pad_transformation.cpp @@ -17,7 +17,7 @@ std::string PadTransformation::getTestCaseName(const testing::TestParamInfoGetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/pull_reshape_through_dequantization_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/pull_reshape_through_dequantization_transformation.cpp index 1e02d9730aa..c4739d402a8 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/pull_reshape_through_dequantization_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/pull_reshape_through_dequantization_transformation.cpp @@ -24,7 +24,7 @@ std::string PullReshapeThroughDequantizationTransformation::getTestCaseName(cons ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::Shape elementwiseConstantShapes; PullReshapeThroughDequantizationTestValues testValues; std::tie(netPrecision, inputShape, targetDevice, params, elementwiseConstantShapes, testValues) = obj.param; @@ -46,7 +46,7 @@ void PullReshapeThroughDequantizationTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ngraph::Shape elementwiseConstantShapes; PullReshapeThroughDequantizationTestValues testValues; std::tie(netPrecision, inputShape, targetDevice, params, elementwiseConstantShapes, testValues) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/recurrent_cell_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/recurrent_cell_transformation.cpp index cb42e020104..85188cd1d52 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/recurrent_cell_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/recurrent_cell_transformation.cpp @@ -24,7 +24,7 @@ std::string RecurrentCellTransformation::getTestCaseName(testing::TestParamInfo< std::vector weightsShape; std::string targetDevice; RecurrentCellTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, activationsShape, weightsShape, targetDevice, params, param) = obj.param; std::ostringstream result; @@ -41,7 +41,7 @@ void RecurrentCellTransformation::SetUp() { std::vector activations_shapes; std::vector weights_shapes; RecurrentCellTransformationParam param; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(precision, activations_shapes, weights_shapes, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_max_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_max_transformation.cpp index 4d95169129e..fef1c1bf5c6 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_max_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_max_transformation.cpp @@ -16,7 +16,7 @@ std::string ReduceMaxTransformation::getTestCaseName(const testing::TestParamInf ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceMaxTransformationParam param;; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -33,7 +33,7 @@ std::string ReduceMaxTransformation::getTestCaseName(const testing::TestParamInf void ReduceMaxTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceMaxTransformationParam param;; std::tie(netPrecision, inputShape, targetDevice, params, param) = GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_mean_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_mean_transformation.cpp index 32b35419459..aed68685e38 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_mean_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_mean_transformation.cpp @@ -23,7 +23,7 @@ std::string ReduceMeanTransformation::getTestCaseName(const testing::TestParamIn ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceMeanTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -45,7 +45,7 @@ std::string ReduceMeanTransformation::getTestCaseName(const testing::TestParamIn void ReduceMeanTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceMeanTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_min_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_min_transformation.cpp index eb7d83f351e..77e09b06074 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_min_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_min_transformation.cpp @@ -16,7 +16,7 @@ std::string ReduceMinTransformation::getTestCaseName(const testing::TestParamInf ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceMinTransformationParam param;; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -33,7 +33,7 @@ std::string ReduceMinTransformation::getTestCaseName(const testing::TestParamInf void ReduceMinTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceMinTransformationParam param;; std::tie(netPrecision, inputShape, targetDevice, params, param) = GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_sum_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_sum_transformation.cpp index c43d3beccb9..bed234c41f6 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_sum_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/reduce_sum_transformation.cpp @@ -16,7 +16,7 @@ std::string ReduceSumTransformation::getTestCaseName(const testing::TestParamInf ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceSumTransformationParam param;; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -33,7 +33,7 @@ std::string ReduceSumTransformation::getTestCaseName(const testing::TestParamInf void ReduceSumTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReduceSumTransformationParam param;; std::tie(netPrecision, inputShape, targetDevice, params, param) = GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/reshape_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/reshape_transformation.cpp index bb0b69ed101..1ecd3dac920 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/reshape_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/reshape_transformation.cpp @@ -16,7 +16,7 @@ namespace LayerTestsDefinitions { std::string ReshapeTransformation::getTestCaseName(const testing::TestParamInfo& obj) { ngraph::element::Type netPrecision; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReshapeTransformationParam param; std::tie(netPrecision, targetDevice, params, param) = obj.param; @@ -35,7 +35,7 @@ std::string ReshapeTransformation::getTestCaseName(const testing::TestParamInfo< void ReshapeTransformation::SetUp() { ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ReshapeTransformationParam param; std::tie(netPrecision, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/shuffle_channels_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/shuffle_channels_transformation.cpp index aa8d1ed6d64..67a9f881820 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/shuffle_channels_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/shuffle_channels_transformation.cpp @@ -22,7 +22,7 @@ std::string ShuffleChannelsTransformation::getTestCaseName(const testing::TestPa ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ShuffleChannelsTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -35,7 +35,7 @@ std::string ShuffleChannelsTransformation::getTestCaseName(const testing::TestPa void ShuffleChannelsTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; ShuffleChannelsTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/split_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/split_transformation.cpp index 8f5284ca724..138aa984786 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/split_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/split_transformation.cpp @@ -19,7 +19,7 @@ std::string SplitTransformation::getTestCaseName(const testing::TestParamInfoGetParam(); const auto& fqOnData = param.fakeQuantize; @@ -48,7 +48,7 @@ InferenceEngine::Blob::Ptr SplitTransformation::GenerateInput(const InferenceEng void SplitTransformation::SetUp() { ngraph::element::Type precision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; SplitTransformationParam param; std::tie(precision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/squeeze_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/squeeze_transformation.cpp index a1e791623a3..a3f8c75f780 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/squeeze_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/squeeze_transformation.cpp @@ -31,7 +31,7 @@ inline std::ostream& operator<<(std::ostream& os, const std::vector& valu InferenceEngine::Blob::Ptr SqueezeTransformation::GenerateInput(const InferenceEngine::InputInfo &info) const { ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; SqueezeTransformationParam squeezeParam; std::string targetDevice; @@ -48,7 +48,7 @@ InferenceEngine::Blob::Ptr SqueezeTransformation::GenerateInput(const InferenceE std::string SqueezeTransformation::getTestCaseName(const testing::TestParamInfo& obj) { ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::string targetDevice; SqueezeTransformationParam squeezeParam; std::tie(netPrecision, targetDevice, params, squeezeParam) = obj.param; @@ -64,7 +64,7 @@ std::string SqueezeTransformation::getTestCaseName(const testing::TestParamInfo< } void SqueezeTransformation::SetUp() { ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; SqueezeTransformationParam squeezeParam; std::tie(netPrecision, targetDevice, params, squeezeParam) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/strided_slice_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/strided_slice_transformation.cpp index 44b782f28e5..c5aec0401f7 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/strided_slice_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/strided_slice_transformation.cpp @@ -28,7 +28,7 @@ std::string StridedSliceTransformation::getTestCaseName(const testing::TestParam ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; StridedSliceTransformationParam param;; std::tie(netPrecision, inputShape, targetDevice, params, param) = obj.param; @@ -43,7 +43,7 @@ std::string StridedSliceTransformation::getTestCaseName(const testing::TestParam void StridedSliceTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; StridedSliceTransformationParam param; std::tie(netPrecision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/subtract_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/subtract_transformation.cpp index 0b9366b5457..30c270146e1 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/subtract_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/subtract_transformation.cpp @@ -21,7 +21,7 @@ std::string SubtractTransformation::getTestCaseName(const testing::TestParamInfo ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShapes, targetDevice, params) = obj.param; return getTestCaseNameByParams(netPrecision, inputShapes, targetDevice, params); @@ -30,7 +30,7 @@ std::string SubtractTransformation::getTestCaseName(const testing::TestParamInfo void SubtractTransformation::SetUp() { ngraph::element::Type netPrecision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::tie(netPrecision, inputShape, targetDevice, params) = this->GetParam(); function = ngraph::builder::subgraph::SubtractFunction::getOriginal(netPrecision, inputShape); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp index bfec9f2fff1..adac1f49a5a 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp @@ -25,7 +25,7 @@ std::string TransposeAfterMatMulTransformation::getTestCaseName(const testing::T ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; bool perTensor; bool transposeChannelDim; std::tie(netPrecision, inputShapes, targetDevice, params, perTensor, transposeChannelDim) = obj.param; @@ -40,7 +40,7 @@ std::string TransposeAfterMatMulTransformation::getTestCaseName(const testing::T void TransposeAfterMatMulTransformation::SetUp() { ngraph::element::Type precision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; bool perTensor; bool transposeChannelDim; std::tie(precision, inputShape, targetDevice, params, perTensor, transposeChannelDim) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/unsqueeze_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/unsqueeze_transformation.cpp index cce6815222f..afe6fe82c1c 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/unsqueeze_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/unsqueeze_transformation.cpp @@ -31,7 +31,7 @@ inline std::ostream& operator<<(std::ostream& os, const std::vector& valu InferenceEngine::Blob::Ptr UnsqueezeTransformation::GenerateInput(const InferenceEngine::InputInfo &info) const { ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; UnsqueezeTransformationParam squeezeParam; std::string targetDevice; @@ -48,7 +48,7 @@ InferenceEngine::Blob::Ptr UnsqueezeTransformation::GenerateInput(const Inferenc std::string UnsqueezeTransformation::getTestCaseName(const testing::TestParamInfo& obj) { ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; std::string targetDevice; UnsqueezeTransformationParam unsqueezeParam; std::tie(netPrecision, targetDevice, params, unsqueezeParam) = obj.param; @@ -64,7 +64,7 @@ std::string UnsqueezeTransformation::getTestCaseName(const testing::TestParamInf } void UnsqueezeTransformation::SetUp() { ngraph::element::Type netPrecision; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; UnsqueezeTransformationParam unsqueezeParam; std::tie(netPrecision, targetDevice, params, unsqueezeParam) = this->GetParam(); diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/variadic_split_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/variadic_split_transformation.cpp index 7a7d26fd169..67af8ec240a 100644 --- a/src/tests/functional/plugin/shared/src/low_precision_transformations/variadic_split_transformation.cpp +++ b/src/tests/functional/plugin/shared/src/low_precision_transformations/variadic_split_transformation.cpp @@ -19,7 +19,7 @@ std::string VariadicSplitTransformation::getTestCaseName(const testing::TestPara ngraph::element::Type netPrecision; ngraph::PartialShape inputShapes; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; VariadicSplitTransformationParam param; std::tie(netPrecision, inputShapes, targetDevice, params, param) = obj.param; @@ -40,7 +40,7 @@ InferenceEngine::Blob::Ptr VariadicSplitTransformation::GenerateInput(const Infe ngraph::element::Type precision; ngraph::PartialShape inputShape; std::string targetDevice; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; VariadicSplitTransformationParam param; std::tie(precision, inputShape, targetDevice, params, param) = this->GetParam(); const auto& fqOnData = param.fakeQuantize; @@ -55,7 +55,7 @@ InferenceEngine::Blob::Ptr VariadicSplitTransformation::GenerateInput(const Infe void VariadicSplitTransformation::SetUp() { ngraph::element::Type precision; ngraph::PartialShape inputShape; - ngraph::pass::low_precision::LayerTransformation::Params params; + ov::pass::low_precision::LayerTransformation::Params params; VariadicSplitTransformationParam param; std::tie(precision, inputShape, targetDevice, params, param) = this->GetParam(); diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp index 1b1a83d2829..05e5fa6874c 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp @@ -21,10 +21,10 @@ namespace LayerTestsUtils { class LayerTransformationParamsNGraphFactory { public: - static ngraph::pass::low_precision::LayerTransformation::Params createParamsU8I8AndI8(); - static ngraph::pass::low_precision::LayerTransformation::Params createParamsU8I8(); - static ngraph::pass::low_precision::LayerTransformation::Params createParamsI8I8(); - static ngraph::pass::low_precision::LayerTransformation::Params createParams(); + static ov::pass::low_precision::LayerTransformation::Params createParamsU8I8AndI8(); + static ov::pass::low_precision::LayerTransformation::Params createParamsU8I8(); + static ov::pass::low_precision::LayerTransformation::Params createParamsI8I8(); + static ov::pass::low_precision::LayerTransformation::Params createParams(); }; class LayerTransformationParamsFactory : public LayerTransformationParamsNGraphFactory { @@ -41,25 +41,25 @@ protected: static std::pair getQuantizationInterval(const ngraph::element::Type precision); - static std::string toString(const ngraph::pass::low_precision::LayerTransformation::Params& params); + static std::string toString(const ov::pass::low_precision::LayerTransformation::Params& params); static std::string getTestCaseNameByParams( const InferenceEngine::Precision precision, const InferenceEngine::SizeVector& inputShapes, const std::string& targetDevice, - const ngraph::pass::low_precision::LayerTransformation::Params& params); + const ov::pass::low_precision::LayerTransformation::Params& params); static std::string getTestCaseNameByParams( const ngraph::element::Type precision, const ngraph::PartialShape& inputShapes, const std::string& targetDevice, - const ngraph::pass::low_precision::LayerTransformation::Params& params); + const ov::pass::low_precision::LayerTransformation::Params& params); }; typedef std::tuple< InferenceEngine::Precision, InferenceEngine::SizeVector, std::string, - ngraph::pass::low_precision::LayerTransformation::Params> LayerTransformationParams; + ov::pass::low_precision::LayerTransformation::Params> LayerTransformationParams; } // namespace LayerTestsUtils diff --git a/src/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp b/src/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp index d9ea319fc2f..1380126e5a6 100644 --- a/src/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp +++ b/src/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp @@ -17,20 +17,20 @@ using namespace InferenceEngine; using namespace ngraph; namespace LayerTestsUtils { -ngraph::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParamsU8I8AndI8() { - return ngraph::pass::low_precision::LayerTransformation::Params(); +ov::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParamsU8I8AndI8() { + return ov::pass::low_precision::LayerTransformation::Params(); } -ngraph::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParamsU8I8() { - return ngraph::pass::low_precision::LayerTransformation::Params(); +ov::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParamsU8I8() { + return ov::pass::low_precision::LayerTransformation::Params(); } -ngraph::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParamsI8I8() { - return ngraph::pass::low_precision::LayerTransformation::Params(); +ov::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParamsI8I8() { + return ov::pass::low_precision::LayerTransformation::Params(); } -ngraph::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParams() { - return ngraph::pass::low_precision::LayerTransformation::Params(); +ov::pass::low_precision::LayerTransformation::Params LayerTransformationParamsNGraphFactory::createParams() { + return ov::pass::low_precision::LayerTransformation::Params(); } LayerTransformation::LayerTransformation() { @@ -57,8 +57,8 @@ std::pair LayerTransformation::getQuantizationInterval(const ngrap return std::make_pair(low, hight); } -std::string LayerTransformation::toString(const ngraph::pass::low_precision::LayerTransformation::Params& params) { - using namespace ngraph::pass::low_precision; +std::string LayerTransformation::toString(const ov::pass::low_precision::LayerTransformation::Params& params) { + using namespace ov::pass::low_precision; std::ostringstream result; result << (params.updatePrecisions ? "" : "notUpdatePrecisions_") << @@ -71,7 +71,7 @@ std::string LayerTransformation::getTestCaseNameByParams( const InferenceEngine::Precision precision, const InferenceEngine::SizeVector& inputShapes, const std::string& targetDevice, - const ngraph::pass::low_precision::LayerTransformation::Params& params) { + const ov::pass::low_precision::LayerTransformation::Params& params) { std::ostringstream result; result << precision.name() << "_" << ngraph::Shape(inputShapes) << "_" << targetDevice << "_" << toString(params); return result.str(); @@ -81,7 +81,7 @@ std::string LayerTransformation::getTestCaseNameByParams( const ngraph::element::Type precision, const ngraph::PartialShape& inputShapes, const std::string& targetDevice, - const ngraph::pass::low_precision::LayerTransformation::Params& params) { + const ov::pass::low_precision::LayerTransformation::Params& params) { std::ostringstream result; result << precision << "_" << inputShapes << "_" << targetDevice << "_" << toString(params); return result.str(); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/add_function.hpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/add_function.hpp index 2370f178491..98b435b75da 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/add_function.hpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/add_function.hpp @@ -63,7 +63,7 @@ public: const ngraph::PartialShape& inputShape1, const ngraph::PartialShape& inputShape2, const bool broadcast, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type& precision1, const ngraph::builder::subgraph::DequantizationOperations& dequantization1, const ngraph::element::Type& precision2, @@ -85,7 +85,7 @@ public: const ngraph::PartialShape& inputShape1, const ngraph::PartialShape& inputShape2, const bool broadcast, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type& precision1, const ngraph::builder::subgraph::DequantizationOperations& dequantization1, const ngraph::element::Type& precision2, diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/common/builders.hpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/common/builders.hpp index a643a4ead67..a266e23efee 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/common/builders.hpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/common/builders.hpp @@ -52,13 +52,13 @@ std::shared_ptr makeElementwise(const std::shared_ptr data, std::vector{element::f32, element::f32}, std::vector{}, ov::op::TemporaryReplaceOutputType(data, element::f32).get(), ov::op::TemporaryReplaceOutputType(operationConst, element::f32).get()); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(operation, description.outPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(operation, description.outPrecision); } if (ov::is_type(operation) || ov::is_type(operation)) { replace_node( operationConst, - ngraph::pass::low_precision::fold(operationConst, data->get_output_element_type(0))); + ov::pass::low_precision::fold(operationConst, data->get_output_element_type(0))); } return operation; diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/convolution_function.hpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/convolution_function.hpp index b47541af9a5..fbf8aed8f67 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/convolution_function.hpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/convolution_function.hpp @@ -73,7 +73,7 @@ public: const ngraph::builder::subgraph::FakeQuantizeOnData& fakeQuantizeOnData, const std::vector& weightsValues, const ngraph::builder::subgraph::FakeQuantizeOnWeights& fakeQuantizeOnWeights, - const std::vector& restrictions = {}); + const std::vector& restrictions = {}); }; } // namespace subgraph } // namespace builder diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/elementwise_with_multi_parent_dequantization_function.hpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/elementwise_with_multi_parent_dequantization_function.hpp index 5756a36e0bc..0c5542dd705 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/elementwise_with_multi_parent_dequantization_function.hpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/elementwise_with_multi_parent_dequantization_function.hpp @@ -58,7 +58,7 @@ public: static std::shared_ptr get( const ngraph::element::Type precision, const ngraph::Shape& inputShape, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type& precision1, const ngraph::builder::subgraph::DequantizationOperations& dequantization1, const ngraph::element::Type& precision2, diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_and_two_output_branches_with_convolution_function.hpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_and_two_output_branches_with_convolution_function.hpp index 22d10782696..8445e724589 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_and_two_output_branches_with_convolution_function.hpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_and_two_output_branches_with_convolution_function.hpp @@ -28,7 +28,7 @@ public: static std::shared_ptr getReference( const ngraph::element::Type precision, const ngraph::Shape& inputShape, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::builder::subgraph::FakeQuantizeOnData& fqOnData, const ngraph::element::Type precisionBeforeOp, const ngraph::builder::subgraph::DequantizationOperations& dequantizationBefore, diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_function.hpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_function.hpp index 1b02d8cc3a2..99890f00b5e 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_function.hpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/fake_quantize_function.hpp @@ -19,7 +19,7 @@ namespace subgraph { class FakeQuantizeFunction { public: static std::shared_ptr getOriginal( - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type precision, const ngraph::PartialShape& inputShape, const FakeQuantizeOnDataWithConstant& fakeQuantizeOnData, @@ -31,7 +31,7 @@ public: const FakeQuantizeOnData& fakeQuantizeOnData); static std::shared_ptr getReference( - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type precision, const ngraph::PartialShape& inputShape, const bool updatePrecisions, diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/get_dequantization_function.hpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/get_dequantization_function.hpp index d095adc8b0e..dcd2554b20a 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/get_dequantization_function.hpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/include/lpt_ngraph_functions/get_dequantization_function.hpp @@ -27,13 +27,13 @@ public: const ngraph::element::Type& precision, const Shape& shape, const FakeQuantizeOnData& fakeQuantize, - const ngraph::pass::low_precision::FakeQuantizeDequantization& dequantization); + const ov::pass::low_precision::FakeQuantizeDequantization& dequantization); static std::shared_ptr getOriginal( bool isConvert, bool isSubtract, size_t subDataInput, size_t mulDataInput); static std::shared_ptr getReference( - ngraph::pass::low_precision::FakeQuantizeDequantization dequantization); + ov::pass::low_precision::FakeQuantizeDequantization dequantization); }; } // namespace subgraph } // namespace builder diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/add_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/add_function.cpp index 1a2699581f5..852a261c36d 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/add_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/add_function.cpp @@ -12,7 +12,7 @@ #include "lpt_ngraph_functions/common/dequantization_operations.hpp" #include "ngraph_functions/subgraph_builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { @@ -45,7 +45,7 @@ std::shared_ptr AddFunction::getOriginal( const ngraph::PartialShape& inputShape1, const ngraph::PartialShape& inputShape2, const bool broadcast, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type& precision1, const ngraph::builder::subgraph::DequantizationOperations& dequantization1, const ngraph::element::Type& precision2, @@ -211,7 +211,7 @@ std::shared_ptr AddFunction::getReference( const ngraph::PartialShape& inputShape1, const ngraph::PartialShape& inputShape2, const bool broadcast, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type& precision1, const ngraph::builder::subgraph::DequantizationOperations& dequantization1, const ngraph::element::Type& precision2, diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/align_concat_quantization_parameters_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/align_concat_quantization_parameters_function.cpp index 18c8e861778..aa2ba30494e 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/align_concat_quantization_parameters_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/align_concat_quantization_parameters_function.cpp @@ -136,7 +136,7 @@ std::shared_ptr AlignConcatQuantizationParametersFunction::get { FakeQuantizeOnData onData = { 256, {}, { -1.28f }, { 1.27f }, { 0.f }, { 255.f }, ngraph::element::u8}; parent1 = makeFakeQuantizeTypeRelaxed(input1, element::f32, onData); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(parent1, element::u8); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(parent1, element::u8); parent1->set_friendly_name("fakeQuantizeOnActivations1"); parent1 = std::make_shared( @@ -171,7 +171,7 @@ std::shared_ptr AlignConcatQuantizationParametersFunction::get { FakeQuantizeOnData onData = { 256, {}, { -0.64f }, { 0.635f }, { 64.f }, { 192.f }, element::u8}; parent2 = makeFakeQuantizeTypeRelaxed(input2, element::f32, onData); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(parent2, element::u8); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(parent2, element::u8); parent2->set_friendly_name("fakeQuantizeOnActivations2"); parent2 = std::make_shared( diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/clamp_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/clamp_function.cpp index 10af8234758..26f04534870 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/clamp_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/clamp_function.cpp @@ -84,7 +84,7 @@ std::shared_ptr ClampFunction::getReference( std::shared_ptr quantizationOpBefore = makeDequantization(input, dequantizationBefore); std::shared_ptr clamp = std::make_shared>(quantizationOpBefore, 0, 10); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(clamp, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(clamp, precisionAfterOperation); const std::shared_ptr quantizationOpAfter = makeDequantization(clamp, dequantizationAfter); quantizationOpAfter->set_friendly_name("output"); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/common/builders.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/common/builders.cpp index cf92ed5e04f..c2886c9efd9 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/common/builders.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/common/builders.cpp @@ -16,7 +16,7 @@ namespace ngraph { namespace builder { namespace subgraph { -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; std::shared_ptr makeDequantization( const Output& data, @@ -98,7 +98,7 @@ std::shared_ptr makeDequantization( ov::op::TemporaryReplaceOutputType(parent, element::f32).get()); } - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(subtract, dequantizationOperations.subtract.outPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(subtract, dequantizationOperations.subtract.outPrecision); } NetworkHelper::copyInfo({ data.get_node_shared_ptr(), subtract }, subtract); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/compose_fake_quantize_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/compose_fake_quantize_function.cpp index 41b2ed698f6..b2239126dd2 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/compose_fake_quantize_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/compose_fake_quantize_function.cpp @@ -9,7 +9,7 @@ #include "ngraph_functions/subgraph_builders.hpp" #include "lpt_ngraph_functions/common/builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp index 254e527ea13..9ff40b3961c 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp @@ -933,9 +933,9 @@ std::shared_ptr ConcatFunction::getReference( const ngraph::element::Type fakeQuantizePrecision = fakeQuantize1->get_output_element_type(0); if (fqOnDataPrecision != fakeQuantizePrecision) { - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize1, fqOnDataPrecision); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize2, fqOnDataPrecision); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, fqOnDataPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize1, fqOnDataPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize2, fqOnDataPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, fqOnDataPrecision); } } @@ -1168,7 +1168,7 @@ std::shared_ptr ConcatFunction::getReferenceWithNeighbors( input1->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); fakeQuantize1->set_friendly_name("fakeQuantize1"); const auto deqBefore1 = makeDequantization(fakeQuantize1, dequantizationBefore); @@ -1176,7 +1176,7 @@ std::shared_ptr ConcatFunction::getReferenceWithNeighbors( input2->set_friendly_name("input2"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); fakeQuantize2->set_friendly_name("fakeQuantize2"); const auto deqBefore2 = makeDequantization(fakeQuantize2, dequantizationBefore); @@ -1225,7 +1225,7 @@ std::shared_ptr ConcatFunction::getReferenceWithNeighbors( inputs.push_back(input3); const auto fakeQuantize3 = makeFakeQuantizeTypeRelaxed(input3, precision, fqOnData3); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize3, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize3, precisionBeforeOp); fakeQuantize3->set_friendly_name("fakeQuantize3"); const auto deqBefore3 = makeDequantization(fakeQuantize3, dequantizationBefore); @@ -1308,7 +1308,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediate( input1->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); fakeQuantize1->set_friendly_name("fakeQuantize1"); const auto deqBefore1 = makeDequantization(fakeQuantize1, dequantizationBefore1); @@ -1316,7 +1316,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediate( input2->set_friendly_name("input2"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); fakeQuantize2->set_friendly_name("fakeQuantize2"); const auto deqBefore2 = makeDequantization(fakeQuantize2, dequantizationBefore1); @@ -1344,7 +1344,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediate( ngraph::OutputVector { deqBefore1, intermediateOp }, 1); concat->set_friendly_name("concat"); - low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); auto& rtInfo = concat->get_rt_info(); rtInfo["Variant::std::string"] = "concat"; @@ -1400,7 +1400,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediateAv input1->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); fakeQuantize1->set_friendly_name("fakeQuantize1"); const auto deqBefore1 = makeDequantization(fakeQuantize1, dequantizationBefore1); @@ -1408,7 +1408,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediateAv input2->set_friendly_name("input2"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); fakeQuantize2->set_friendly_name("fakeQuantize2"); const auto deqBefore2 = makeDequantization(fakeQuantize2, dequantizationBefore2); @@ -1419,7 +1419,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediateAv ngraph::OutputVector { deqBefore1, intermediateOp }, 1); concat->set_friendly_name("concat"); - low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); auto& rtInfo = concat->get_rt_info(); rtInfo["Variant::std::string"] = "concat"; @@ -1477,7 +1477,7 @@ std::shared_ptr ConcatFunction::getReferenceWithSplitedInterme const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); fakeQuantize1->set_friendly_name("fakeQuantize1"); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionAfterOperation); const auto deqBefore1 = makeDequantization(fakeQuantize1, dequantizationBefore1); @@ -1487,13 +1487,13 @@ std::shared_ptr ConcatFunction::getReferenceWithSplitedInterme const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); replace_node( fakeQuantize2->get_input_node_shared_ptr(3), - ngraph::pass::low_precision::NetworkHelper::toScalarIfPossible(fakeQuantize2->get_input_node_shared_ptr(3))); + ov::pass::low_precision::NetworkHelper::toScalarIfPossible(fakeQuantize2->get_input_node_shared_ptr(3))); replace_node( fakeQuantize2->get_input_node_shared_ptr(4), - ngraph::pass::low_precision::NetworkHelper::toScalarIfPossible(fakeQuantize2->get_input_node_shared_ptr(4))); + ov::pass::low_precision::NetworkHelper::toScalarIfPossible(fakeQuantize2->get_input_node_shared_ptr(4))); fakeQuantize2->set_friendly_name("fakeQuantize2"); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionAfterOperation); const auto deqBefore2 = makeDequantization(fakeQuantize2, dequantizationBefore1); std::shared_ptr intermediateOp; @@ -1570,7 +1570,7 @@ std::shared_ptr ConcatFunction::getReferenceSelectionWithInter const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); fakeQuantize1->set_friendly_name("fakeQuantize1"); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); const auto deqBefore1 = makeDequantization(fakeQuantize1, dequantizationBefore1); const std::vector inputShape2 = { inputShape[0], inputShape[1], inputShape[2], inputShape[3] }; @@ -1579,7 +1579,7 @@ std::shared_ptr ConcatFunction::getReferenceSelectionWithInter const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); fakeQuantize2->set_friendly_name("fakeQuantize2"); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); const auto deqBefore2 = makeDequantization(fakeQuantize2, dequantizationBefore2); std::shared_ptr intermediateOp; @@ -1606,7 +1606,7 @@ std::shared_ptr ConcatFunction::getReferenceSelectionWithInter ngraph::OutputVector { deqBefore1, intermediateOp->output(0) }, 1); concat->set_friendly_name("concat"); - low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); auto& rtInfo = concat->get_rt_info(); rtInfo["Variant::std::string"] = "concat"; @@ -1659,7 +1659,7 @@ std::shared_ptr ConcatFunction::getReferenceWithStridedSlice( input->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input, inputPrecision, fq1); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeConcat); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeConcat); fakeQuantize1->set_friendly_name("FakeQuantize_1"); std::shared_ptr parent1 = fakeQuantize1; @@ -1688,7 +1688,7 @@ std::shared_ptr ConcatFunction::getReferenceWithStridedSlice( clamp->set_friendly_name("Clamp"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(clamp, inputPrecision, fq2); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeConcat); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeConcat); fakeQuantize2->set_friendly_name("FakeQuantize_2"); const auto concat = std::make_shared(NodeVector{ parent1, fakeQuantize2 }, 1); @@ -1774,7 +1774,7 @@ std::shared_ptr ConcatFunction::getReferenceWithDifferentPreci input1->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); fakeQuantize1->set_friendly_name("fakeQuantize1"); const auto deqBefore1 = makeDequantization(fakeQuantize1, dequantizationBefore1); @@ -1782,12 +1782,12 @@ std::shared_ptr ConcatFunction::getReferenceWithDifferentPreci input2->set_friendly_name("input2"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); fakeQuantize2->set_friendly_name("fakeQuantize2"); const auto deqBefore2 = makeDequantization(fakeQuantize2, dequantizationBefore2); const auto concat = std::make_shared(OutputVector{ deqBefore1, deqBefore2 }, axis); - low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); concat->set_friendly_name("concat"); const auto lastDequantization1 = makeDequantization(concat->output(0), dequantizationAfter1); @@ -1849,13 +1849,13 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediateWi input1->set_friendly_name("input"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); fakeQuantize1->set_friendly_name("fakeQuantize1"); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize1, precisionBeforeOp); const auto input2 = std::make_shared(precision, inputShape); input2->set_friendly_name("input"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); fakeQuantize2->set_friendly_name("fakeQuantize2"); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize2, precisionBeforeOp); std::shared_ptr intermediateOp; @@ -1886,7 +1886,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediateWi ngraph::OutputVector{ fakeQuantize2->output(0), intermediateOp->output(0) }, 1); concat->set_friendly_name("concat"); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOperation); auto& rtInfo = concat->get_rt_info(); rtInfo["Variant::std::string"] = "concat"; @@ -1937,19 +1937,19 @@ std::shared_ptr ConcatFunction::getReferenceWithReshapeAtTheEn input1->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); fakeQuantize1->set_friendly_name("fakeQuantize1"); const auto input2 = std::make_shared(precision, ngraph::Shape(inputShape)); input2->set_friendly_name("input2"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); fakeQuantize2->set_friendly_name("fakeQuantize2"); const std::shared_ptr concat1 = std::make_shared( ngraph::OutputVector{ fakeQuantize1->output(0), fakeQuantize2->output(0) }, 1); - low_precision::NetworkHelper::setOutDataPrecision(concat1, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat1, precisionAfterOperation); concat1->set_friendly_name("concat1"); std::shared_ptr intermediate = makeMaxPool(concat1->output(0), {1ul, 1ul}); @@ -1958,11 +1958,11 @@ std::shared_ptr ConcatFunction::getReferenceWithReshapeAtTheEn input3->set_friendly_name("input3"); const auto fakeQuantize3 = makeFakeQuantizeTypeRelaxed(input3, precision, fqOnData3); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize3, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize3, precisionBeforeOp); fakeQuantize3->set_friendly_name("fakeQuantize3"); const std::shared_ptr concat2 = std::make_shared(ngraph::OutputVector{ fakeQuantize3, intermediate }, 1); - low_precision::NetworkHelper::setOutDataPrecision(concat2, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat2, precisionAfterOperation); concat2->set_friendly_name("concat2"); const Shape concat2Shape = concat2->output(0).get_shape(); @@ -1996,7 +1996,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediateRe const auto input1 = std::make_shared(precision, inputShape); input1->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize1, element::u8); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize1, element::u8); const auto reshape1 = std::make_shared( fakeQuantize1, opset1::Constant::create(element::i64, Shape{reshapeOutputShape.size()}, reshapeOutputShape), @@ -2006,7 +2006,7 @@ std::shared_ptr ConcatFunction::getReferenceWithIntermediateRe const auto input2 = std::make_shared(precision, ngraph::Shape(inputShape2)); input2->set_friendly_name("input2"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize2, element::u8); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize2, element::u8); const auto reshape2 = std::make_shared( fakeQuantize2, opset1::Constant::create(element::i64, Shape{reshapeOutputShape.size()}, reshapeOutputShape), diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_backprop_data_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_backprop_data_function.cpp index 9a5224348cf..1a56bac32cf 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_backprop_data_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_backprop_data_function.cpp @@ -15,7 +15,7 @@ #include "lpt_ngraph_functions/common/builders.hpp" #include "low_precision/network_helper.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_function.cpp index 551d0398dc5..f7a2a5fd80c 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/convolution_function.cpp @@ -16,7 +16,7 @@ #include "lpt_ngraph_functions/common/builders.hpp" #include "low_precision/network_helper.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { @@ -302,7 +302,7 @@ std::shared_ptr ConvolutionFunction::getReference( std::vector{ netPrecision }); if (!dequantizationAfter.empty()) { - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(convolution, + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(convolution, precisionAfterOperation); } auto& rtInfo = convolution->get_rt_info(); @@ -323,7 +323,7 @@ std::shared_ptr ConvolutionFunction::get( const ngraph::builder::subgraph::FakeQuantizeOnData& fakeQuantizeOnData, const std::vector& weightsValues, const ngraph::builder::subgraph::FakeQuantizeOnWeights& fakeQuantizeOnWeights, - const std::vector& restrictions) { + const std::vector& restrictions) { const auto input = std::make_shared(precision, ngraph::Shape(inputShape)); input->set_friendly_name("input"); @@ -376,7 +376,7 @@ std::shared_ptr ConvolutionFunction::get( for (const auto& r : restrictions) { for (const auto& restrictedPort : r.restrictions) { auto& rt = convolution->input(restrictedPort.port).get_rt_info(); - rt[QuantizationGranularityAttribute::get_type_info_static()] = QuantizationGranularityAttribute(restrictedPort.granularity); + rt[ov::QuantizationGranularityAttribute::get_type_info_static()] = ov::QuantizationGranularityAttribute(restrictedPort.granularity); } } diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/depth_to_space_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/depth_to_space_function.cpp index ea561d9243e..89726469977 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/depth_to_space_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/depth_to_space_function.cpp @@ -70,7 +70,7 @@ std::shared_ptr DepthToSpaceFunction::getReference( dequantizationOpAfter->set_friendly_name("output"); ngraph::ResultVector results = { std::make_shared(dequantizationOpAfter) }; - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(d2s, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(d2s, precisionAfterOperation); const auto function = std::make_shared(results, ngraph::ParameterVector{ input }, "DepthToSpaceTransformation"); return function; diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_function.cpp index 76715866983..4bc0ca32063 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_function.cpp @@ -8,7 +8,7 @@ #include "ngraph/opsets/opset1.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_with_multi_parent_dequantization_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_with_multi_parent_dequantization_function.cpp index b639adc0eea..c6aaec64b83 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_with_multi_parent_dequantization_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/elementwise_with_multi_parent_dequantization_function.cpp @@ -9,7 +9,7 @@ #include "ngraph_functions/builders.hpp" #include "ngraph_functions/subgraph_builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { @@ -18,7 +18,7 @@ namespace subgraph { std::shared_ptr ElementwiseWithMultiParentDequantizationFunction::get( const ngraph::element::Type precision, const ngraph::Shape& inputShape, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type& precision1, const ngraph::builder::subgraph::DequantizationOperations& dequantization1, const ngraph::element::Type& precision2, diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_and_two_output_branches_with_convolution_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_and_two_output_branches_with_convolution_function.cpp index ee2c271f693..5aa0d57f2a4 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_and_two_output_branches_with_convolution_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_and_two_output_branches_with_convolution_function.cpp @@ -95,7 +95,7 @@ std::shared_ptr FakeQuantizeAndTwoOutputBranchesWithConvolutio std::shared_ptr FakeQuantizeAndTwoOutputBranchesWithConvolutionFunction::getReference( const ngraph::element::Type precision, const ngraph::Shape& inputShape, - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::builder::subgraph::FakeQuantizeOnData& fqOnData, const ngraph::element::Type precisionBeforeOp, const ngraph::builder::subgraph::DequantizationOperations& dequantizationBefore, @@ -106,7 +106,7 @@ std::shared_ptr FakeQuantizeAndTwoOutputBranchesWithConvolutio const auto fakeQuantizeOnActivations = fqOnData.empty() ? nullptr : makeFakeQuantizeTypeRelaxed(input, precision, fqOnData); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantizeOnActivations, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantizeOnActivations, precisionBeforeOp); const auto deqBefore = makeDequantization(fakeQuantizeOnActivations, dequantizationBefore); const std::shared_ptr convolution1 = createConvolution( @@ -126,15 +126,15 @@ std::shared_ptr FakeQuantizeAndTwoOutputBranchesWithConvolutio const auto deqAfter2 = makeDequantization(convolution2, dequantizationAfter2); const std::shared_ptr concat = std::make_shared(NodeVector{ deqAfter1, deqAfter2 }, 1ul); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(concat, precisionAfterOp); if (params.updatePrecisions) { replace_node( convolution1->get_input_node_shared_ptr(1), - ngraph::pass::low_precision::fold(convolution1->get_input_node_shared_ptr(1), element::i8)); + ov::pass::low_precision::fold(convolution1->get_input_node_shared_ptr(1), element::i8)); replace_node( convolution2->get_input_node_shared_ptr(1), - ngraph::pass::low_precision::fold(convolution2->get_input_node_shared_ptr(1), element::i8)); + ov::pass::low_precision::fold(convolution2->get_input_node_shared_ptr(1), element::i8)); } ngraph::ResultVector results{ std::make_shared(concat) }; diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_function.cpp index a4e95724dfd..cfe4f655369 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_function.cpp @@ -11,7 +11,7 @@ #include "lpt_ngraph_functions/common/builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { @@ -45,7 +45,7 @@ std::shared_ptr FakeQuantizeFunction::getOriginalWithMaxPool( } std::shared_ptr FakeQuantizeFunction::getOriginal( - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type precision, const ngraph::PartialShape& inputShape, const FakeQuantizeOnDataWithConstant& fakeQuantizeOnData, @@ -76,7 +76,7 @@ std::shared_ptr FakeQuantizeFunction::getOriginal( } std::shared_ptr FakeQuantizeFunction::getReference( - const ngraph::pass::low_precision::LayerTransformation::Params& params, + const ov::pass::low_precision::LayerTransformation::Params& params, const ngraph::element::Type precision, const ngraph::PartialShape& inputShape, const bool updatePrecisions, @@ -117,13 +117,13 @@ std::shared_ptr FakeQuantizeFunction::getReference( std::shared_ptr deq; if (updatePrecisions) { deq = makeDequantization(lastOperation, updateDequantization); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize, fakeQuantizeOutputPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize, fakeQuantizeOutputPrecision); } else { if (precision == element::f32) { updateDequantization.convert = {}; } deq = makeDequantization(lastOperation, updateDequantization); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize, precision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize, precision); } deq->set_friendly_name("lastOperation"); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_precision_selection_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_precision_selection_function.cpp index eeae254ec5e..947d43eb23b 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_precision_selection_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/fake_quantize_precision_selection_function.cpp @@ -162,12 +162,12 @@ std::shared_ptr FakeQuantizePrecisionSelectionFunction::getRef std::make_shared(precision, Shape({}), std::vector({0.01f}))); if (values.fakeQuantizeOnDataOutPrecision != precision) { - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize, values.fakeQuantizeOnDataOutPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(fakeQuantize, values.fakeQuantizeOnDataOutPrecision); if (values.operationBeforeLimitedOperationIsPrecisionTransparent) { auto intermediateOpTr = std::dynamic_pointer_cast(branch1Pooling); if (intermediateOpTr != nullptr) { - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(branch1Pooling, values.fakeQuantizeOnDataOutPrecision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(branch1Pooling, values.fakeQuantizeOnDataOutPrecision); } else { // TODO: potential workaround for the same case: // openvino\inference-engine\tests\ngraph_functions\src\low_precision_transformations\concat_function.cpp, line #496 @@ -178,10 +178,10 @@ std::shared_ptr FakeQuantizePrecisionSelectionFunction::getRef if (values.fakeQuantizeOnWeights.empty()) { replace_node( weights, - ngraph::pass::low_precision::fold(weights, ngraph::element::i8)); + ov::pass::low_precision::fold(weights, ngraph::element::i8)); } - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(branch2PRelu, precision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(branch2PRelu, precision); } diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/get_dequantization_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/get_dequantization_function.cpp index 2cb8ab14db2..a66f0c7fd18 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/get_dequantization_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/get_dequantization_function.cpp @@ -48,7 +48,7 @@ std::shared_ptr GetDequantizationFunction::get( const ngraph::element::Type& precision, const Shape& shape, const FakeQuantizeOnData& fakeQuantize, - const ngraph::pass::low_precision::FakeQuantizeDequantization& dequantization) { + const ov::pass::low_precision::FakeQuantizeDequantization& dequantization) { const std::shared_ptr input = std::make_shared( ngraph::element::f32, shape); @@ -67,7 +67,7 @@ std::shared_ptr GetDequantizationFunction::get( const auto parent2 = dequantization.subtractConvert == nullptr ? std::dynamic_pointer_cast(dequantization.subtractConstant) : dequantization.subtractConvert; - const auto index = ngraph::pass::low_precision::NetworkHelper::getChildInputIndex(parent2, dequantization.subtract); + const auto index = ov::pass::low_precision::NetworkHelper::getChildInputIndex(parent2, dequantization.subtract); parent = dequantization.subtract->clone_with_new_inputs(index == 1ul ? OutputVector{ parent, parent2 } : OutputVector{ parent2, parent }); @@ -75,7 +75,7 @@ std::shared_ptr GetDequantizationFunction::get( } if (dequantization.multiply != nullptr) { - const auto index = ngraph::pass::low_precision::NetworkHelper::getChildInputIndex(dequantization.multiplyConstant, dequantization.multiply); + const auto index = ov::pass::low_precision::NetworkHelper::getChildInputIndex(dequantization.multiplyConstant, dequantization.multiply); parent = dequantization.multiply->clone_with_new_inputs(index == 1ul ? OutputVector{ parent, dequantization.multiplyConstant } : OutputVector{ dequantization.multiplyConstant, parent }); @@ -118,7 +118,7 @@ std::shared_ptr GetDequantizationFunction::getOriginal( } std::shared_ptr GetDequantizationFunction::getReference( - ngraph::pass::low_precision::FakeQuantizeDequantization dequantization) { + ov::pass::low_precision::FakeQuantizeDequantization dequantization) { return std::make_shared( ngraph::ResultVector{ std::make_shared(dequantization.multiply) }, ngraph::ParameterVector{ ov::as_type_ptr(dequantization.data.get_node_shared_ptr()) }, diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/group_convolution_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/group_convolution_function.cpp index 4b08086d183..cd1f4ca12a3 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/group_convolution_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/group_convolution_function.cpp @@ -15,7 +15,7 @@ #include "lpt_ngraph_functions/common/builders.hpp" using namespace ngraph::opset1; -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { @@ -345,7 +345,7 @@ std::shared_ptr GroupConvolutionFunction::get( convolutionOriginal, std::vector{ element::f32, element::f32 }, std::vector{}); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(convolution, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(convolution, precisionAfterOperation); const auto deqAfter = makeDequantization(convolution, dequantizationAfter); deqAfter->set_friendly_name("output"); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/mat_mul_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/mat_mul_function.cpp index 57692a3ea0f..5a9fee0b149 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/mat_mul_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/mat_mul_function.cpp @@ -282,7 +282,7 @@ std::shared_ptr MatMulFunction::getReference( matMul->set_friendly_name("matMul"); auto& rtInfo = matMul->get_rt_info(); rtInfo["Variant::std::string"] = "matMul"; - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(matMul, precision); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(matMul, precision); const std::shared_ptr lastDequantizationAfter = makeDequantization(matMul, resultDequantization); lastDequantizationAfter->set_friendly_name("matMul"); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/max_pool_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/max_pool_function.cpp index bb76419c636..ee00fe52e98 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/max_pool_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/max_pool_function.cpp @@ -55,7 +55,7 @@ std::shared_ptr MaxPoolFunction::get( Shape{ 2, 2 }, op::RoundingType::FLOOR); parent = maxPool; - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(maxPool, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(maxPool, precisionAfterOperation); parent = makeDequantization(maxPool, dequantizationAfter); maxPool->set_friendly_name("maxPool"); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/move_dequantization_after_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/move_dequantization_after_function.cpp index 8c39a5cbffb..4e951af0986 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/move_dequantization_after_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/move_dequantization_after_function.cpp @@ -9,7 +9,7 @@ #include "ngraph_functions/subgraph_builders.hpp" #include "lpt_ngraph_functions/common/builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { @@ -61,7 +61,7 @@ namespace subgraph { op, std::vector{ element::f32, element::f32 }, std::vector{}); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(targetOp, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(targetOp, precisionAfterOperation); auto& rtInfo = targetOp->get_rt_info(); rtInfo["Variant::std::string"] = "targetOp"; diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/multiply_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/multiply_function.cpp index 83c90c5bd21..4628acb8f27 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/multiply_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/multiply_function.cpp @@ -12,7 +12,7 @@ #include "lpt_ngraph_functions/common/builders.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/precision_propagation_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/precision_propagation_function.cpp index adbf69a1ab7..465336117fa 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/precision_propagation_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/precision_propagation_function.cpp @@ -172,7 +172,7 @@ std::shared_ptr PrecisionPropagationFunction::getReferenceWith input1->set_friendly_name("input1"); const auto fakeQuantize1 = makeFakeQuantizeTypeRelaxed(input1, precision, fqOnData1); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize1, precisionBeforeOp); fakeQuantize1->set_friendly_name("fakeQuantize1"); const auto deqBefore1 = makeDequantization(fakeQuantize1, dequantizationBefore); @@ -180,7 +180,7 @@ std::shared_ptr PrecisionPropagationFunction::getReferenceWith input2->set_friendly_name("input2"); const auto fakeQuantize2 = makeFakeQuantizeTypeRelaxed(input2, precision, fqOnData2); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize2, precisionBeforeOp); fakeQuantize2->set_friendly_name("fakeQuantize2"); const auto deqBefore2 = makeDequantization(fakeQuantize2, dequantizationBefore); @@ -188,7 +188,7 @@ std::shared_ptr PrecisionPropagationFunction::getReferenceWith input3->set_friendly_name("input3"); const auto fakeQuantize3 = makeFakeQuantizeTypeRelaxed(input3, precision, fqOnData3); - low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize3, precisionBeforeOp); + ov::pass::low_precision::NetworkHelper::setOutDataPrecisionForTypeRelaxed(fakeQuantize3, precisionBeforeOp); fakeQuantize3->set_friendly_name("fakeQuantize3"); const auto deqBefore3 = makeDequantization(fakeQuantize3, dequantizationBefore); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/relu_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/relu_function.cpp index b4e2bcf5a9c..7ef5f50e31b 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/relu_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/relu_function.cpp @@ -58,7 +58,7 @@ std::shared_ptr ReluFunction::getReference( relu = std::make_shared(quantizationOpBefore); } else { relu = std::make_shared>(quantizationOpBefore); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(relu, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(relu, precisionAfterOperation); } const std::shared_ptr quantizationOpAfter = makeDequantization(relu, dequantizationAfter); quantizationOpAfter->set_friendly_name("output"); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/round_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/round_function.cpp index f65424b33c7..3a55ae677f8 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/round_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/round_function.cpp @@ -9,7 +9,7 @@ #include "ngraph_functions/subgraph_builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/shuffle_channels_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/shuffle_channels_function.cpp index 89d3e3452db..602ca1b3ddd 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/shuffle_channels_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/shuffle_channels_function.cpp @@ -65,7 +65,7 @@ std::shared_ptr ShuffleChannelsFunction::getReference( const auto dequantizationBefore = makeDequantization(input, deqBefore); const auto shuffleChannels = std::make_shared(dequantizationBefore, axis, group); - ngraph::pass::low_precision::NetworkHelper::setOutDataPrecision(shuffleChannels, precisionAfterOperation); + ov::pass::low_precision::NetworkHelper::setOutDataPrecision(shuffleChannels, precisionAfterOperation); const auto dequantizationAfter = makeDequantization(shuffleChannels, deqAfter); dequantizationAfter->set_friendly_name("output"); diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/strided_slice_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/strided_slice_function.cpp index e1e8348f44c..4074967702b 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/strided_slice_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/strided_slice_function.cpp @@ -11,7 +11,7 @@ #include "ngraph_functions/subgraph_builders.hpp" #include "lpt_ngraph_functions/strided_slice_function.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_function.cpp index d10f53d20e7..e026ba62cdb 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_function.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/common/builders.hpp" #include "ngraph_functions/subgraph_builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_multiply_to_multiply_add_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_multiply_to_multiply_add_function.cpp index c77dbb33055..869953f906f 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_multiply_to_multiply_add_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/subtract_multiply_to_multiply_add_function.cpp @@ -8,7 +8,7 @@ #include #include "lpt_ngraph_functions/common/builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder { diff --git a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/transpose_after_mat_mul_function.cpp b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/transpose_after_mat_mul_function.cpp index ed46e685bd6..e6d987eb243 100644 --- a/src/tests/ngraph_helpers/lpt_ngraph_functions/src/transpose_after_mat_mul_function.cpp +++ b/src/tests/ngraph_helpers/lpt_ngraph_functions/src/transpose_after_mat_mul_function.cpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/common/builders.hpp" #include "ngraph_functions/subgraph_builders.hpp" -using namespace ngraph::pass::low_precision; +using namespace ov::pass::low_precision; namespace ngraph { namespace builder {