From 71af0eef38b480f886634d76b06d2f0efb7cde4c Mon Sep 17 00:00:00 2001 From: Oleg Pipikin Date: Fri, 17 Nov 2023 15:51:56 +0100 Subject: [PATCH] Refactor ngraph builders 4 (#21100) * Remove and deprecate some ngraph builders --- src/core/tests/type_relaxed_copy.cpp | 6 +- .../single_layer_tests/classes/conversion.cpp | 2 +- .../single_layer_tests/classes/pooling.cpp | 35 ++++++------ .../single_layer_tests/detection_output.cpp | 11 +++- .../functional/single_layer_tests/loop.cpp | 2 +- .../single_layer_tests/matmul_sparse.cpp | 2 +- .../single_layer_tests/roi_pooling.cpp | 7 ++- .../src/concat_const_inplace.cpp | 2 +- .../src/concat_conv_sum_inplace.cpp | 2 +- .../src/concat_reorder_inplace.cpp | 2 +- .../subgraph_tests/src/conv_concat.cpp | 2 +- .../subgraph_tests/src/conv_maxpool_activ.cpp | 3 +- .../src/conv_with_zero_point_fuse.cpp | 7 +-- .../subgraph_tests/src/eltwise_caching.cpp | 2 +- .../subgraph_tests/src/fq_caching.cpp | 2 +- .../fullyconnected_strided_inputs_outputs.cpp | 2 +- .../fuse_split_concat_pair_to_interpolate.cpp | 2 +- .../src/fuse_transpose_reorder.cpp | 4 +- .../src/matmul_decompress_convert.cpp | 2 +- .../src/matmul_strided_inputs_outputs.cpp | 4 +- .../subgraph_tests/src/remove_convert.cpp | 6 +- .../subgraph_tests/src/split_concat_add.cpp | 2 +- .../src/split_matmul_concat.cpp | 2 +- .../pass_tests/act_maxpool_reordering.cpp | 2 + .../pass_tests/concat_memory_param.cpp | 2 +- .../pass_tests/concat_restrictions.cpp | 16 +++--- .../pass_tests/fq_maxpool_reordering.cpp | 2 + .../insert_transpose_between_convs.cpp | 2 + .../remove_permutations_NHWC_to_NCHW_pass.cpp | 4 +- .../weighable_layer_without_fq.cpp | 2 +- .../unit/gna_extra_pwl_segments_tests.cpp | 2 + .../tests/unit/gna_memory_compact_test.cpp | 4 ++ .../gna_insert_identity_layer.cpp | 4 +- .../transformations/gna_remove_convert.cpp | 33 ++++------- .../dynamic/detection_output.cpp | 13 +++-- .../single_layer_tests/dynamic/pooling.cpp | 15 ++--- .../dynamic/roi_pooling.cpp | 8 ++- .../functional/subgraph_tests/condition.cpp | 21 ++++++- .../dynamic_smoke_test_gen_impl_key.cpp | 4 +- ...smoke_test_reduce_deconvolution_concat.cpp | 2 +- ...dynamic_smoke_test_shape_of_activation.cpp | 3 +- ...mic_smoke_test_shape_of_reduce_reshape.cpp | 2 +- .../dynamic_smoke_test_with_empty_tensor.cpp | 8 +-- .../ov_infer_request/iteration_chaining.cpp | 2 +- .../shared_test_classes/single_layer/pad.hpp | 4 ++ .../src/single_layer/batch_norm.cpp | 17 +++++- .../src/single_layer/conversion.cpp | 9 ++- .../src/single_layer/detection_output.cpp | 11 +++- .../src/single_layer/pooling.cpp | 10 +++- .../src/single_layer/roi_pooling.cpp | 11 ++-- .../src/single_layer/scatter_ND_update.cpp | 5 +- .../single_layer/scatter_elements_update.cpp | 6 +- .../src/single_layer/scatter_update.cpp | 6 +- .../src/single_layer/space_to_depth.cpp | 2 - .../src/single_op/pooling.cpp | 21 +++---- .../subgraph/activation_concats_eltwise.cpp | 4 +- .../src/subgraph/cascade_concat.cpp | 8 +-- .../src/subgraph/concat_conv.cpp | 2 +- .../src/subgraph/concat_multi_input.cpp | 2 +- .../src/subgraph/const_conv_concat.cpp | 2 +- .../subgraph/const_strided_slice_concat.cpp | 2 +- .../memory_eltwise_reshape_concat.cpp | 4 +- .../src/subgraph/memory_fq_concat_prelu.cpp | 2 +- .../src/subgraph/multiple_concat.cpp | 4 +- .../src/subgraph/perm_conv_perm_concat.cpp | 2 +- .../src/subgraph/simple_if.cpp | 6 +- .../src/subgraph/stridedslice_concat.cpp | 2 +- .../src/subgraph/variadic_split_pad.cpp | 6 +- .../ov_lpt_models/src/common/builders.cpp | 8 +-- .../ov_models/include/ov_models/builders.hpp | 57 +------------------ .../ov_helpers/ov_models/src/batch_norm.cpp | 33 ----------- src/tests/ov_helpers/ov_models/src/concat.cpp | 20 ------- .../ov_helpers/ov_models/src/conversion.cpp | 30 ---------- .../ov_models/src/detection_output.cpp | 26 --------- src/tests/ov_helpers/ov_models/src/pad.cpp | 39 ------------- .../ov_helpers/ov_models/src/pooling.cpp | 24 -------- .../ov_helpers/ov_models/src/roi_pooling.cpp | 32 ----------- .../ov_models/src/scatter_ND_update.cpp | 27 --------- .../ov_models/src/scatter_elements_update.cpp | 27 --------- .../ov_models/src/scatter_update.cpp | 27 --------- 80 files changed, 246 insertions(+), 514 deletions(-) delete mode 100644 src/tests/ov_helpers/ov_models/src/batch_norm.cpp delete mode 100644 src/tests/ov_helpers/ov_models/src/concat.cpp delete mode 100644 src/tests/ov_helpers/ov_models/src/conversion.cpp delete mode 100644 src/tests/ov_helpers/ov_models/src/detection_output.cpp delete mode 100644 src/tests/ov_helpers/ov_models/src/roi_pooling.cpp delete mode 100644 src/tests/ov_helpers/ov_models/src/scatter_ND_update.cpp delete mode 100644 src/tests/ov_helpers/ov_models/src/scatter_elements_update.cpp delete mode 100644 src/tests/ov_helpers/ov_models/src/scatter_update.cpp diff --git a/src/core/tests/type_relaxed_copy.cpp b/src/core/tests/type_relaxed_copy.cpp index 179af5159b7..d227c75084c 100644 --- a/src/core/tests/type_relaxed_copy.cpp +++ b/src/core/tests/type_relaxed_copy.cpp @@ -41,9 +41,9 @@ TEST_F(TypeRelaxedThreading, TypeRelaxedCloning) { auto inp1 = std::make_shared(element::i8, PartialShape{-1, -1, -1, -1}); auto inp2 = std::make_shared(element::i8, PartialShape{-1, -1, -1, -1}); - auto matMulRelaxed = std::make_shared>( - *std::make_shared(inp1_f32, inp2_f32, false, false), - element::f32); + auto matMulRelaxed = + std::make_shared>(ov::op::v0::MatMul(inp1_f32, inp2_f32, false, false), + element::f32); auto matMul = matMulRelaxed->clone_with_new_inputs({inp1, inp2}); runParallel([&]() { diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/conversion.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/conversion.cpp index d0f59a43929..3b118f7037c 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/conversion.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/conversion.cpp @@ -83,7 +83,7 @@ void ConvertCPULayerTest::SetUp() { for (auto&& shape : inputDynamicShapes) { params.push_back(std::make_shared(ngPrc, shape)); } - auto conversion = ngraph::builder::makeConversion(params.front(), targetPrc, helpers::ConversionTypes::CONVERT); + auto conversion = std::make_shared(params.front(), targetPrc); function = makeNgraphFunction(ngPrc, params, conversion, "ConversionCPU"); } diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/pooling.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/pooling.cpp index e40771146cd..2d0f42fe85c 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/pooling.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/pooling.cpp @@ -103,15 +103,12 @@ void PoolingLayerCPUTest::SetUp() { poolInput = ngraph::builder::makeFakeQuantize(poolInput, inPrc, 256, newShape); } - std::shared_ptr pooling = ngraph::builder::makePooling(poolInput, - stride, - padBegin, - padEnd, - kernel, - roundingType, - padType, - excludePad, - poolType); + std::shared_ptr pooling; + if (ov::test::utils::PoolingTypes::MAX == poolType) { + pooling = std::make_shared(poolInput, stride, padBegin, padEnd, kernel, roundingType, padType); + } else { + pooling = std::make_shared(poolInput, stride, padBegin, padEnd, kernel, excludePad, roundingType, padType); + } function = makeNgraphFunction(inPrc, params, pooling, "PoolingCPU"); } @@ -183,16 +180,16 @@ void MaxPoolingV8LayerCPUTest::SetUp() { for (auto&& shape : inputDynamicShapes) { params.push_back(std::make_shared(inPrc, shape)); } - std::shared_ptr pooling = ngraph::builder::makeMaxPoolingV8(params[0], - stride, - dilation, - padBegin, - padEnd, - kernel, - roundingType, - padType, - indexElementType, - axis); + auto pooling = std::make_shared(params[0], + stride, + dilation, + padBegin, + padEnd, + kernel, + roundingType, + padType, + indexElementType, + axis); pooling->get_rt_info() = getCPUInfo(); ngraph::ResultVector results{std::make_shared(pooling->output(0))}; function = std::make_shared(results, params, "MaxPooling"); diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/detection_output.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/detection_output.cpp index 9d8f027ef20..e42f7e6ee6f 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/detection_output.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/detection_output.cpp @@ -198,13 +198,18 @@ public: init_input_shapes({ inShapes }); ov::ParameterVector params; - ov::OutputVector paramsOuts; for (auto&& shape : inputDynamicShapes) { auto param = std::make_shared(ov::element::f32, shape); params.push_back(param); - paramsOuts.push_back(param); } - auto detOut = ngraph::builder::makeDetectionOutput(paramsOuts, attrs); + std::shared_ptr detOut; + if (params.size() == 3) + detOut = std::make_shared(params[0], params[1], params[2], attrs); + else if (params.size() == 5) + detOut = std::make_shared(params[0], params[1], params[2], params[3], params[4], attrs); + else + OPENVINO_THROW("DetectionOutput layer supports only 3 or 5 inputs"); + ngraph::ResultVector results{std::make_shared(detOut)}; function = std::make_shared(results, params, "DetectionOutputDynamic"); } diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/loop.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/loop.cpp index cda499b042f..84b86aa04c9 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/loop.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/loop.cpp @@ -351,7 +351,7 @@ protected: // Body auto constant = ngraph::builder::makeConstant(inType, std::vector{1}, std::vector{10}); auto add = std::make_shared(body_params[0], constant); - auto concat = ngraph::builder::makeConcat({body_params[1], add}, 0); + auto concat = std::make_shared(ov::NodeVector{body_params[1], add}, 0); auto body = std::make_shared(ngraph::OutputVector{body_condition_const, concat}, body_params); diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/matmul_sparse.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/matmul_sparse.cpp index a01f01a0040..b31d63dab9c 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/matmul_sparse.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/matmul_sparse.cpp @@ -133,7 +133,7 @@ protected: auto matrixBFP32 = builder::makeDynamicInputLayer(element::f32, helpers::InputLayerType::CONSTANT, inShapeB); auto matMulRelaxed = std::make_shared>( - *std::make_shared(inputParamsFP32, matrixBFP32, transpose_a, transpose_b), + ov::op::v0::MatMul(inputParamsFP32, matrixBFP32, transpose_a, transpose_b), element::f32); auto matrixB = ngraph::builder::makeConstant(weiType, inShapeB.get_shape(), weiData); diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/roi_pooling.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/roi_pooling.cpp index 3b07b93e45e..46fbf1b8f5d 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/roi_pooling.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/roi_pooling.cpp @@ -206,7 +206,12 @@ protected: for (auto&& shape : inputDynamicShapes) params.push_back(std::make_shared(ngPrc, shape)); - auto roi_pooling = ngraph::builder::makeROIPooling(params[0], params[1], poolShape, spatial_scale, pool_method); + std::shared_ptr roi_pooling; + if (ov::test::utils::ROIPoolingTypes::ROI_MAX == pool_method) { + roi_pooling = std::make_shared(params[0], params[1], poolShape, spatial_scale, "max"); + } else { + roi_pooling = std::make_shared(params[0], params[1], poolShape, spatial_scale, "bilinear"); + } ngraph::ResultVector results{std::make_shared(roi_pooling)}; function = makeNgraphFunction(ngPrc, params, roi_pooling, "ROIPooling"); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_const_inplace.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_const_inplace.cpp index 368b3d3b77b..69f99c1ccaa 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_const_inplace.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_const_inplace.cpp @@ -49,7 +49,7 @@ public: auto transpose = std::make_shared(inputParams[0], transposeOrder); auto concatConstantInput = ngraph::opset8::Constant::create(ngraph::element::f32, {1, 1, 3, 3}, {10.0f}); - auto concat = ngraph::builder::makeConcat({concatConstantInput, transpose}, 1); + auto concat = std::make_shared(ov::NodeVector{concatConstantInput, transpose}, 1); // convolution std::vector weightValuesFP32(12); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_conv_sum_inplace.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_conv_sum_inplace.cpp index 4f8cd4a28d4..b7aa711322e 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_conv_sum_inplace.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_conv_sum_inplace.cpp @@ -56,7 +56,7 @@ public: auto Relu2 = std::make_shared(inputParams[1]); Relu2->get_rt_info() = CPUTestsBase::makeCPUInfo({targetFormat}, {targetFormat}, {}); - auto concat = ngraph::builder::makeConcat(ngraph::OutputVector{Relu1, Relu2}, 1); + auto concat = std::make_shared(ov::NodeVector{Relu1, Relu2}, 1); auto conv = ngraph::builder::makeConvolution(concat, ngraph::element::f32, kernel, stride, padBegin, padEnd, dilation, ngraph::op::PadType::AUTO, convOutChannels); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_reorder_inplace.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_reorder_inplace.cpp index cf532a8e5ba..9554b3a66d5 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_reorder_inplace.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/concat_reorder_inplace.cpp @@ -36,7 +36,7 @@ public: const std::vector inputShape = {1, 100, 1, 1}; ov::ParameterVector inputParams{std::make_shared(ov::element::f32, ov::Shape(inputShape)), std::make_shared(ov::element::f32, ov::Shape(inputShape))}; - auto concat = ngraph::builder::makeConcat(ngraph::OutputVector{inputParams[0], inputParams[1]}, 1); + auto concat = std::make_shared(ov::NodeVector{inputParams[0], inputParams[1]}, 1); const auto targetFormat = nhwc; auto mul1 = std::make_shared( concat, diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_concat.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_concat.cpp index e908285e950..aadafeb09a3 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_concat.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_concat.cpp @@ -107,7 +107,7 @@ void ConvConcatSubgraphTest::SetUp() { convolutionNodes[conv]->get_rt_info() = getCPUInfo(); } - auto concat = ngraph::builder::makeConcat(ngraph::OutputVector{convolutionNodes[0], convolutionNodes[1]}, axis); + auto concat = std::make_shared(ov::NodeVector{convolutionNodes[0], convolutionNodes[1]}, axis); ngraph::ResultVector results{std::make_shared(concat)}; function = std::make_shared(results, inputParams, "convolutionConcat"); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_maxpool_activ.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_maxpool_activ.cpp index b9c2a1151cf..174c54a9515 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_maxpool_activ.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_maxpool_activ.cpp @@ -52,9 +52,8 @@ protected: const std::vector padBegin = {0, 0}; const std::vector padEnd = {0, 0}; const op::PadType paddingType = op::PadType::EXPLICIT; - ngraph::helpers::PoolingTypes poolType = ngraph::helpers::PoolingTypes::MAX; ngraph::op::RoundingType roundingType = ngraph::op::RoundingType::CEIL; - pooling = builder::makePooling(conv, strides, padBegin, padEnd, kernelSize, roundingType, paddingType, false, poolType); + pooling = std::make_shared(conv, strides, padBegin, padEnd, kernelSize, roundingType, paddingType); } selectedType = makeSelectedTypeStr(getPrimitiveType(), element::f32); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_with_zero_point_fuse.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_with_zero_point_fuse.cpp index 30b8d15950d..d2b01842ddc 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_with_zero_point_fuse.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/conv_with_zero_point_fuse.cpp @@ -76,10 +76,7 @@ void ConvWithZeroPointFuseSubgraphTest::SetUp() { const auto weights_const_values = std::vector(ngraph::shape_size(weights_const_shape), 1); const auto weights_const = ngraph::builder::makeConstant(ov::element::i8, weights_const_shape, weights_const_values); - const auto weights_convert = ngraph::builder::makeConversion( - weights_const, - ov::element::f32, - ngraph::helpers::ConversionTypes::CONVERT); + const auto weights_convert = std::make_shared(weights_const, ov::element::f32); const auto weights_multiply = std::make_shared( weights_convert, @@ -125,7 +122,7 @@ void ConvWithZeroPointFuseSubgraphTest::SetUp() { } } - auto concat = ngraph::builder::makeConcat(ngraph::OutputVector{branches[0], branches[1]}, 1); + auto concat = std::make_shared(ov::NodeVector{branches[0], branches[1]}, 1); ngraph::ResultVector results{std::make_shared(concat)}; function = std::make_shared(results, inputParams, "ConvWithZeroPointFuseSubgraphTest"); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/eltwise_caching.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/eltwise_caching.cpp index fdfa3bdc849..d5f5f3ead3c 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/eltwise_caching.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/eltwise_caching.cpp @@ -178,7 +178,7 @@ protected: {reshapeShape.size()}, reshapeShape); lastNode1 = std::make_shared(lastNode1, reshapeConstNode, false); } - auto concat = ngraph::builder::makeConcat({lastNode0, lastNode1}, 0); + auto concat = std::make_shared(ov::NodeVector{lastNode0, lastNode1}, 0); function = std::make_shared(concat, ngraphParam, "eltwise_cache"); } }; diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fq_caching.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fq_caching.cpp index d0f2ac4fb98..a0bd14db028 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fq_caching.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fq_caching.cpp @@ -194,7 +194,7 @@ protected: {reshapeShape.size()}, reshapeShape); lastNode1 = std::make_shared(lastNode1, reshapeConstNode, false); } - auto concat = builder::makeConcat({lastNode0, lastNode1}, 0); + auto concat = std::make_shared(ov::NodeVector{lastNode0, lastNode1}, 0); if (selectedType.empty()) { selectedType = getPrimitiveType() + "_f32"; diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fullyconnected_strided_inputs_outputs.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fullyconnected_strided_inputs_outputs.cpp index d6e804271bb..bb04c5ca766 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fullyconnected_strided_inputs_outputs.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fullyconnected_strided_inputs_outputs.cpp @@ -61,7 +61,7 @@ protected: const auto fc2 = std::make_shared(split->output(1), fc2secondInputB, false, false); const auto fcConcatAxis = rank == 3 ? 1 : 0; - const auto concatMatMuls = builder::makeConcat({fc1, fc2}, fcConcatAxis); + const auto concatMatMuls = std::make_shared(ov::NodeVector{fc1, fc2}, fcConcatAxis); function = makeNgraphFunction(ngPrec, params, concatMatMuls, "FullyConnectedStridedInputsOutputs"); } diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_split_concat_pair_to_interpolate.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_split_concat_pair_to_interpolate.cpp index 33f050bc650..04b01e696a1 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_split_concat_pair_to_interpolate.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_split_concat_pair_to_interpolate.cpp @@ -63,7 +63,7 @@ protected: } } - const auto concat = builder::makeConcat(concat_inputs_vec, axis); + const auto concat = std::make_shared(concat_inputs_vec, axis); ngraph::ResultVector results{std::make_shared(concat)}; function = std::make_shared(results, ngraph::ParameterVector{param}, "FuseSplitConcatPairToInterpolate"); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_transpose_reorder.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_transpose_reorder.cpp index 02609d95da6..246940cf0b5 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_transpose_reorder.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_transpose_reorder.cpp @@ -158,7 +158,7 @@ void FuseTransposeAndReorderTest1::CreateGraph() { auto shape = ngraph::builder::makeConstant(ngraph::element::i64, {inputShape.size()}, transpose3->get_output_shape(0)); auto reshape = std::make_shared(transpose1, shape, false); - auto concat = ngraph::builder::makeConcat({transpose3, reshape}, 1); + auto concat = std::make_shared(ov::NodeVector{transpose3, reshape}, 1); ngraph::ResultVector results{std::make_shared(concat)}; function = std::make_shared(results, params, "Transpose_TransposeReorderTranspose_Reshape_Concat"); @@ -218,7 +218,7 @@ void FuseTransposeAndReorderTest2::CreateGraph() { auto memFmt2 = inputShape.size() == 5 ? ncdhw : nchw; transpose2->get_rt_info() = makeCPUInfo({memFmt2}, {memFmt2}, {}); - auto concat = ngraph::builder::makeConcat({transpose1, transpose2}, 1); + auto concat = std::make_shared(ov::NodeVector{transpose1, transpose2}, 1); concat->get_rt_info() = makeCPUInfo({memFmt1, memFmt1}, {memFmt1}, {}); ngraph::ResultVector results{std::make_shared(concat)}; diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_decompress_convert.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_decompress_convert.cpp index b5fbba02f3b..3f7f3d85f89 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_decompress_convert.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_decompress_convert.cpp @@ -504,7 +504,7 @@ protected: auto matMul0 = std::make_shared(params[0], inputWeights, transpA, transpB); auto matMul1 = std::make_shared(params[1], inputWeights, transpA, transpB); - auto concat = builder::makeConcat({matMul0, matMul1}, 0); + auto concat = std::make_shared(ov::NodeVector{matMul0, matMul1}, 0); function = CPUTestsBase::makeNgraphFunction(netType, params, concat, cpuNodeType); } diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_strided_inputs_outputs.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_strided_inputs_outputs.cpp index 9978ee29a96..e8714f4a639 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_strided_inputs_outputs.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/matmul_strided_inputs_outputs.cpp @@ -42,7 +42,7 @@ protected: ov::ParameterVector concatInputParams {std::make_shared(ngPrec, concatShapes[0]), std::make_shared(ngPrec, concatShapes[1])}; const auto concatOutputNodes = helpers::convert2OutputVector(helpers::castOps2Nodes(concatInputParams)); - const auto concat = builder::makeConcat(concatOutputNodes, 2); + const auto concat = std::make_shared(concatOutputNodes, 2); const auto matMul1 = std::make_shared(split->output(0), concat, false, false); @@ -51,7 +51,7 @@ protected: const auto matMul2 = std::make_shared(split->output(1), matmulInputParams[0], false, false); - const auto concatMatMuls = builder::makeConcat({matMul1, matMul2}, 2 /* 3rd axis */); + const auto concatMatMuls = std::make_shared(ov::NodeVector{matMul1, matMul2}, 2 /* 3rd axis */); ngraph::ParameterVector inputParams = {splitInputParams[0], concatInputParams[0], concatInputParams[1], matmulInputParams[0]}; function = makeNgraphFunction(ngPrec, inputParams, concatMatMuls, "MatmulStridedInputsOutputs"); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/remove_convert.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/remove_convert.cpp index 51e500073ce..430b1cc6a3c 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/remove_convert.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/remove_convert.cpp @@ -43,7 +43,7 @@ public: CPUSpecificParams{{}, {}, {}, makeSelectedTypeStr("ref", inType)}; init_input_shapes({inputShape}); auto input_params = std::make_shared(inType, inputShape.first); - auto convert = builder::makeConversion(input_params, element::f32, ::helpers::ConversionTypes::CONVERT); + auto convert = std::make_shared(input_params, element::f32); auto begin = builder::makeConstant(element::i64, ov::Shape{4}, std::vector{0, 0, 0, 0}); auto end = builder::makeConstant(element::i64, ov::Shape{4}, std::vector{0, 0, 16, 0}); auto stride = builder::makeConstant(element::i64, ov::Shape{4}, std::vector{1, 1, 1, 1}); @@ -57,7 +57,7 @@ public: {}, {}, {}); - auto convert2 = builder::makeConversion(slice, inType, ::helpers::ConversionTypes::CONVERT); + auto convert2 = std::make_shared(slice, inType); function = std::make_shared(convert2, ov::ParameterVector{input_params}, "remove_convert"); }; }; @@ -89,7 +89,7 @@ public: const auto split_axis = builder::makeConstant(element::i64, ov::Shape{}, std::vector{1}); const auto split_lengths = builder::makeConstant(element::i64, ov::Shape{2}, std::vector{-1, 1}); const auto split = std::make_shared(input_params, split_axis, split_lengths); - auto convert = builder::makeConversion(split->output(1), inType, ::helpers::ConversionTypes::CONVERT); + auto convert = std::make_shared(split->output(1), inType); auto relu = builder::makeActivation(convert, inType, ::helpers::ActivationTypes::Relu); ov::ResultVector results{ diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_concat_add.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_concat_add.cpp index d817ef74f25..eb69679e8eb 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_concat_add.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_concat_add.cpp @@ -52,7 +52,7 @@ protected: auto result_add_1 = std::make_shared(add_1); auto add_2 = ngraph::builder::makeEltwise(split->output(1), add_const, ngraph::helpers::EltwiseTypes::ADD); auto add_3 = ngraph::builder::makeEltwise(split->output(2), add_const, ngraph::helpers::EltwiseTypes::ADD); - auto concat = ngraph::builder::makeConcat({add_1, add_2, add_3}, 1); + auto concat = std::make_shared(ov::NodeVector{add_1, add_2, add_3}, 1); auto result_concat = std::make_shared(concat); auto add_4 = ngraph::builder::makeEltwise(concat, add_const, ngraph::helpers::EltwiseTypes::ADD); auto add_5 = ngraph::builder::makeEltwise(concat, add_const, ngraph::helpers::EltwiseTypes::ADD); diff --git a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_matmul_concat.cpp b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_matmul_concat.cpp index 8daddeebdd2..8fe27489167 100644 --- a/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_matmul_concat.cpp +++ b/src/plugins/intel_cpu/tests/functional/subgraph_tests/src/split_matmul_concat.cpp @@ -113,7 +113,7 @@ protected: auto matMul = std::make_shared(split->output(0), inputB, transpA, transpB); - auto concat = builder::makeConcat({matMul, split->output(1)}, 0); + auto concat = std::make_shared(ov::OutputVector{matMul, split->output(1)}, 0); function = CPUTestsBase::makeNgraphFunction(ElementType::f32, params, concat, "FullyConnected"); } diff --git a/src/plugins/intel_gna/tests/functional/pass_tests/act_maxpool_reordering.cpp b/src/plugins/intel_gna/tests/functional/pass_tests/act_maxpool_reordering.cpp index 4ce62f8ec0b..b92438407d7 100644 --- a/src/plugins/intel_gna/tests/functional/pass_tests/act_maxpool_reordering.cpp +++ b/src/plugins/intel_gna/tests/functional/pass_tests/act_maxpool_reordering.cpp @@ -89,6 +89,7 @@ protected: auto activation = ngraph::builder::makeActivation(conv, ngPrc, actType); + OPENVINO_SUPPRESS_DEPRECATED_START auto maxpool = ngraph::builder::makePooling(activation, {1, 2}, {0, 0}, @@ -98,6 +99,7 @@ protected: ngraph::op::PadType::VALID, false, ngraph::helpers::PoolingTypes::MAX); + OPENVINO_SUPPRESS_DEPRECATED_END ngraph::ResultVector results{std::make_shared(maxpool)}; function = std::make_shared(results, inputVector, "ActMaxpoolReordering"); diff --git a/src/plugins/intel_gna/tests/functional/pass_tests/concat_memory_param.cpp b/src/plugins/intel_gna/tests/functional/pass_tests/concat_memory_param.cpp index 95dd1080812..f057abf9c6e 100644 --- a/src/plugins/intel_gna/tests/functional/pass_tests/concat_memory_param.cpp +++ b/src/plugins/intel_gna/tests/functional/pass_tests/concat_memory_param.cpp @@ -82,7 +82,7 @@ protected: const int axis = 1; ov::OutputVector to_concat{readValue, reshape}; - auto concat = ngraph::builder::makeConcat(to_concat, axis); + auto concat = std::make_shared(to_concat, axis); const auto concat_shape = concat->get_output_shape(0); const auto concat_shape_size = ov::shape_size(concat_shape); diff --git a/src/plugins/intel_gna/tests/functional/pass_tests/concat_restrictions.cpp b/src/plugins/intel_gna/tests/functional/pass_tests/concat_restrictions.cpp index 7739bb1651e..4e32acaf67d 100644 --- a/src/plugins/intel_gna/tests/functional/pass_tests/concat_restrictions.cpp +++ b/src/plugins/intel_gna/tests/functional/pass_tests/concat_restrictions.cpp @@ -62,7 +62,7 @@ struct ReLUConcatAxis { auto constValues = ov::test::utils::generate_float_numbers(totalSize, -0.1f, 0.1f); auto constNode = ngraph::builder::makeConstant(ngPrc, {inputShape}, constValues); concatInputs.push_back(constNode); - auto concat = ngraph::builder::makeConcat(concatInputs, axis); + auto concat = std::make_shared(concatInputs, axis); ov::ResultVector results{std::make_shared(concat)}; return std::make_shared(results, params, getName()); @@ -108,7 +108,7 @@ struct MatmulConcatAxis { concatInputs.push_back(matmul1); auto matmul2 = std::make_shared(params[0], constMul2, false, true); concatInputs.push_back(matmul2); - auto concat = ngraph::builder::makeConcat(concatInputs, axis); + auto concat = std::make_shared(concatInputs, axis); ov::ResultVector results{std::make_shared(concat)}; return std::make_shared(results, params, getName()); @@ -150,7 +150,7 @@ struct ConvNCHWConcatAxis { auto constValues = ov::test::utils::generate_float_numbers(totalSize, -0.0001f, 0.0001f); auto constNode = ngraph::builder::makeConstant(ngPrc, {inputShape}, constValues); concatInputs.push_back(constNode); - auto concat = ngraph::builder::makeConcat(concatInputs, axis); + auto concat = std::make_shared(concatInputs, axis); ov::ResultVector results{std::make_shared(concat)}; return std::make_shared(results, params, getName()); @@ -196,7 +196,7 @@ struct ConvNHWCConcatAxis { auto constValues = ov::test::utils::generate_float_numbers(totalSize, -0.0001f, 0.0001f); auto constNode = ngraph::builder::makeConstant(ngPrc, {inputShape}, constValues); concatInputs.push_back(constNode); - auto concat = ngraph::builder::makeConcat(concatInputs, axis); + auto concat = std::make_shared(concatInputs, axis); ov::ResultVector results{std::make_shared(concat)}; return std::make_shared(results, params, getName()); @@ -251,7 +251,7 @@ struct ConvConcatNHWCAxis { concatInputs.push_back(conv1); concatInputs.push_back(conv2); - auto concat = ngraph::builder::makeConcat(concatInputs, axis); + auto concat = std::make_shared(concatInputs, axis); auto transposeOutOrder = ov::opset10::Constant::create(ov::element::i64, ov::Shape{4}, {0, 2, 3, 1}); auto transposeOut = std::make_shared(concat, transposeOutOrder); @@ -313,7 +313,7 @@ struct ConvConcatConcatNHWCAxis { concat1Inputs.push_back(transposeOut1); concat1Inputs.push_back(transposeOut2); - auto concat1 = ngraph::builder::makeConcat(concat1Inputs, 2); + auto concat1 = std::make_shared(concat1Inputs, 2); auto squeeze = std::make_shared( concat1, ov::opset10::Constant::create(ov::element::i64, ov::Shape{2}, {0, 1})); @@ -324,7 +324,7 @@ struct ConvConcatConcatNHWCAxis { concat2Inputs.push_back(squeeze); concat2Inputs.push_back(constNode); - auto concat2 = ngraph::builder::makeConcat(concat2Inputs, axis); + auto concat2 = std::make_shared(concat2Inputs, axis); auto reshape = std::make_shared( concat2, ov::opset10::Constant::create(ov::element::i64, @@ -424,7 +424,7 @@ struct TransposeTransposeConcat { auto transpose_r2 = make_shared(reshape_r3, transpose_r2_const); // Concat - auto concat = makeConcat({transpose_l1, transpose_r2}, 0); + auto concat = std::make_shared(ov::NodeVector{transpose_l1, transpose_r2}, 0); auto width_after_conv = (conv_input_shape[3] - kernel_shape[1]) + 1; auto reshape_const = diff --git a/src/plugins/intel_gna/tests/functional/pass_tests/fq_maxpool_reordering.cpp b/src/plugins/intel_gna/tests/functional/pass_tests/fq_maxpool_reordering.cpp index 0d587a71f84..f9a8204cedc 100644 --- a/src/plugins/intel_gna/tests/functional/pass_tests/fq_maxpool_reordering.cpp +++ b/src/plugins/intel_gna/tests/functional/pass_tests/fq_maxpool_reordering.cpp @@ -145,6 +145,7 @@ protected: node_before_pooling = reshapeNode2; } + OPENVINO_SUPPRESS_DEPRECATED_START auto maxpool = ngraph::builder::makePooling(node_before_pooling, {1, 2}, {0, 0}, @@ -154,6 +155,7 @@ protected: ngraph::op::PadType::VALID, false, ngraph::helpers::PoolingTypes::MAX); + OPENVINO_SUPPRESS_DEPRECATED_END ngraph::ResultVector results{std::make_shared(maxpool)}; function = std::make_shared(results, inputVector, "FQMaxPoolReorder"); diff --git a/src/plugins/intel_gna/tests/functional/pass_tests/insert_transpose_between_convs.cpp b/src/plugins/intel_gna/tests/functional/pass_tests/insert_transpose_between_convs.cpp index c82cabc13fe..9e8ec3a61b7 100644 --- a/src/plugins/intel_gna/tests/functional/pass_tests/insert_transpose_between_convs.cpp +++ b/src/plugins/intel_gna/tests/functional/pass_tests/insert_transpose_between_convs.cpp @@ -185,6 +185,7 @@ protected: filter_weights_1); size_t out_width = ((inputShape[3] - kernal_size) / stride_size + 1); size_t out_height = ((inputShape[2] - 1) + 1); + OPENVINO_SUPPRESS_DEPRECATED_START auto pool = ngraph::builder::makePooling(conv1, {1, 2}, {0, 0}, @@ -194,6 +195,7 @@ protected: ngraph::op::PadType::VALID, false, ngraph::helpers::PoolingTypes::MAX); + OPENVINO_SUPPRESS_DEPRECATED_END out_width /= 2; ngraph::Shape pattern2_shape = {1, 1, 1, num_out_channels * out_height * out_width}; diff --git a/src/plugins/intel_gna/tests/functional/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp b/src/plugins/intel_gna/tests/functional/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp index 2067b67afd8..98bca5ca24d 100644 --- a/src/plugins/intel_gna/tests/functional/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp +++ b/src/plugins/intel_gna/tests/functional/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp @@ -111,6 +111,7 @@ std::shared_ptr CreateConvolution(const ngraph::Output(shape_size - 2, 0), @@ -120,6 +121,7 @@ std::shared_ptr CreateConvolution(const ngraph::Output(pool) : pool; } @@ -616,7 +618,7 @@ protected: ngraph::Shape{1, conv2_out_size}); auto reshape2 = std::make_shared(permute2, pattern2, false); - auto concat = ngraph::builder::makeConcat({reshape1, reshape2}, 1); + auto concat = std::make_shared(ov::NodeVector{reshape1, reshape2}, 1); ngraph::ResultVector results{std::make_shared(concat)}; function = std::make_shared(results, params, "RemoveSharedPermutationTest"); diff --git a/src/plugins/intel_gna/tests/functional/scale_factors_tests/weighable_layer_without_fq.cpp b/src/plugins/intel_gna/tests/functional/scale_factors_tests/weighable_layer_without_fq.cpp index e31e19624af..f9fa6be5519 100644 --- a/src/plugins/intel_gna/tests/functional/scale_factors_tests/weighable_layer_without_fq.cpp +++ b/src/plugins/intel_gna/tests/functional/scale_factors_tests/weighable_layer_without_fq.cpp @@ -71,7 +71,7 @@ protected: ngraph::opset8::Constant::create(ngraph::element::f32, {1}, {-10.}), ngraph::opset8::Constant::create(ngraph::element::f32, {1}, {10.}), static_cast(std::numeric_limits::max()) + 1); - auto concat = ngraph::builder::makeConcat({fq1, fq2}, 1); + auto concat = std::make_shared(ov::NodeVector{fq1, fq2}, 1); function = std::make_shared(concat, params, "WeighableLayerWithoutFq"); } }; // class WeighableLayerWithoutFqTest diff --git a/src/plugins/intel_gna/tests/unit/gna_extra_pwl_segments_tests.cpp b/src/plugins/intel_gna/tests/unit/gna_extra_pwl_segments_tests.cpp index 52a68757679..50c6ab0d609 100644 --- a/src/plugins/intel_gna/tests/unit/gna_extra_pwl_segments_tests.cpp +++ b/src/plugins/intel_gna/tests/unit/gna_extra_pwl_segments_tests.cpp @@ -144,6 +144,7 @@ void GNAPWLExtraSegmentsTestFixture::SetUp() { std::shared_ptr result = nullptr; if (use_pooling) { + OPENVINO_SUPPRESS_DEPRECATED_START auto maxpool = ngraph::builder::makePooling(activation, stride, pad_begin_pool, @@ -153,6 +154,7 @@ void GNAPWLExtraSegmentsTestFixture::SetUp() { PadType::VALID, false, ngraph::helpers::PoolingTypes::MAX); + OPENVINO_SUPPRESS_DEPRECATED_END result = std::make_shared(maxpool); } else { result = std::make_shared(activation); diff --git a/src/plugins/intel_gna/tests/unit/gna_memory_compact_test.cpp b/src/plugins/intel_gna/tests/unit/gna_memory_compact_test.cpp index 10ec76c3f6a..0673e7b1106 100644 --- a/src/plugins/intel_gna/tests/unit/gna_memory_compact_test.cpp +++ b/src/plugins/intel_gna/tests/unit/gna_memory_compact_test.cpp @@ -340,6 +340,7 @@ TEST_F(GNAMemoryOrderTest, orderingFusedLayersMaxPool) { auto input = std::make_shared(ov::element::f32, input_shape); auto conv = std::make_shared(input, weights, strides, pad_begin, pad_end, dilations); + OPENVINO_SUPPRESS_DEPRECATED_START auto maxpool = ngraph::builder::makePooling(conv, {1, 1}, {0, 0}, @@ -349,6 +350,7 @@ TEST_F(GNAMemoryOrderTest, orderingFusedLayersMaxPool) { ngraph::op::PadType::VALID, false, ngraph::helpers::PoolingTypes::MAX); + OPENVINO_SUPPRESS_DEPRECATED_END auto result = std::make_shared(maxpool); auto function = std::make_shared(ov::ResultVector({result}), ov::ParameterVector({input}), "convolution"); @@ -371,6 +373,7 @@ TEST_F(GNAMemoryOrderTest, orderingFusedLayersActivationMaxPool) { auto conv = std::make_shared(input, weights, strides, pad_begin, pad_end, dilations); auto activation = ngraph::builder::makeActivation(conv, ov::element::f32, ngraph::helpers::ActivationTypes::Sigmoid); + OPENVINO_SUPPRESS_DEPRECATED_START auto maxpool = ngraph::builder::makePooling(activation, {1, 1}, {0, 0}, @@ -380,6 +383,7 @@ TEST_F(GNAMemoryOrderTest, orderingFusedLayersActivationMaxPool) { ngraph::op::PadType::VALID, false, ngraph::helpers::PoolingTypes::MAX); + OPENVINO_SUPPRESS_DEPRECATED_END auto result = std::make_shared(maxpool); auto function = std::make_shared(ov::ResultVector({result}), ov::ParameterVector({input}), "convolution"); diff --git a/src/plugins/intel_gna/tests/unit/transformations/gna_insert_identity_layer.cpp b/src/plugins/intel_gna/tests/unit/transformations/gna_insert_identity_layer.cpp index 045c6f5ed8e..229ca62f9fc 100644 --- a/src/plugins/intel_gna/tests/unit/transformations/gna_insert_identity_layer.cpp +++ b/src/plugins/intel_gna/tests/unit/transformations/gna_insert_identity_layer.cpp @@ -640,7 +640,7 @@ public: auto relu = make_shared(fq); auto reshape_const = make_shared(i64, Shape{1}, m_input_shape); auto reshape = make_shared(inputs[1], reshape_const, false); - auto concat = makeConcat({relu, reshape}, 0); + auto concat = std::make_shared(ov::NodeVector{relu, reshape}, 0); auto result = make_shared(concat); m_func = make_shared(result, inputs, getName()); } @@ -654,7 +654,7 @@ public: auto reshape = make_shared(inputs[1], reshape_const, false); // We expect the following Identity layer to be inserted auto identity = make_shared(reshape); - auto concat = makeConcat({relu, identity}, 0); + auto concat = std::make_shared(ov::NodeVector{relu, identity}, 0); auto result = make_shared(concat); m_ref_func = make_shared(result, inputs, getName()); } diff --git a/src/plugins/intel_gna/tests/unit/transformations/gna_remove_convert.cpp b/src/plugins/intel_gna/tests/unit/transformations/gna_remove_convert.cpp index 77ecaaf4b9a..0b31e229a52 100644 --- a/src/plugins/intel_gna/tests/unit/transformations/gna_remove_convert.cpp +++ b/src/plugins/intel_gna/tests/unit/transformations/gna_remove_convert.cpp @@ -55,8 +55,7 @@ void RemoveInputConvertTest::SetUp() { // test function { auto params = std::make_shared(target_precision_, input_shape); - auto conversion = - ngraph::builder::makeConversion(params, net_precision_, ngraph::helpers::ConversionTypes::CONVERT); + auto conversion = std::make_shared(params, net_precision_); auto add_const = ngraph::opset8::Constant::create(net_precision_, input_shape, {10}); auto add = std::make_shared(conversion, add_const); @@ -115,8 +114,7 @@ public: auto params = std::make_shared(net_precision_, input_shape); auto add_const = ngraph::opset8::Constant::create(net_precision_, input_shape, {10}); auto add = std::make_shared(params, add_const); - auto conversion = - ngraph::builder::makeConversion(add, target_precision_, ngraph::helpers::ConversionTypes::CONVERT); + auto conversion = std::make_shared(add, target_precision_); auto result = std::make_shared(conversion); func_ = std::make_shared(ngraph::ResultVector{result}, ngraph::ParameterVector{params}, @@ -172,8 +170,7 @@ public: auto params = std::make_shared(net_precision_, input_shape); auto add_const = ngraph::opset8::Constant::create(net_precision_, input_shape, {10}); auto add1 = std::make_shared(params, add_const); - auto conversion = - ngraph::builder::makeConversion(add1, net_precision_, ngraph::helpers::ConversionTypes::CONVERT); + auto conversion = std::make_shared(add1, net_precision_); auto add2 = std::make_shared(conversion, add_const); auto result = std::make_shared(add2); func_ = std::make_shared(ngraph::ResultVector{result}, @@ -210,12 +207,9 @@ public: ov::ParameterVector input{std::make_shared(target_precision_, input_shape), std::make_shared(target_precision_, input_shape), std::make_shared(target_precision_, input_shape)}; - auto convert1 = - ngraph::builder::makeConversion(input[0], net_precision_, ngraph::helpers::ConversionTypes::CONVERT); - auto convert2 = - ngraph::builder::makeConversion(input[1], net_precision_, ngraph::helpers::ConversionTypes::CONVERT); - auto convert3 = - ngraph::builder::makeConversion(input[2], net_precision_, ngraph::helpers::ConversionTypes::CONVERT); + auto convert1 = std::make_shared(input[0], net_precision_); + auto convert2 = std::make_shared(input[1], net_precision_); + auto convert3 = std::make_shared(input[2], net_precision_); auto mul1 = ngraph::builder::makeEltwise(convert1, convert2, ngraph::helpers::EltwiseTypes::ADD); auto mul2 = ngraph::builder::makeEltwise(convert3, mul1, ngraph::helpers::EltwiseTypes::ADD); auto result = std::make_shared(mul2); @@ -252,10 +246,8 @@ public: std::make_shared(net_precision_, input_shape)}; auto mul1 = ngraph::builder::makeEltwise(input[0], input[1], ngraph::helpers::EltwiseTypes::ADD); auto mul2 = ngraph::builder::makeEltwise(input[2], input[3], ngraph::helpers::EltwiseTypes::ADD); - auto convert1 = - ngraph::builder::makeConversion(mul1, target_precision_, ngraph::helpers::ConversionTypes::CONVERT); - auto convert2 = - ngraph::builder::makeConversion(mul2, target_precision_, ngraph::helpers::ConversionTypes::CONVERT); + auto convert1 = std::make_shared(mul1, target_precision_); + auto convert2 = std::make_shared(mul2, target_precision_); auto result1 = std::make_shared(convert1); auto result2 = std::make_shared(convert2); @@ -297,12 +289,9 @@ public: auto mul1 = ngraph::builder::makeEltwise(input[0], input[1], ngraph::helpers::EltwiseTypes::ADD); auto mul2 = ngraph::builder::makeEltwise(input[2], input[3], ngraph::helpers::EltwiseTypes::ADD); auto mul3 = ngraph::builder::makeEltwise(mul1, mul2, ngraph::helpers::EltwiseTypes::ADD); - auto convert1 = - ngraph::builder::makeConversion(mul1, target_precision_, ngraph::helpers::ConversionTypes::CONVERT); - auto convert2 = - ngraph::builder::makeConversion(mul2, target_precision_, ngraph::helpers::ConversionTypes::CONVERT); - auto convert3 = - ngraph::builder::makeConversion(mul3, target_precision_, ngraph::helpers::ConversionTypes::CONVERT); + auto convert1 = std::make_shared(mul1, target_precision_); + auto convert2 = std::make_shared(mul2, target_precision_); + auto convert3 = std::make_shared(mul3, target_precision_); auto result1 = std::make_shared(convert1); auto result2 = std::make_shared(convert2); auto result3 = std::make_shared(convert3); diff --git a/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/detection_output.cpp b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/detection_output.cpp index 4690403ee2f..ab76700486d 100644 --- a/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/detection_output.cpp +++ b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/detection_output.cpp @@ -212,11 +212,14 @@ protected: ngraph::ResultVector results{std::make_shared(detOut)}; function = std::make_shared(results, params, "DetectionOutputDynamic"); } else { - ov::OutputVector paramsOuts; - for (auto&& param : params) { - paramsOuts.push_back(param); - } - auto detOut = ngraph::builder::makeDetectionOutput(paramsOuts, attrs); + std::shared_ptr detOut; + if (params.size() == 3) + detOut = std::make_shared(params[0], params[1], params[2], attrs); + else if (params.size() == 5) + detOut = std::make_shared(params[0], params[1], params[2], params[3], params[4], attrs); + else + OPENVINO_THROW("DetectionOutput layer supports only 3 or 5 inputs"); + ngraph::ResultVector results{std::make_shared(detOut)}; function = std::make_shared(results, params, "DetectionOutputDynamic"); } diff --git a/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/pooling.cpp b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/pooling.cpp index 21d0e584def..7b5c7f9ae62 100644 --- a/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/pooling.cpp +++ b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/pooling.cpp @@ -84,15 +84,12 @@ protected: } std::shared_ptr poolInput = params[0]; - std::shared_ptr pooling = ngraph::builder::makePooling(poolInput, - stride, - padBegin, - padEnd, - kernel, - roundingType, - padType, - excludePad, - poolType); + std::shared_ptr pooling; + if (ov::test::utils::PoolingTypes::MAX == poolType) { + pooling = std::make_shared(poolInput, stride, padBegin, padEnd, kernel, roundingType, padType); + } else { + pooling = std::make_shared(poolInput, stride, padBegin, padEnd, kernel, excludePad, roundingType, padType); + } auto makeFunction = [](const ngraph::element::Type &ngPrc, ngraph::ParameterVector ¶ms, const std::shared_ptr &lastNode) { ngraph::ResultVector results; diff --git a/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/roi_pooling.cpp b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/roi_pooling.cpp index 5add9f1cc1d..90d2f1b5f63 100644 --- a/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/roi_pooling.cpp +++ b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/roi_pooling.cpp @@ -186,8 +186,12 @@ protected: for (auto&& shape : inputDynamicShapes) params.push_back(std::make_shared(ngPrc, shape)); - auto roi_pooling = ngraph::builder::makeROIPooling(params[0], params[1], poolShape, spatial_scale, pool_method); - + std::shared_ptr roi_pooling; + if (ov::test::utils::ROIPoolingTypes::ROI_MAX == pool_method) { + roi_pooling = std::make_shared(params[0], params[1], poolShape, spatial_scale, "max"); + } else { + roi_pooling = std::make_shared(params[0], params[1], poolShape, spatial_scale, "bilinear"); + } ngraph::ResultVector results; for (size_t i = 0; i < roi_pooling->get_output_size(); i++) results.push_back(std::make_shared(roi_pooling->output(i))); diff --git a/src/plugins/intel_gpu/tests/functional/subgraph_tests/condition.cpp b/src/plugins/intel_gpu/tests/functional/subgraph_tests/condition.cpp index 1efbbaf7c8b..81ed715d983 100644 --- a/src/plugins/intel_gpu/tests/functional/subgraph_tests/condition.cpp +++ b/src/plugins/intel_gpu/tests/functional/subgraph_tests/condition.cpp @@ -198,9 +198,24 @@ protected: OPENVINO_ASSERT(false, "Not allowed other rank"); } } - return ngraph::builder::makePooling(in, params.stride, params.pad_begin, - params.pad_end, params.kernel_size, params.rounding_type, - params.pad_type, params.exclued_pad, params.pooling_type); + if (ov::test::utils::PoolingTypes::MAX == params.pooling_type) { + return std::make_shared(in, + params.stride, + params.pad_begin, + params.pad_end, + params.kernel_size, + params.rounding_type, + params.pad_type); + } else { + return std::make_shared(in, + params.stride, + params.pad_begin, + params.pad_end, + params.kernel_size, + params.exclued_pad, + params.rounding_type, + params.pad_type); + } } }; diff --git a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_gen_impl_key.cpp b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_gen_impl_key.cpp index c365f1cd888..66c8ebe1426 100644 --- a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_gen_impl_key.cpp +++ b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_gen_impl_key.cpp @@ -102,7 +102,7 @@ protected: std::vector shapePatternFill = {-1}; auto reshapePatternComp1 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{1}, shapePatternFill); - auto concatOp1 = ngraph::builder::makeConcat({reduceOp1, reshapePatternComp1}, 0); + auto concatOp1 = std::make_shared(ov::NodeVector{reduceOp1, reshapePatternComp1}, 0); concatOp1->set_friendly_name("concat1"); auto reshapeOp1 = std::make_shared(addOp1, concatOp1, false); @@ -121,7 +121,7 @@ protected: auto reshapePatternComp2 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{1}, shapePatternFill); - auto concatOp2 = ngraph::builder::makeConcat({reduceOp2, reshapePatternComp2}, 0); + auto concatOp2 = std::make_shared(ov::NodeVector{reduceOp2, reshapePatternComp2}, 0); concatOp2->set_friendly_name("concat2"); auto reshapeOp2 = std::make_shared(addOp2, concatOp2, false); diff --git a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_reduce_deconvolution_concat.cpp b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_reduce_deconvolution_concat.cpp index 5ddc7977e27..8a76b155c13 100644 --- a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_reduce_deconvolution_concat.cpp +++ b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_reduce_deconvolution_concat.cpp @@ -94,7 +94,7 @@ protected: auto reduceOp = ngraph::builder::makeReduce(params[1], reduceAxesNode, false, ngraph::helpers::ReductionType::Max); reduceOp->set_friendly_name("reduce"); - auto concatOp = ngraph::builder::makeConcat({deconvOp, reduceOp}, 1); + auto concatOp = std::make_shared(ov::NodeVector{deconvOp, reduceOp}, 1); concatOp->set_friendly_name("concat"); std::vector transpose_order = {0, 1, 2, 4, 3}; diff --git a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_activation.cpp b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_activation.cpp index 815a2954acb..1a611f1f306 100644 --- a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_activation.cpp +++ b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_activation.cpp @@ -113,8 +113,7 @@ protected: auto gatherOp = std::make_shared(shapeOfOp, indicesNode, axisNode, 0); gatherOp->set_friendly_name("gather"); - auto convertOp = ngraph::builder::makeConversion(gatherOp, ElementType::f32, - ngraph::helpers::ConversionTypes::CONVERT); + auto convertOp = std::make_shared(gatherOp, ElementType::f32); convertOp->set_friendly_name("convert"); auto activationOp = ngraph::builder::makeActivation(convertOp, diff --git a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_reduce_reshape.cpp b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_reduce_reshape.cpp index ce39dfc1225..456c627c38f 100644 --- a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_reduce_reshape.cpp +++ b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_shape_of_reduce_reshape.cpp @@ -100,7 +100,7 @@ protected: std::vector shapePatternFill = {-1}; auto reshapePatternComp = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{1}, shapePatternFill); - auto concatOp = ngraph::builder::makeConcat({reduceOp, reshapePatternComp}, 0); + auto concatOp = std::make_shared(ov::NodeVector{reduceOp, reshapePatternComp}, 0); concatOp->set_friendly_name("concat"); auto reshapeOp = std::make_shared(addOp, concatOp, false); diff --git a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_with_empty_tensor.cpp b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_with_empty_tensor.cpp index cd0bad894d3..a85c6089461 100644 --- a/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_with_empty_tensor.cpp +++ b/src/plugins/intel_gpu/tests/functional/subgraph_tests/dynamic/dynamic_smoke_test_with_empty_tensor.cpp @@ -97,14 +97,12 @@ protected: const ElementType intInputsPrecision = ElementType::i32; auto nonzeroEmptyResultOp = std::make_shared(params[0]); - auto convertEmptyInputOp = ngraph::builder::makeConversion(nonzeroEmptyResultOp, - ElementType::i32, - ngraph::helpers::ConversionTypes::CONVERT); + auto convertEmptyInputOp = std::make_shared(nonzeroEmptyResultOp, ElementType::i32); auto concatPartialInputEmptyOp = - ngraph::builder::makeConcat({convertEmptyInputOp, params[1], convertEmptyInputOp}, + std::make_shared(ov::NodeVector{convertEmptyInputOp, params[1], convertEmptyInputOp}, 1); // partially empty input / non empty output auto concatEmptyInputEmptyOutputOp = - ngraph::builder::makeConcat({convertEmptyInputOp, convertEmptyInputOp, convertEmptyInputOp}, + std::make_shared(ov::NodeVector{convertEmptyInputOp, convertEmptyInputOp, convertEmptyInputOp}, 1); // all empty input/ all empty output std::vector squeezeDims = {0}; diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/iteration_chaining.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/iteration_chaining.cpp index 92be239e2b6..6756a9323d3 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/iteration_chaining.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/iteration_chaining.cpp @@ -38,7 +38,7 @@ std::shared_ptr OVIterationChaining::getIterativeFunction() { params->get_output_tensor(0).set_names({"input_tensor_0"}); params->set_friendly_name("param_0"); auto concat_const = ngraph::builder::makeConstant(element::Type_t::f32, {1, 16}, std::vector{}, true); - auto concat = ngraph::builder::makeConcat({params, concat_const}, 0 /*axis*/); + auto concat = std::make_shared(ov::NodeVector{params, concat_const}, 0 /*axis*/); auto eltwise_const = ngraph::builder::makeConstant(element::Type_t::f32, {1, 16}, std::vector{}, true); auto eltwise = ngraph::builder::makeEltwise(concat, eltwise_const, ngraph::helpers::EltwiseTypes::ADD); concat->get_output_tensor(0).set_names({"result_tensor_0"}); diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp index 0db4bc3e0e2..0a0a02adf07 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp @@ -38,7 +38,9 @@ protected: const std::vector& padsEnd, float argPadValue, ngraph::helpers::PadMode padMode) const { + OPENVINO_SUPPRESS_DEPRECATED_START const auto pad = ngraph::builder::makePad(data, padsBegin, padsEnd, argPadValue, padMode, false); + OPENVINO_SUPPRESS_DEPRECATED_END return pad; } }; @@ -50,7 +52,9 @@ protected: const std::vector& padsEnd, float argPadValue, ngraph::helpers::PadMode padMode) const override { + OPENVINO_SUPPRESS_DEPRECATED_START const auto pad = ngraph::builder::makePad(data, padsBegin, padsEnd, argPadValue, padMode, true); + OPENVINO_SUPPRESS_DEPRECATED_END return pad; } }; diff --git a/src/tests/functional/shared_test_classes/src/single_layer/batch_norm.cpp b/src/tests/functional/shared_test_classes/src/single_layer/batch_norm.cpp index 1a02639b7e8..4c0b72affa4 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/batch_norm.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/batch_norm.cpp @@ -39,7 +39,22 @@ void BatchNormLayerTest::SetUp() { ov::ParameterVector params {std::make_shared(ngPrc, ov::Shape(inputShapes))}; - auto batchNorm = ngraph::builder::makeBatchNormInference(params[0], epsilon); + size_t C = inputShapes.at(1); + bool random = true; + std::vector values(C); + auto gamma = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, random, 1.f, 0.f); + auto beta = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, random, 1.f, 0.f); + auto mean = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, random, 1.f, 0.f); + + // Fill the vector for variance with positive values + std::default_random_engine gen; + std::uniform_real_distribution dis(0.0, 10.0); + std::generate(values.begin(), values.end(), [&dis, &gen]() { + return dis(gen); + }); + auto variance = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, !random); + auto batchNorm = std::make_shared(params[0], gamma, beta, mean, variance, epsilon); + ngraph::ResultVector results{std::make_shared(batchNorm)}; function = std::make_shared(results, params, "BatchNormInference"); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/conversion.cpp b/src/tests/functional/shared_test_classes/src/single_layer/conversion.cpp index ab39066c9c7..78d0f5a0704 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/conversion.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/conversion.cpp @@ -43,8 +43,13 @@ void ConversionLayerTest::SetUp() { for (auto&& shape : inputShape) { params.push_back(std::make_shared(ngPrc, ov::Shape(shape))); } - auto conversion = ngraph::builder::makeConversion(params.front(), targetPrc, conversionOpType); - + std::shared_ptr conversion; + if (ov::test::utils::ConversionTypes::CONVERT == conversionOpType) { + conversion = std::make_shared(params.front(), targetPrc); + } else { + const auto like = std::make_shared(targetPrc, ov::Shape{1}); + conversion = std::make_shared(params.front(), like); + } ngraph::ResultVector results{std::make_shared(conversion)}; function = std::make_shared(results, params, "Conversion"); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/detection_output.cpp b/src/tests/functional/shared_test_classes/src/single_layer/detection_output.cpp index b08ac1fe252..fafaa6fe6ee 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/detection_output.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/detection_output.cpp @@ -152,13 +152,18 @@ void DetectionOutputLayerTest::SetUp() { } ov::ParameterVector params; - ov::OutputVector paramsOuts; for (auto&& shape : inShapes) { auto param = std::make_shared(ov::element::f32, ov::Shape(shape)); params.push_back(param); - paramsOuts.push_back(param); } - auto detOut = ngraph::builder::makeDetectionOutput(paramsOuts, attrs); + std::shared_ptr detOut; + if (params.size() == 3) + detOut = std::make_shared(params[0], params[1], params[2], attrs); + else if (params.size() == 5) + detOut = std::make_shared(params[0], params[1], params[2], params[3], params[4], attrs); + else + OPENVINO_THROW("DetectionOutput layer supports only 3 or 5 inputs"); + ngraph::ResultVector results{std::make_shared(detOut)}; function = std::make_shared(results, params, "DetectionOutput"); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/pooling.cpp b/src/tests/functional/shared_test_classes/src/single_layer/pooling.cpp index e4cbedff108..f7a1a93f25f 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/pooling.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/pooling.cpp @@ -146,6 +146,7 @@ void PoolingLayerTest::SetUp() { auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); ov::ParameterVector params{std::make_shared(ngPrc, ov::Shape(inputShape))}; + OPENVINO_SUPPRESS_DEPRECATED_START std::shared_ptr pooling = ngraph::builder::makePooling(params[0], stride, padBegin, @@ -155,6 +156,7 @@ void PoolingLayerTest::SetUp() { padType, excludePad, poolType); + OPENVINO_SUPPRESS_DEPRECATED_END ngraph::ResultVector results{std::make_shared(pooling)}; function = std::make_shared(results, params, "pooling"); @@ -178,6 +180,7 @@ void GlobalPoolingLayerTest::SetUp() { auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); ov::ParameterVector params{std::make_shared(ngPrc, ov::Shape(inputShape))}; + OPENVINO_SUPPRESS_DEPRECATED_START std::shared_ptr pooling = ngraph::builder::makePooling(params[0], stride, padBegin, @@ -187,6 +190,7 @@ void GlobalPoolingLayerTest::SetUp() { padType, excludePad, poolType); + OPENVINO_SUPPRESS_DEPRECATED_END ngraph::ResultVector results{std::make_shared(pooling)}; function = std::make_shared(results, params, "pooling"); @@ -208,9 +212,9 @@ void MaxPoolingV8LayerTest::SetUp() { auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); ov::ParameterVector params{std::make_shared(ngPrc, ov::Shape(inputShape))}; - std::shared_ptr maxPool = ngraph::builder::makeMaxPoolingV8(params[0], stride, dilation, padBegin, padEnd, - kernel, roundingType, padType, - indexElementType, axis); + auto maxPool = std::make_shared(params[0], stride, dilation, padBegin, padEnd, + kernel, roundingType, padType, + indexElementType, axis); const auto maxPoolV8_second_output_is_supported = targetDevice == ov::test::utils::DEVICE_GPU; ngraph::ResultVector results; diff --git a/src/tests/functional/shared_test_classes/src/single_layer/roi_pooling.cpp b/src/tests/functional/shared_test_classes/src/single_layer/roi_pooling.cpp index 43e8e8a3e6a..8a1c38f6096 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/roi_pooling.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/roi_pooling.cpp @@ -74,11 +74,12 @@ namespace LayerTestsDefinitions { auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); ov::ParameterVector params {std::make_shared(ngPrc, ov::Shape(inputShape)), std::make_shared(ngPrc, ov::Shape(coordsShape))}; - std::shared_ptr roi_pooling = ngraph::builder::makeROIPooling(params[0], - params[1], - poolShape, - spatial_scale, - pool_method); + std::shared_ptr roi_pooling; + if (ov::test::utils::ROIPoolingTypes::ROI_MAX == pool_method) { + roi_pooling = std::make_shared(params[0], params[1], poolShape, spatial_scale, "max"); + } else { + roi_pooling = std::make_shared(params[0], params[1], poolShape, spatial_scale, "bilinear"); + } ngraph::ResultVector results{std::make_shared(roi_pooling)}; function = std::make_shared(results, params, "roi_pooling"); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/scatter_ND_update.cpp b/src/tests/functional/shared_test_classes/src/single_layer/scatter_ND_update.cpp index 748c47ee592..55e0e453ea0 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/scatter_ND_update.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/scatter_ND_update.cpp @@ -66,7 +66,10 @@ void ScatterNDUpdateLayerTest::SetUp() { paramVector.push_back(inputParams); auto updateParams = std::make_shared(inPrc, ngraph::Shape(updateShape)); paramVector.push_back(updateParams); - auto s2d = ngraph::builder::makeScatterNDUpdate(paramVector[0], idxPrc, indicesShape, indicesValue, paramVector[1]); + + auto indicesNode = std::make_shared(idxPrc, ov::Shape(indicesShape), indicesValue); + auto s2d = std::make_shared(paramVector[0], indicesNode, paramVector[1]); + ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, paramVector, "ScatterNDUpdate"); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/scatter_elements_update.cpp b/src/tests/functional/shared_test_classes/src/single_layer/scatter_elements_update.cpp index cf4503616d9..9b3a4ca7bd4 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/scatter_elements_update.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/scatter_elements_update.cpp @@ -57,7 +57,11 @@ void ScatterElementsUpdateLayerTest::SetUp() { paramVector.push_back(inputParams); auto updateParams = std::make_shared(inPrc, ngraph::Shape(indicesShape)); paramVector.push_back(updateParams); - auto s2d = ngraph::builder::makeScatterElementsUpdate(paramVector[0], idxPrc, indicesShape, indicesValue, paramVector[1], axis); + + auto indicesNode = std::make_shared(idxPrc, ov::Shape(indicesShape), indicesValue); + auto axis_node = std::make_shared(ov::element::i32, ov::Shape{}, std::vector{axis}); + auto s2d = std::make_shared(paramVector[0], indicesNode, paramVector[1], axis_node); + ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, paramVector, "ScatterElementsUpdate"); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/scatter_update.cpp b/src/tests/functional/shared_test_classes/src/single_layer/scatter_update.cpp index 397885c77e1..d250ddbefbd 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/scatter_update.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/scatter_update.cpp @@ -76,7 +76,11 @@ void ScatterUpdateLayerTest::SetUp() { paramVector.push_back(inputParams); auto updateParams = std::make_shared(inPrc, ngraph::Shape(updateShape)); paramVector.push_back(updateParams); - auto s2d = ngraph::builder::makeScatterUpdate(paramVector[0], idxPrc, indicesShape, indicesValue, paramVector[1], axis); + + auto indicesNode = std::make_shared(idxPrc, ov::Shape(indicesShape), indicesValue); + auto axis_node = std::make_shared(ov::element::Type_t::i64, ov::Shape{}, std::vector{axis}); + auto s2d = std::make_shared(paramVector[0], indicesNode, paramVector[1], axis_node); + ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, paramVector, "ScatterUpdate"); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/space_to_depth.cpp b/src/tests/functional/shared_test_classes/src/single_layer/space_to_depth.cpp index 887f499b366..bdc4b6eba59 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/space_to_depth.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/space_to_depth.cpp @@ -46,9 +46,7 @@ void SpaceToDepthLayerTest::SetUp() { std::tie(inShape, inputPrecision, mode, blockSize, targetDevice) = this->GetParam(); auto inPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(inputPrecision); ov::ParameterVector params {std::make_shared(inPrc, ov::Shape(inShape))}; - OPENVINO_SUPPRESS_DEPRECATED_START auto s2d = std::make_shared(params[0], mode, blockSize); - OPENVINO_SUPPRESS_DEPRECATED_END ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, params, "SpaceToDepth"); } diff --git a/src/tests/functional/shared_test_classes/src/single_op/pooling.cpp b/src/tests/functional/shared_test_classes/src/single_op/pooling.cpp index c86f8a2217f..1c19a151052 100644 --- a/src/tests/functional/shared_test_classes/src/single_op/pooling.cpp +++ b/src/tests/functional/shared_test_classes/src/single_op/pooling.cpp @@ -78,15 +78,12 @@ void PoolingLayerTest::SetUp() { auto param = std::make_shared(model_type, inputDynamicShapes.front()); - std::shared_ptr pooling = ngraph::builder::makePooling(param, - stride, - pad_begin, - pad_end, - kernel, - rounding_type, - pad_type, - excludePad, - pool_type); + std::shared_ptr pooling; + if (ov::test::utils::PoolingTypes::MAX == pool_type) { + pooling = std::make_shared(param, stride, pad_begin, pad_end, kernel, rounding_type, pad_type); + } else { + pooling = std::make_shared(param, stride, pad_begin, pad_end, kernel, excludePad, rounding_type, pad_type); + } auto result = std::make_shared(pooling); function = std::make_shared(result, ov::ParameterVector{param}, "pooling"); @@ -150,9 +147,9 @@ void MaxPoolingV8LayerTest::SetUp() { auto param = std::make_shared(model_type, inputDynamicShapes.front()); - std::shared_ptr max_pool = ngraph::builder::makeMaxPoolingV8(param, stride, dilation, pad_begin, pad_end, - kernel, rounding_type, pad_type, - index_element_type, axis); + auto max_pool = std::make_shared(param, stride, dilation, pad_begin, pad_end, + kernel, rounding_type, pad_type, + index_element_type, axis); const auto max_pool_v8_second_output_is_supported = targetDevice == ov::test::utils::DEVICE_GPU; diff --git a/src/tests/functional/shared_test_classes/src/subgraph/activation_concats_eltwise.cpp b/src/tests/functional/shared_test_classes/src/subgraph/activation_concats_eltwise.cpp index 0f3922ca3dc..0eef9adde8f 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/activation_concats_eltwise.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/activation_concats_eltwise.cpp @@ -47,8 +47,8 @@ void ActivationConcatsEltwise::SetUp() { auto concat_const_1 = ngraph::builder::makeConstant(ngPrc, {1, concatSize}, concat_vals_1); auto concat_const_2 = ngraph::builder::makeConstant(ngPrc, {1, concatSize}, concat_vals_2); - auto concat_1 = ngraph::builder::makeConcat({concat_const_1, relu}, 1); - auto concat_2 = ngraph::builder::makeConcat({concat_const_2, relu}, 1); + auto concat_1 = std::make_shared(ov::NodeVector{concat_const_1, relu}, 1); + auto concat_2 = std::make_shared(ov::NodeVector{concat_const_2, relu}, 1); auto eltw = ngraph::builder::makeEltwise(concat_1, concat_2, ngraph::helpers::EltwiseTypes::ADD); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/cascade_concat.cpp b/src/tests/functional/shared_test_classes/src/subgraph/cascade_concat.cpp index a6f3e24a382..33a101d1e0c 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/cascade_concat.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/cascade_concat.cpp @@ -39,7 +39,7 @@ void CascadeConcat::SetUp() { auto relu1 = std::make_shared(input[0]); auto relu2 = std::make_shared(input[1]); auto relu3 = std::make_shared(input[2]); - auto concat = std::make_shared(ngraph::OutputVector{relu1->output(0), + auto concat = std::make_shared(ov::OutputVector{relu1->output(0), relu2->output(0)}, 1); @@ -48,7 +48,7 @@ void CascadeConcat::SetUp() { auto reshape2_constant = std::make_shared(ov::element::i64, ov::Shape{1}, std::vector{0}); auto reshape2 = std::make_shared(reshape, reshape2_constant); - auto concat2 = std::make_shared(ngraph::OutputVector{reshape2->output(0), + auto concat2 = std::make_shared(ov::OutputVector{reshape2->output(0), relu3->output(0)}, 1); ngraph::ResultVector results; @@ -110,7 +110,7 @@ void CascadeConcatWithMultiConnReshape::SetUp() { ov::ParameterVector input {std::make_shared(ngPrc, ov::Shape(inputShapeSqueezed))}; auto relu = std::make_shared(input[0]); auto const1 = ngraph::builder::makeConstant(ngPrc, inputShapeSqueezed, std::vector{}, true); - auto concat1 = ngraph::builder::makeConcat({relu, const1}, inputShapeSqueezed.size() - 1); + auto concat1 = std::make_shared(ov::NodeVector{relu, const1}, inputShapeSqueezed.size() - 1); auto squeeze_constant = std::make_shared(ov::element::i64, ov::Shape{1}, std::vector{0}); auto squeeze = std::make_shared(concat1, squeeze_constant); @@ -121,7 +121,7 @@ void CascadeConcatWithMultiConnReshape::SetUp() { auto unsqueeze1 = std::make_shared(relu1, unsqueeze1_constant); auto const2 = ngraph::builder::makeConstant(ngPrc, inputShape, std::vector{}, true); - auto concat2 = ngraph::builder::makeConcat({squeeze, const2}, 1); + auto concat2 = std::make_shared(ov::NodeVector{squeeze, const2}, 1); // Change concat name to make it the second connection in the map of squeeze output connections concat2->set_friendly_name("XConcat"); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/concat_conv.cpp b/src/tests/functional/shared_test_classes/src/subgraph/concat_conv.cpp index 4b3fd59ea8a..215a33f47e6 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/concat_conv.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/concat_conv.cpp @@ -66,7 +66,7 @@ void ConcatConvTest::SetUp() { auto const_values = ov::test::utils::generate_float_numbers(inputShape[1], -2.0f, 2.0f); auto constant = ngraph::builder::makeConstant(ngPrc, inputShape, const_values); - auto concat = ngraph::builder::makeConcat({constant, relu1}, 1); + auto concat = std::make_shared(ov::NodeVector{constant, relu1}, 1); std::vector convInputShape = {1, inputChannels, 1, 2 * inputShape[0] * inputShape[1] / inputChannels}; auto reshapePattern1 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{ 4 }, convInputShape); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/concat_multi_input.cpp b/src/tests/functional/shared_test_classes/src/subgraph/concat_multi_input.cpp index 686848ff4c6..dcad9cb8dbf 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/concat_multi_input.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/concat_multi_input.cpp @@ -102,7 +102,7 @@ void ConcatMultiInput::GenerateConstOnlyModel() { } } - auto concat = ngraph::builder::makeConcat(concatInputs, 1); + auto concat = std::make_shared(concatInputs, 1); ngraph::ResultVector results{ std::make_shared(concat) }; function = std::make_shared(results, input_vector, "ConcatConstOnly"); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/const_conv_concat.cpp b/src/tests/functional/shared_test_classes/src/subgraph/const_conv_concat.cpp index 2fe17c55ca7..7dabd62e98f 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/const_conv_concat.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/const_conv_concat.cpp @@ -81,7 +81,7 @@ void ConstConvConcatTest::SetUp() { auto const_values = ov::test::utils::generate_float_numbers(outputChannels * widthAfterConv, -0.2f, 0.2f); auto constant = ngraph::builder::makeConstant(ngPrc, {1, outputChannels, 1, widthAfterConv}, const_values); - auto concat = ngraph::builder::makeConcat({constant, conv}, 3); + auto concat = std::make_shared(ov::NodeVector{constant, conv}, 3); auto reshapePattern2 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{ 2 }, std::vector{1, 2 * outputChannels * widthAfterConv }); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/const_strided_slice_concat.cpp b/src/tests/functional/shared_test_classes/src/subgraph/const_strided_slice_concat.cpp index 8ba876499b3..1b10adb9f91 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/const_strided_slice_concat.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/const_strided_slice_concat.cpp @@ -90,7 +90,7 @@ void ConstStridedSliceConcatTest::SetUp() { std::vector> allToConcat; appendSlices(allToConcat, params[0], inputSliceSize, totalInputSize, ngPrc); appendSlices(allToConcat, constant, constSliceSize, totalConstantSize, ngPrc); - auto concat = ngraph::builder::makeConcat(allToConcat, 1); + auto concat = std::make_shared(allToConcat, 1); function = std::make_shared(concat, params, "ConstStridedSliceConcatTest"); } diff --git a/src/tests/functional/shared_test_classes/src/subgraph/memory_eltwise_reshape_concat.cpp b/src/tests/functional/shared_test_classes/src/subgraph/memory_eltwise_reshape_concat.cpp index eadb9d7b3eb..314fc9bac74 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/memory_eltwise_reshape_concat.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/memory_eltwise_reshape_concat.cpp @@ -72,7 +72,7 @@ void MemoryEltwiseReshapeConcatTest::initTestModel() { auto concat_constant = ngraph::builder::makeConstant(ngPrc, {1, concatSize}, concat_vals); concat_constant->set_friendly_name("concat_constant"); - auto concat = ngraph::builder::makeConcat({concat_constant, reshape_1}, 0); + auto concat = std::make_shared(ov::NodeVector{concat_constant, reshape_1}, 0); memory_write->add_control_dependency(memory_read); concat->add_control_dependency(memory_write); @@ -107,7 +107,7 @@ void MemoryEltwiseReshapeConcatTest::initNgraphFriendlyModel() { auto concat_constant = ngraph::builder::makeConstant(ngPrc, {1, concatSize}, concat_vals); concat_constant->set_friendly_name("concat_constant"); - auto concat = ngraph::builder::makeConcat({concat_constant, squeeze}, 0); + auto concat = std::make_shared(ov::NodeVector{concat_constant, squeeze}, 0); function = std::make_shared(concat, input_parameter, "memory_multiply_reshape_concat"); } diff --git a/src/tests/functional/shared_test_classes/src/subgraph/memory_fq_concat_prelu.cpp b/src/tests/functional/shared_test_classes/src/subgraph/memory_fq_concat_prelu.cpp index 155bfdfa696..0048be794d5 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/memory_fq_concat_prelu.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/memory_fq_concat_prelu.cpp @@ -107,7 +107,7 @@ void MemoryFqConcatPrelu::SetUp() { std::get<3>(fake_quantize_params), std::get<4>(fake_quantize_params), std::get<5>(fake_quantize_params)); - auto concat = ngraph::builder::makeConcat({read, fake, input[0]}, 1); + auto concat = std::make_shared(ov::OutputVector{read, fake, input[0]}, 1); auto prelu_constant = ngraph::op::Constant::create(ngPrc, {1}, {-2}); auto prelu = std::make_shared(concat, prelu_constant); auto slice = ngraph::builder::makeStridedSlice(prelu, diff --git a/src/tests/functional/shared_test_classes/src/subgraph/multiple_concat.cpp b/src/tests/functional/shared_test_classes/src/subgraph/multiple_concat.cpp index c12bf94f581..6391edf1715 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/multiple_concat.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/multiple_concat.cpp @@ -44,10 +44,10 @@ void MultipleConcatTest::SetUp() { ov::ParameterVector input_parameter {std::make_shared(ngPrc, ov::Shape(input_dims))}; auto const_1 = ngraph::builder::makeConstant(ngPrc, constant_dims, concat_1_vals); - auto concat_1 = ngraph::builder::makeConcat({const_1, input_parameter[0]}, 1); + auto concat_1 = std::make_shared(ov::NodeVector{const_1, input_parameter[0]}, 1); auto const_2 = ngraph::builder::makeConstant(ngPrc, constant_dims, concat_1_vals); - auto concat_2 = ngraph::builder::makeConcat({concat_1, const_2}, 1); + auto concat_2 = std::make_shared(ov::NodeVector{concat_1, const_2}, 1); auto act = ngraph::builder::makeActivation(concat_2, ngPrc, ngraph::helpers::ActivationTypes::Relu); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/perm_conv_perm_concat.cpp b/src/tests/functional/shared_test_classes/src/subgraph/perm_conv_perm_concat.cpp index e51e30a6caa..7cbe74dea54 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/perm_conv_perm_concat.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/perm_conv_perm_concat.cpp @@ -85,7 +85,7 @@ void PermConvPermConcat::SetUp() { {1, 1, 1, permute_out_shape[3]}, ov::test::utils::generate_float_numbers(permute_out_shape[3], -10, 10)); - auto concat = ngraph::builder::makeConcat({permute_out, concat_const}, 2); + auto concat = std::make_shared(ov::NodeVector{permute_out, concat_const}, 2); auto reshape_out_pattern = std::make_shared( ov::element::i64, diff --git a/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp b/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp index 3c408c0bff0..c620e479278 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp @@ -249,7 +249,11 @@ void SimpleIfNotConstConditionAndDimsIncreaseTest::SetUp() { // then body const std::vector pads(p1->get_partial_shape().rank().get_length(), 2); - auto thenOp = ngraph::builder::makePad(p1, pads, pads, 0, ngraph::helpers::PadMode::CONSTANT); + auto pads_begin = std::make_shared(ov::element::i64, ov::Shape{pads.size()}, pads.data()); + auto pads_end = std::make_shared(ov::element::i64, ov::Shape{pads.size()}, pads.data()); + auto arg_pad_value = std::make_shared(inType, ov::Shape{}, std::vector{0}); + auto thenOp = std::make_shared(p1, pads_begin, pads_end, arg_pad_value, ov::op::PadMode::CONSTANT); + auto thenRes = std::make_shared(thenOp); auto thenBody = std::make_shared(ov::OutputVector{thenRes}, ov::ParameterVector{p1}); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/stridedslice_concat.cpp b/src/tests/functional/shared_test_classes/src/subgraph/stridedslice_concat.cpp index 325f93249ef..468a393ccab 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/stridedslice_concat.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/stridedslice_concat.cpp @@ -58,7 +58,7 @@ void SliceConcatTest::SetUp() { ngraph::Shape const_shape(inputShape.size(), 1); const_shape.back() = 32; auto const_input = ngraph::builder::makeConstant(ngPrc, const_shape, std::vector{}, true); - auto concat = ngraph::builder::makeConcat({const_input, ss}, inputShape.size() - 1); + auto concat = std::make_shared(ov::NodeVector{const_input, ss}, inputShape.size() - 1); function = std::make_shared(concat, params, "StridedSliceConcatTest"); } diff --git a/src/tests/functional/shared_test_classes/src/subgraph/variadic_split_pad.cpp b/src/tests/functional/shared_test_classes/src/subgraph/variadic_split_pad.cpp index 8c7906c275e..4c53560185c 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/variadic_split_pad.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/variadic_split_pad.cpp @@ -47,7 +47,11 @@ void VariadicSplitPad::SetUp() { ov::ResultVector results; for (size_t i : connectIndexes) { - auto pad = ngraph::builder::makePad(split->output(i), padBegin, padEnd, 0, padMode); + auto pads_begin = std::make_shared(ov::element::i64, ov::Shape{padBegin.size()}, padBegin.data()); + auto pads_end = std::make_shared(ov::element::i64, ov::Shape{padEnd.size()}, padEnd.data()); + auto arg_pad_value = std::make_shared(split->output(i).get_element_type(), ov::Shape{}, std::vector{0}); + auto pad = std::make_shared(split->output(i), pads_begin, pads_end, arg_pad_value, padMode); + results.push_back(std::make_shared(pad)); } function = std::make_shared(results, input, "variadic_split_pad"); diff --git a/src/tests/ov_helpers/ov_lpt_models/src/common/builders.cpp b/src/tests/ov_helpers/ov_lpt_models/src/common/builders.cpp index a4f3f8d3fc3..41151e61fb0 100644 --- a/src/tests/ov_helpers/ov_lpt_models/src/common/builders.cpp +++ b/src/tests/ov_helpers/ov_lpt_models/src/common/builders.cpp @@ -285,7 +285,7 @@ std::shared_ptr makeFakeQuantize( fqOnData.inputLowValues, fqOnData.inputLowValues.empty()); if (fqOnData.addConverts) { - inputLowNode = ngraph::builder::makeConversion(inputLowNode, ov::element::f32, ov::test::utils::ConversionTypes::CONVERT); + inputLowNode = std::make_shared(inputLowNode, ov::element::f32); } inputHighNode = ngraph::builder::makeConstant( @@ -296,7 +296,7 @@ std::shared_ptr makeFakeQuantize( fqOnData.inputHighValues, fqOnData.inputHighValues.empty()); if (fqOnData.addConverts) { - inputHighNode = ngraph::builder::makeConversion(inputHighNode, ov::element::f32, ov::test::utils::ConversionTypes::CONVERT); + inputHighNode = std::make_shared(inputHighNode, ov::element::f32); } } @@ -308,7 +308,7 @@ std::shared_ptr makeFakeQuantize( fqOnData.outputLowValues, fqOnData.outputLowValues.empty()); if (fqOnData.addConverts) { - outputLowNode = ngraph::builder::makeConversion(outputLowNode, ov::element::f32, ov::test::utils::ConversionTypes::CONVERT); + outputLowNode = std::make_shared(outputLowNode, ov::element::f32); } auto outputHighNode = ngraph::builder::makeConstant( @@ -319,7 +319,7 @@ std::shared_ptr makeFakeQuantize( fqOnData.outputHighValues, fqOnData.outputHighValues.empty()); if (fqOnData.addConverts) { - outputHighNode = ngraph::builder::makeConversion(outputHighNode, ov::element::f32, ov::test::utils::ConversionTypes::CONVERT); + outputHighNode = std::make_shared(outputHighNode, ov::element::f32); } auto fq = std::make_shared(input, inputLowNode, inputHighNode, outputLowNode, outputHighNode, fqOnData.quantizationLevel); diff --git a/src/tests/ov_helpers/ov_models/include/ov_models/builders.hpp b/src/tests/ov_helpers/ov_models/include/ov_models/builders.hpp index affac2db94f..b17561a7350 100644 --- a/src/tests/ov_helpers/ov_models/include/ov_models/builders.hpp +++ b/src/tests/ov_helpers/ov_models/include/ov_models/builders.hpp @@ -428,6 +428,7 @@ std::shared_ptr makeReduce(const ov::Output& data, bool keepDims, ov::test::utils::ReductionType reductionType); +OPENVINO_DEPRECATED("This function is deprecated and will be removed soon.") std::shared_ptr makePooling(const ov::Output& in, const std::vector& strides, const std::vector& padsBegin, @@ -438,60 +439,16 @@ std::shared_ptr makePooling(const ov::Output& in, bool excludePad, const ov::test::utils::PoolingTypes& poolType); -std::shared_ptr makeMaxPoolingV8(const ov::Output& in, - const std::vector& strides, - const std::vector& dilation, - const std::vector& padsBegin, - const std::vector& padsEnd, - const std::vector& kernel, - const op::RoundingType& roundingType, - const op::PadType& padType, - const ov::element::Type& indexElementType, - const int64_t axis); - -std::shared_ptr makeROIPooling(const Output& input, - const Output& coords, - const Shape& output_size, - const float spatial_scale, - const ov::test::utils::ROIPoolingTypes& roi_pool_type); - -std::shared_ptr makeScatterUpdate(const ov::Output& in, - const element::Type& indicesType, - const std::vector& indicesShape, - const std::vector& indices, - const ov::Output& update, - int64_t axis); - -std::shared_ptr makeScatterElementsUpdate(const ov::Output& in, - const element::Type& indicesType, - const std::vector& indicesShape, - const std::vector& indices, - const ov::Output& update, - int axis); - -std::shared_ptr makeScatterNDUpdate(const ov::Output& in, - const element::Type& indicesType, - const std::vector& indicesShape, - const std::vector& indices, - const ov::Output& update); - std::shared_ptr makeComparison(const ov::Output& in0, const ov::Output& in1, ov::test::utils::ComparisonTypes comparisonType); -std::shared_ptr makeConversion(const ov::Output& in, - const element::Type& type, - const ov::test::utils::ConversionTypes& conversionType); - std::shared_ptr makeLogical(const ov::Output& in0, const ov::Output& in1, ov::test::utils::LogicalTypes logicalType); std::shared_ptr makeLogical(const ov::ParameterVector& inputs, ov::test::utils::LogicalTypes logicalType); -std::shared_ptr makeDetectionOutput(const ov::OutputVector& inputs, - const ov::op::v0::DetectionOutput::Attributes& attrs); - std::shared_ptr makeFullyConnected(const ov::Output& in, const element::Type& type, const size_t outputSize, @@ -500,8 +457,7 @@ std::shared_ptr makeFullyConnected(const ov::Output& in, const std::vector& weights = {}, const std::vector& biasWeights = {}); -std::shared_ptr makeConcat(const std::vector>& in, const int& axis); - +OPENVINO_DEPRECATED("This function is deprecated and will be removed soon.") std::shared_ptr makePad(const ov::Output& data, const std::vector& padsBegin, const std::vector& padsEnd, @@ -509,15 +465,6 @@ std::shared_ptr makePad(const ov::Output& data, ov::test::utils::PadMode padMode, const bool allow_negative_pad = false); -std::shared_ptr makePad(const ov::Output& in, - const ov::Output& beginNode, - const ov::Output& endNode, - const ov::Output& valueNode, - ov::test::utils::PadMode padMode, - const bool allow_negative_pad = false); - -std::shared_ptr makeBatchNormInference(const ov::Output& data, double epsilon); - std::shared_ptr makeLSTM( const OutputVector& in, const std::vector& constants, diff --git a/src/tests/ov_helpers/ov_models/src/batch_norm.cpp b/src/tests/ov_helpers/ov_models/src/batch_norm.cpp deleted file mode 100644 index 82f36800674..00000000000 --- a/src/tests/ov_helpers/ov_models/src/batch_norm.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "openvino/op/batch_norm.hpp" - -#include -#include - -#include "ov_models/builders.hpp" - -namespace ngraph { -namespace builder { -std::shared_ptr makeBatchNormInference(const ov::Output& data, double epsilon) { - auto ngPrc = data.get_element_type(); - size_t C = data.get_shape().at(1); - bool random = true; - std::vector values(C); - auto gamma = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, random, 1.f, 0.f); - auto beta = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, random, 1.f, 0.f); - auto mean = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, random, 1.f, 0.f); - - // Fill the vector for variance with positive values - std::default_random_engine gen; - std::uniform_real_distribution dis(0.0, 10.0); - std::generate(values.begin(), values.end(), [&dis, &gen]() { - return dis(gen); - }); - auto variance = ngraph::builder::makeConstant(ngPrc, ov::Shape{C}, values, !random); - return std::make_shared(data, gamma, beta, mean, variance, epsilon); -} -} // namespace builder -} // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/concat.cpp b/src/tests/ov_helpers/ov_models/src/concat.cpp deleted file mode 100644 index 2913ac21134..00000000000 --- a/src/tests/ov_helpers/ov_models/src/concat.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "openvino/op/concat.hpp" - -#include -#include - -#include "ov_models/builders.hpp" - -namespace ngraph { -namespace builder { - -std::shared_ptr makeConcat(const std::vector>& in, const int& axis) { - return std::make_shared(in, axis); -} - -} // namespace builder -} // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/conversion.cpp b/src/tests/ov_helpers/ov_models/src/conversion.cpp deleted file mode 100644 index 31f20695e69..00000000000 --- a/src/tests/ov_helpers/ov_models/src/conversion.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include - -#include "common_test_utils/test_enums.hpp" -#include "openvino/core/node.hpp" -#include "openvino/op/constant.hpp" -#include "openvino/op/convert.hpp" -#include "openvino/op/convert_like.hpp" - -namespace ngraph { -namespace builder { - -std::shared_ptr makeConversion(const ov::Output& in, - const element::Type& output_type, - const ov::test::utils::ConversionTypes& conversionType) { - if (conversionType == ov::test::utils::ConversionTypes::CONVERT) { - return std::make_shared(in, output_type); - } else if (conversionType == ov::test::utils::ConversionTypes::CONVERT_LIKE) { - const auto like = std::make_shared(output_type, ov::Shape{1}); - return std::make_shared(in, like); - } else { - throw std::runtime_error("Incorrect type of Conversion operation"); - } -} - -} // namespace builder -} // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/detection_output.cpp b/src/tests/ov_helpers/ov_models/src/detection_output.cpp deleted file mode 100644 index 266c8ae2dd6..00000000000 --- a/src/tests/ov_helpers/ov_models/src/detection_output.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "ov_models/builders.hpp" - -namespace ngraph { -namespace builder { - -std::shared_ptr makeDetectionOutput(const ov::OutputVector& inputs, - const ov::op::v0::DetectionOutput::Attributes& attrs) { - if (inputs.size() == 3) - return std::make_shared(inputs[0], inputs[1], inputs[2], attrs); - else if (inputs.size() == 5) - return std::make_shared(inputs[0], - inputs[1], - inputs[2], - inputs[3], - inputs[4], - attrs); - else - throw std::runtime_error("DetectionOutput layer supports only 3 or 5 inputs"); -} - -} // namespace builder -} // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/pad.cpp b/src/tests/ov_helpers/ov_models/src/pad.cpp index 6a4791ca846..ddb226d130e 100644 --- a/src/tests/ov_helpers/ov_models/src/pad.cpp +++ b/src/tests/ov_helpers/ov_models/src/pad.cpp @@ -46,44 +46,5 @@ std::shared_ptr makePad(const ov::Output& data, return std::make_shared(data, pads_begin, pads_end, arg_pad_value, pad_mode); } } - -std::shared_ptr makePad(const ov::Output& in, - const ov::Output& beginNode, - const ov::Output& endNode, - const ov::Output& valueNode, - ov::test::utils::PadMode padMode, - const bool allow_negative_pad) { - ov::op::PadMode pad_mode; - switch (padMode) { - case ov::test::utils::PadMode::CONSTANT: - pad_mode = ov::op::PadMode::CONSTANT; - break; - case ov::test::utils::PadMode::EDGE: - pad_mode = ov::op::PadMode::EDGE; - break; - case ov::test::utils::PadMode::REFLECT: - pad_mode = ov::op::PadMode::REFLECT; - break; - case ov::test::utils::PadMode::SYMMETRIC: - pad_mode = ov::op::PadMode::SYMMETRIC; - break; - default: - throw std::runtime_error("Can't create layer for this pad mode"); - } - if (valueNode.get_node_shared_ptr() == nullptr) { - if (allow_negative_pad) { - return std::make_shared(in, beginNode, endNode, pad_mode); - } else { - return std::make_shared(in, beginNode, endNode, pad_mode); - } - } else { - if (allow_negative_pad) { - return std::make_shared(in, beginNode, endNode, valueNode, pad_mode); - } else { - return std::make_shared(in, beginNode, endNode, valueNode, pad_mode); - } - } -} - } // namespace builder } // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/pooling.cpp b/src/tests/ov_helpers/ov_models/src/pooling.cpp index 7ba26974a32..fe1ca80c960 100644 --- a/src/tests/ov_helpers/ov_models/src/pooling.cpp +++ b/src/tests/ov_helpers/ov_models/src/pooling.cpp @@ -40,29 +40,5 @@ std::shared_ptr makePooling(const ov::Output& in, } return pooling; } - -std::shared_ptr makeMaxPoolingV8(const ov::Output& in, - const std::vector& strides, - const std::vector& dilation, - const std::vector& padsBegin, - const std::vector& padsEnd, - const std::vector& kernel, - const op::RoundingType& roundingType, - const op::PadType& padType, - const ov::element::Type& indexElementType, - const int64_t axis) { - std::shared_ptr pooling = std::make_shared(in, - strides, - dilation, - padsBegin, - padsEnd, - kernel, - roundingType, - padType, - indexElementType, - axis); - return pooling; -} - } // namespace builder } // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/roi_pooling.cpp b/src/tests/ov_helpers/ov_models/src/roi_pooling.cpp deleted file mode 100644 index 07b428aed2b..00000000000 --- a/src/tests/ov_helpers/ov_models/src/roi_pooling.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "openvino/op/roi_pooling.hpp" - -#include -#include - -#include "common_test_utils/test_enums.hpp" -#include "openvino/core/node.hpp" - -namespace ngraph { -namespace builder { - -std::shared_ptr makeROIPooling(const ov::Output& input, - const ov::Output& coords, - const ov::Shape& output_size, - const float spatial_scale, - const ov::test::utils::ROIPoolingTypes& roi_pool_type) { - switch (roi_pool_type) { - case ov::test::utils::ROIPoolingTypes::ROI_MAX: - return std::make_shared(input, coords, output_size, spatial_scale, "max"); - case ov::test::utils::ROIPoolingTypes::ROI_BILINEAR: - return std::make_shared(input, coords, output_size, spatial_scale, "bilinear"); - default: - throw std::runtime_error("Incorrect type of ROIPooling operation"); - } -} - -} // namespace builder -} // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/scatter_ND_update.cpp b/src/tests/ov_helpers/ov_models/src/scatter_ND_update.cpp deleted file mode 100644 index 4d66dfbe348..00000000000 --- a/src/tests/ov_helpers/ov_models/src/scatter_ND_update.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "openvino/op/scatter_nd_update.hpp" - -#include - -#include "openvino/core/node.hpp" -#include "openvino/core/node_output.hpp" -#include "openvino/op/constant.hpp" - -namespace ngraph { -namespace builder { - -std::shared_ptr makeScatterNDUpdate(const ov::Output& in, - const ov::element::Type& indicesType, - const std::vector& indicesShape, - const std::vector& indices, - const ov::Output& update) { - auto indicesNode = std::make_shared(indicesType, indicesShape, indices); - auto dtsNode = std::make_shared(in, indicesNode, update); - return dtsNode; -} - -} // namespace builder -} // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/scatter_elements_update.cpp b/src/tests/ov_helpers/ov_models/src/scatter_elements_update.cpp deleted file mode 100644 index 72a086d8308..00000000000 --- a/src/tests/ov_helpers/ov_models/src/scatter_elements_update.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "openvino/op/scatter_elements_update.hpp" - -#include "openvino/op/constant.hpp" -#include "ov_models/builders.hpp" - -namespace ngraph { -namespace builder { - -std::shared_ptr makeScatterElementsUpdate(const ov::Output& in, - const element::Type& indicesType, - const std::vector& indicesShape, - const std::vector& indices, - const ov::Output& update, - int axis) { - auto indicesNode = std::make_shared(indicesType, indicesShape, indices); - auto axis_node = - std::make_shared(ov::element::Type_t::i32, ov::Shape{}, std::vector{axis}); - auto dtsNode = std::make_shared(in, indicesNode, update, axis_node); - return dtsNode; -} - -} // namespace builder -} // namespace ngraph diff --git a/src/tests/ov_helpers/ov_models/src/scatter_update.cpp b/src/tests/ov_helpers/ov_models/src/scatter_update.cpp deleted file mode 100644 index 99be0524755..00000000000 --- a/src/tests/ov_helpers/ov_models/src/scatter_update.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2018-2023 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "openvino/op/scatter_update.hpp" - -#include "openvino/op/constant.hpp" -#include "ov_models/builders.hpp" - -namespace ngraph { -namespace builder { - -std::shared_ptr makeScatterUpdate(const ov::Output& in, - const element::Type& indicesType, - const std::vector& indicesShape, - const std::vector& indices, - const ov::Output& update, - int64_t axis) { - auto indicesNode = std::make_shared(indicesType, indicesShape, indices); - auto axis_node = - std::make_shared(ov::element::Type_t::i64, ov::Shape{}, std::vector{axis}); - auto dtsNode = std::make_shared(in, indicesNode, update, axis_node); - return dtsNode; -} - -} // namespace builder -} // namespace ngraph