diff --git a/src/plugins/template/src/itt.hpp b/src/plugins/template/src/itt.hpp index d8153bcff90ab6..a48f85ef747165 100644 --- a/src/plugins/template/src/itt.hpp +++ b/src/plugins/template/src/itt.hpp @@ -9,7 +9,7 @@ #pragma once -#include +#include "openvino/itt.hpp" namespace ov { namespace template_plugin { diff --git a/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp b/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp index 10583280efd619..96ac6fd261717f 100644 --- a/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp +++ b/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/batch_to_space.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset2.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -47,7 +48,7 @@ class ReferenceBatchToSpaceLayerTest : public testing::TestWithParam& obj) { - auto param = obj.param; + const auto& param = obj.param; std::ostringstream result; result << "dType=" << param.dataTensor.type; result << "_dShape=" << param.dataTensor.shape; @@ -69,11 +70,11 @@ class ReferenceBatchToSpaceLayerTest : public testing::TestWithParam CreateFunction(const BatchToSpaceParams& params) { - const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto blockShape = std::make_shared(element::i64, params.blockShapeTensor.shape); - const auto cropsBegin = std::make_shared(element::i64, params.cropsBeginTensor.shape); - const auto cropsEnd = std::make_shared(element::i64, params.cropsEndTensor.shape); - const auto batchToSpace = std::make_shared(data, blockShape, cropsBegin, cropsEnd); + const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto blockShape = std::make_shared(element::i64, params.blockShapeTensor.shape); + const auto cropsBegin = std::make_shared(element::i64, params.cropsBeginTensor.shape); + const auto cropsEnd = std::make_shared(element::i64, params.cropsEndTensor.shape); + const auto batchToSpace = std::make_shared(data, blockShape, cropsBegin, cropsEnd); return std::make_shared(NodeVector{batchToSpace}, ParameterVector{data, blockShape, cropsBegin, cropsEnd}); } diff --git a/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp b/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp index 1917163d832f4e..6b6089911a197c 100644 --- a/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp +++ b/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp @@ -7,7 +7,7 @@ #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset8.hpp" +#include "openvino/op/constant.hpp" using namespace reference_tests; using namespace ov; @@ -95,7 +95,7 @@ class ReferenceBinaryConvolutionLayerTest : public testing::TestWithParam& filterData) { const op::PadType auto_pad{op::PadType::EXPLICIT}; const auto in = std::make_shared(params.inType, params.inputShape); - auto filter = std::make_shared(ov::element::u1, params.filterShape, &filterData[0]); + auto filter = std::make_shared(ov::element::u1, params.filterShape, &filterData[0]); const auto BinaryConvolution = std::make_shared(in, filter, params.strides, diff --git a/src/plugins/template/tests/functional/op_reference/broadcast.cpp b/src/plugins/template/tests/functional/op_reference/broadcast.cpp index 5cb9712c8b2b2d..415116a39af6cf 100644 --- a/src/plugins/template/tests/functional/op_reference/broadcast.cpp +++ b/src/plugins/template/tests/functional/op_reference/broadcast.cpp @@ -2,11 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/broadcast.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset3.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" +#include "openvino/op/reverse.hpp" using namespace reference_tests; using namespace ov; @@ -56,10 +59,10 @@ class ReferenceBroadcastTest : public testing::TestWithParam, p private: static std::shared_ptr CreateFunction(const BroadcastParams& params) { - const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); const auto f = std::make_shared( - std::make_shared(A, - opset1::Constant::create(params.targetShapeTensor.type, + std::make_shared(A, + op::v0::Constant::create(params.targetShapeTensor.type, params.targetShapeTensor.shape, params.targetShapeTensor.data.data())), ParameterVector{A}); @@ -74,10 +77,10 @@ TEST_P(ReferenceBroadcastTest, CompareWithRefs) { class ReferenceBroadcastTestV3 : public ReferenceBroadcastTest { private: static std::shared_ptr CreateFunction(const BroadcastParams& params) { - const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); const auto f = std::make_shared( - std::make_shared(A, - opset1::Constant::create(params.targetShapeTensor.type, + std::make_shared(A, + op::v0::Constant::create(params.targetShapeTensor.type, params.targetShapeTensor.shape, params.targetShapeTensor.data.data())), ParameterVector{A}); @@ -132,13 +135,13 @@ class ReferenceBroadcastTestExplicitAxis : public testing::TestWithParam CreateFunction(const BroadcastParamsExplicitAxis& params) { - const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); const auto f = std::make_shared( - std::make_shared(A, - opset1::Constant::create(params.targetShapeTensor.type, + std::make_shared(A, + op::v0::Constant::create(params.targetShapeTensor.type, params.targetShapeTensor.shape, params.targetShapeTensor.data.data()), - opset1::Constant::create(params.axesMappingTensor.type, + op::v0::Constant::create(params.axesMappingTensor.type, params.axesMappingTensor.shape, params.axesMappingTensor.data.data())), ParameterVector{A}); @@ -203,15 +206,15 @@ class ReferenceBroadcastTestTestHelper : public testing::TestWithParam CreateFunction(const BroadcastParamsTestHelper& params) { - const auto A = std::make_shared(element::f32, params.shapeA); - const auto shape_const = opset1::Constant::create(element::u64, Shape{params.shapeR.size()}, params.shapeR); + const auto A = std::make_shared(element::f32, params.shapeA); + const auto shape_const = op::v0::Constant::create(element::u64, Shape{params.shapeR.size()}, params.shapeR); std::shared_ptr broadcast; if (params.axes.size() > 0) { auto axes_const = - opset1::Constant::create(element::i64, Shape{params.axes.size()}, params.axes.to_vector()); - broadcast = std::make_shared(A, shape_const, axes_const); + op::v0::Constant::create(element::i64, Shape{params.axes.size()}, params.axes.to_vector()); + broadcast = std::make_shared(A, shape_const, axes_const); } else { - broadcast = std::make_shared(A, shape_const); + broadcast = std::make_shared(A, shape_const); } auto f = std::make_shared(broadcast, ParameterVector{A}); return f; @@ -239,18 +242,18 @@ TEST_P(ReferenceBroadcastTestTestHelper, CompareWithRefs) { class ReferenceBroadcastTestExplicitAxisReversed : public ReferenceBroadcastTestExplicitAxis { private: static std::shared_ptr CreateFunction(const BroadcastParamsExplicitAxis& params) { - const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto A = std::make_shared(params.dataTensor.type, params.dataTensor.shape); auto broadcast = - std::make_shared(A, - opset1::Constant::create(params.targetShapeTensor.type, + std::make_shared(A, + op::v0::Constant::create(params.targetShapeTensor.type, params.targetShapeTensor.shape, params.targetShapeTensor.data.data()), - opset1::Constant::create(params.axesMappingTensor.type, + op::v0::Constant::create(params.axesMappingTensor.type, params.axesMappingTensor.shape, params.axesMappingTensor.data.data())); - auto reverse = std::make_shared(broadcast, - opset1::Constant::create(element::i64, {1}, {1}), - opset1::Reverse::Mode::INDEX); + auto reverse = std::make_shared(broadcast, + op::v0::Constant::create(element::i64, {1}, {1}), + op::v1::Reverse::Mode::INDEX); auto f = std::make_shared(NodeVector{reverse}, ParameterVector{A}); return f; } diff --git a/src/plugins/template/tests/functional/op_reference/concat.cpp b/src/plugins/template/tests/functional/op_reference/concat.cpp index b11a3d1e4a4658..da3a141b160a18 100644 --- a/src/plugins/template/tests/functional/op_reference/concat.cpp +++ b/src/plugins/template/tests/functional/op_reference/concat.cpp @@ -2,10 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/concat.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" +#include "openvino/op/add.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" +#include "openvino/op/subtract.hpp" using namespace reference_tests; using namespace ov; @@ -68,17 +73,17 @@ class ReferenceConcatTest : public testing::TestWithParam, public private: static std::shared_ptr CreateFunction(const ConcatParams& params) { - std::shared_ptr A, B, C; + std::shared_ptr A, B, C; if (params.dynamicShape.is_dynamic()) { - A = std::make_shared(params.A.type, params.dynamicShape); - B = std::make_shared(params.B.type, params.dynamicShape); - C = std::make_shared(params.C.type, params.dynamicShape); + A = std::make_shared(params.A.type, params.dynamicShape); + B = std::make_shared(params.B.type, params.dynamicShape); + C = std::make_shared(params.C.type, params.dynamicShape); } else { - A = std::make_shared(params.A.type, params.A.shape); - B = std::make_shared(params.B.type, params.B.shape); - C = std::make_shared(params.C.type, params.C.shape); + A = std::make_shared(params.A.type, params.A.shape); + B = std::make_shared(params.B.type, params.B.shape); + C = std::make_shared(params.C.type, params.C.shape); } - auto f = std::make_shared(std::make_shared(NodeVector{A, B, C}, params.axis), + auto f = std::make_shared(std::make_shared(NodeVector{A, B, C}, params.axis), ParameterVector{A, B, C}); return f; } @@ -190,11 +195,11 @@ class ReferenceConcatTestVectorLarge : public testing::TestWithParam(element::f32, shape_a); + auto A = std::make_shared(element::f32, shape_a); inputs_param.push_back(A); inputs.push_back(A); } - function = std::make_shared(std::make_shared(inputs, 0), inputs_param); + function = std::make_shared(std::make_shared(inputs, 0), inputs_param); std::vector ref_result; for (uint32_t i = 0; i < params.numInputs; i++) { @@ -309,15 +314,15 @@ class ReferenceConcatTestInPlace2dTensor : public testing::TestWithParam CreateFunction(const ConcatParamsInPlace2dTensor& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto add1 = std::make_shared(A, B); - const auto C = std::make_shared(params.C.type, params.C.shape); - const auto D = std::make_shared(params.D.type, params.D.shape); - const auto add2 = std::make_shared(C, D); - const auto subtract = std::make_shared(C, A); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto add1 = std::make_shared(A, B); + const auto C = std::make_shared(params.C.type, params.C.shape); + const auto D = std::make_shared(params.D.type, params.D.shape); + const auto add2 = std::make_shared(C, D); + const auto subtract = std::make_shared(C, A); const auto f = - std::make_shared(std::make_shared(NodeVector{add1, add2, subtract}, params.axis), + std::make_shared(std::make_shared(NodeVector{add1, add2, subtract}, params.axis), ParameterVector{A, B, C, D}); return f; } @@ -426,16 +431,16 @@ class ReferenceConcatTestInPlacePropagate2dTensor : public testing::TestWithPara private: static std::shared_ptr CreateFunction(const ConcatParamsInPlacePropagate2dTensor& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto add1 = std::make_shared(A, B); - const auto C = std::make_shared(params.C.type, params.C.shape); - const auto D = std::make_shared(params.D.type, params.D.shape); - const auto add2 = std::make_shared(C, D); - const auto concat1 = std::make_shared(NodeVector{add1, add2}, params.axis); - const auto subtract = std::make_shared(C, A); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto add1 = std::make_shared(A, B); + const auto C = std::make_shared(params.C.type, params.C.shape); + const auto D = std::make_shared(params.D.type, params.D.shape); + const auto add2 = std::make_shared(C, D); + const auto concat1 = std::make_shared(NodeVector{add1, add2}, params.axis); + const auto subtract = std::make_shared(C, A); const auto f = - std::make_shared(std::make_shared(NodeVector{concat1, subtract}, params.axis), + std::make_shared(std::make_shared(NodeVector{concat1, subtract}, params.axis), ParameterVector{A, B, C, D}); return f; } @@ -534,12 +539,12 @@ class ReferenceConcatTestInPlaceTree1 : public testing::TestWithParam CreateFunction(const ConcatParamsInPlaceTree1& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto add1 = std::make_shared(A, B); - const auto add2 = std::make_shared(A, B); - const auto concat = std::make_shared(NodeVector{add1, add2}, params.axis); - const auto f = std::make_shared(std::make_shared(concat, concat), ParameterVector{A, B}); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto add1 = std::make_shared(A, B); + const auto add2 = std::make_shared(A, B); + const auto concat = std::make_shared(NodeVector{add1, add2}, params.axis); + const auto f = std::make_shared(std::make_shared(concat, concat), ParameterVector{A, B}); return f; } }; @@ -635,15 +640,15 @@ class ReferenceConcatTestInPlaceTree2 : public testing::TestWithParam CreateFunction(const ConcatParamsInPlaceTree2& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto add1 = std::make_shared(A, B); - const auto add2 = std::make_shared(A, B); - const auto concat1 = std::make_shared(NodeVector{add1, add2}, params.axis); - const auto concat2 = std::make_shared(NodeVector{add1, add2}, params.axis); - const auto concat12 = std::make_shared(NodeVector{concat1, concat2}, params.axis); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto add1 = std::make_shared(A, B); + const auto add2 = std::make_shared(A, B); + const auto concat1 = std::make_shared(NodeVector{add1, add2}, params.axis); + const auto concat2 = std::make_shared(NodeVector{add1, add2}, params.axis); + const auto concat12 = std::make_shared(NodeVector{concat1, concat2}, params.axis); const auto f = - std::make_shared(std::make_shared(concat12, concat12), ParameterVector{A, B}); + std::make_shared(std::make_shared(concat12, concat12), ParameterVector{A, B}); return f; } }; @@ -740,17 +745,17 @@ class ReferenceConcatTestInPlaceTree3 : public testing::TestWithParam CreateFunction(const ConcatParamsInPlaceTree3& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto concat1 = std::make_shared(NodeVector{A, B}, params.axis); - const auto concat2 = std::make_shared(NodeVector{A, B}, params.axis); - const auto concat3 = std::make_shared(NodeVector{A, B}, params.axis); - const auto concat4 = std::make_shared(NodeVector{A, B}, params.axis); - const auto concat12 = std::make_shared(NodeVector{concat1, concat2}, params.axis); - const auto concat34 = std::make_shared(NodeVector{concat3, concat4}, params.axis); - const auto concat14 = std::make_shared(NodeVector{concat12, concat34}, params.axis); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto concat1 = std::make_shared(NodeVector{A, B}, params.axis); + const auto concat2 = std::make_shared(NodeVector{A, B}, params.axis); + const auto concat3 = std::make_shared(NodeVector{A, B}, params.axis); + const auto concat4 = std::make_shared(NodeVector{A, B}, params.axis); + const auto concat12 = std::make_shared(NodeVector{concat1, concat2}, params.axis); + const auto concat34 = std::make_shared(NodeVector{concat3, concat4}, params.axis); + const auto concat14 = std::make_shared(NodeVector{concat12, concat34}, params.axis); const auto f = - std::make_shared(std::make_shared(concat14, concat14), ParameterVector{A, B}); + std::make_shared(std::make_shared(concat14, concat14), ParameterVector{A, B}); return f; } }; @@ -848,12 +853,12 @@ class ReferenceConcatTestInPlaceAddConcat : public testing::TestWithParam CreateFunction(const ConcatParamsInPlaceAddConcat& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto add1 = std::make_shared(A, B); - const auto add2 = std::make_shared(add1, add1); - const auto concat = std::make_shared(NodeVector{add1, add2}, params.axis); - const auto add3 = std::make_shared(concat, concat); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto add1 = std::make_shared(A, B); + const auto add2 = std::make_shared(add1, add1); + const auto concat = std::make_shared(NodeVector{add1, add2}, params.axis); + const auto add3 = std::make_shared(concat, concat); const auto f = std::make_shared(add3, ParameterVector{A, B}); return f; } @@ -950,16 +955,16 @@ class ReferenceConcatTestInPlaceAddConcat2 : public testing::TestWithParam CreateFunction(const ConcatParamsInPlaceAddConcat2& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto add1 = std::make_shared(A, B); - const auto add2 = std::make_shared(A, B); - const auto add3 = std::make_shared(A, B); - const auto add4 = std::make_shared(A, B); - const auto add5 = std::make_shared(A, B); - const auto concat1 = std::make_shared(NodeVector{add1, add2, add3}, params.axis); - const auto concat2 = std::make_shared(NodeVector{add4, add2, add5}, params.axis); - const auto add6 = std::make_shared(concat1, concat2); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto add1 = std::make_shared(A, B); + const auto add2 = std::make_shared(A, B); + const auto add3 = std::make_shared(A, B); + const auto add4 = std::make_shared(A, B); + const auto add5 = std::make_shared(A, B); + const auto concat1 = std::make_shared(NodeVector{add1, add2, add3}, params.axis); + const auto concat2 = std::make_shared(NodeVector{add4, add2, add5}, params.axis); + const auto add6 = std::make_shared(concat1, concat2); const auto f = std::make_shared(add6, ParameterVector{A, B}); return f; } @@ -1061,10 +1066,10 @@ class ReferenceConcatTest5d : public testing::TestWithParam, pub private: static std::shared_ptr CreateFunction(const ConcatParams5d& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto C = std::make_shared(params.C.type, params.C.shape); - const auto concat = std::make_shared(NodeVector{A, B, C}, params.axis); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto C = std::make_shared(params.C.type, params.C.shape); + const auto concat = std::make_shared(NodeVector{A, B, C}, params.axis); const auto f = std::make_shared(concat, ParameterVector{A, B, C}); return f; } @@ -1210,9 +1215,9 @@ class ReferenceConcatTestZeroLength1dLast : public testing::TestWithParam CreateFunction(const ConcatParamsZeroLength1dLast& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto concat = std::make_shared(NodeVector{A, B}, params.axis); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto concat = std::make_shared(NodeVector{A, B}, params.axis); const auto f = std::make_shared(concat, ParameterVector{A, B}); return f; } @@ -1314,10 +1319,10 @@ class ReferenceConcatTestZeroLength1dMiddle : public testing::TestWithParam CreateFunction(const ConcatParamsZeroLength1dMiddle& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto C = std::make_shared(params.C.type, params.C.shape); - const auto concat = std::make_shared(NodeVector{A, B, C}, params.axis); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto C = std::make_shared(params.C.type, params.C.shape); + const auto concat = std::make_shared(NodeVector{A, B, C}, params.axis); const auto f = std::make_shared(concat, ParameterVector{A, B, C}); return f; } @@ -1409,8 +1414,8 @@ class ReferenceConcatTestZeroZero : public testing::TestWithParam CreateFunction(const ConcatParamsZeroZero& params) { - const auto constant_1 = std::make_shared(params.A.type, params.A.shape, params.A.data.data()); - const auto concat_1 = std::make_shared(NodeVector{constant_1, constant_1}, params.axis); + const auto constant_1 = std::make_shared(params.A.type, params.A.shape, params.A.data.data()); + const auto concat_1 = std::make_shared(NodeVector{constant_1, constant_1}, params.axis); const auto f = std::make_shared(concat_1, ParameterVector{}); return f; } @@ -1511,10 +1516,10 @@ class ReferenceConcatTestZeroLength4dMiddle : public testing::TestWithParam CreateFunction(const ConcatParamsZeroLength4dMiddle& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto C = std::make_shared(params.C.type, params.C.shape); - const auto concat = std::make_shared(NodeVector{A, B, C}, params.axis); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto C = std::make_shared(params.C.type, params.C.shape); + const auto concat = std::make_shared(NodeVector{A, B, C}, params.axis); const auto f = std::make_shared(concat, ParameterVector{A, B, C}); return f; } diff --git a/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp b/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp index 844fdeb116344c..2e9747596965b6 100644 --- a/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp +++ b/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp @@ -4,13 +4,13 @@ #include -#include -#include -#include #include #include "base_reference_test.hpp" #include "functional_test_utils/skip_tests_config.hpp" +#include "openvino/core/model.hpp" +#include "openvino/op/i420_to_bgr.hpp" +#include "openvino/op/i420_to_rgb.hpp" using namespace ov; using namespace InferenceEngine; diff --git a/src/plugins/template/tests/functional/op_reference/convert_color_nv12.cpp b/src/plugins/template/tests/functional/op_reference/convert_color_nv12.cpp index 26d9c31bae3f1e..77781766478765 100644 --- a/src/plugins/template/tests/functional/op_reference/convert_color_nv12.cpp +++ b/src/plugins/template/tests/functional/op_reference/convert_color_nv12.cpp @@ -4,13 +4,13 @@ #include -#include -#include -#include #include #include "base_reference_test.hpp" #include "functional_test_utils/skip_tests_config.hpp" +#include "openvino/core/model.hpp" +#include "openvino/op/nv12_to_bgr.hpp" +#include "openvino/op/nv12_to_rgb.hpp" using namespace ov; using namespace InferenceEngine; diff --git a/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp b/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp index 858c5d287f4206..36f3e46b8d38ad 100644 --- a/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp +++ b/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/deformable_psroi_pooling.hpp" + #include #include #include "base_reference_test.hpp" #include "openvino/op/psroi_pooling.hpp" -#include "openvino/opsets/opset1.hpp" using namespace reference_tests; using namespace ov; @@ -186,7 +187,7 @@ class ReferenceDeformablePSROIPoolingLayerTest : public testing::TestWithParam(params.roisType, params.roisShape); if (params.offsetsShape.size() != 0) { const auto offsets = std::make_shared(params.offsetsType, params.offsetsShape); - const auto DeformablePSROIPooling = std::make_shared(input, + const auto DeformablePSROIPooling = std::make_shared(input, rois, offsets, params.outputDim, @@ -200,7 +201,7 @@ class ReferenceDeformablePSROIPoolingLayerTest : public testing::TestWithParam(NodeVector{DeformablePSROIPooling}, ParameterVector{input, rois, offsets}); } else { - const auto DeformablePSROIPooling = std::make_shared(input, + const auto DeformablePSROIPooling = std::make_shared(input, rois, params.outputDim, params.spatialScale, diff --git a/src/plugins/template/tests/functional/op_reference/depth_to_space.cpp b/src/plugins/template/tests/functional/op_reference/depth_to_space.cpp index 6f683ed5452765..83c91f93f92a11 100644 --- a/src/plugins/template/tests/functional/op_reference/depth_to_space.cpp +++ b/src/plugins/template/tests/functional/op_reference/depth_to_space.cpp @@ -2,10 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/depth_to_space.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -56,11 +58,10 @@ class ReferenceDepthToSpaceLayerTest : public testing::TestWithParam CreateFunction(const DepthToSpaceParams& params) { - opset1::DepthToSpace::DepthToSpaceMode mode = params.mode == "DEPTH_FIRST" - ? opset1::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST - : opset1::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST; - const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto depthToSpace = std::make_shared(data, mode, params.blockSize); + const auto mode = params.mode == "DEPTH_FIRST" ? op::v0::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST + : op::v0::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST; + const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto depthToSpace = std::make_shared(data, mode, params.blockSize); return std::make_shared(NodeVector{depthToSpace}, ParameterVector{data}); } }; diff --git a/src/plugins/template/tests/functional/op_reference/einsum.cpp b/src/plugins/template/tests/functional/op_reference/einsum.cpp index 400fdc445c5387..e01dc16293e17e 100644 --- a/src/plugins/template/tests/functional/op_reference/einsum.cpp +++ b/src/plugins/template/tests/functional/op_reference/einsum.cpp @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/einsum.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset7.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -56,11 +57,11 @@ class ReferenceEinsumTest : public testing::TestWithParam, public OutputVector output_vector; ParameterVector param_vector; for (const auto& input_tensor : params.inputs) { - auto param = std::make_shared(input_tensor.type, input_tensor.shape); + auto param = std::make_shared(input_tensor.type, input_tensor.shape); output_vector.push_back(param); param_vector.push_back(param); } - const auto einsum = std::make_shared(output_vector, params.equation); + const auto einsum = std::make_shared(output_vector, params.equation); const auto f = std::make_shared(OutputVector{einsum}, param_vector); return f; } diff --git a/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp b/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp index d308d2c2a5d69f..4726ccdffd6a51 100644 --- a/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp @@ -4,9 +4,8 @@ #include -#include - #include "base_reference_test.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" using namespace reference_tests; using namespace ov; diff --git a/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp b/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp index f7e7bdcafaa7f0..9967e99b8e2317 100644 --- a/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp @@ -4,9 +4,8 @@ #include -#include - #include "base_reference_test.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" using namespace reference_tests; using namespace ov; diff --git a/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp b/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp index 80af12d4053c8f..ea9dfe34decb22 100644 --- a/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp @@ -4,9 +4,8 @@ #include -#include - #include "base_reference_test.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" using namespace reference_tests; using namespace ov; diff --git a/src/plugins/template/tests/functional/op_reference/extract_image_patches.cpp b/src/plugins/template/tests/functional/op_reference/extract_image_patches.cpp index 62fc41dbea9b2c..af82d7e3c74872 100644 --- a/src/plugins/template/tests/functional/op_reference/extract_image_patches.cpp +++ b/src/plugins/template/tests/functional/op_reference/extract_image_patches.cpp @@ -5,8 +5,8 @@ #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset3.hpp" +#include "openvino/op/extractimagepatches.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -61,8 +61,8 @@ class ReferenceExtractImagePatchesTest : public testing::TestWithParam CreateModel(const ExtractImagePatchesParams& params) { - const auto data = std::make_shared(params.data.type, params.data.shape); - const auto extrace_image_patches = std::make_shared(data, + const auto data = std::make_shared(params.data.type, params.data.shape); + const auto extrace_image_patches = std::make_shared(data, params.sizes, params.strides, params.rates, diff --git a/src/plugins/template/tests/functional/op_reference/gather.cpp b/src/plugins/template/tests/functional/op_reference/gather.cpp index 916cee50407836..99b1c82a8d91d8 100644 --- a/src/plugins/template/tests/functional/op_reference/gather.cpp +++ b/src/plugins/template/tests/functional/op_reference/gather.cpp @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/gather.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset7.hpp" -#include "openvino/opsets/opset8.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -62,11 +63,11 @@ class ReferenceGatherTest : public testing::TestWithParam, public private: static std::shared_ptr CreateFunction(const GatherParams& params) { - const auto P = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto I = std::make_shared(params.indicesTensor.type, params.indicesTensor.shape); + const auto P = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto I = std::make_shared(params.indicesTensor.type, params.indicesTensor.shape); const auto A = - opset1::Constant::create(params.axisTensor.type, params.axisTensor.shape, params.axisTensor.data.data()); - const auto G = std::make_shared(P, I, A); + op::v0::Constant::create(params.axisTensor.type, params.axisTensor.shape, params.axisTensor.data.data()); + const auto G = std::make_shared(P, I, A); const auto f = std::make_shared(G, ParameterVector{P, I}); return f; } @@ -129,11 +130,11 @@ class ReferenceGatherTestV7 : public testing::TestWithParam, pub private: static std::shared_ptr CreateFunction(const GatherParamsV7& params) { - const auto P = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto I = std::make_shared(params.indicesTensor.type, params.indicesTensor.shape); + const auto P = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto I = std::make_shared(params.indicesTensor.type, params.indicesTensor.shape); const auto A = - opset1::Constant::create(params.axisTensor.type, params.axisTensor.shape, params.axisTensor.data.data()); - const auto G = std::make_shared(P, I, A, params.batchDims); + op::v0::Constant::create(params.axisTensor.type, params.axisTensor.shape, params.axisTensor.data.data()); + const auto G = std::make_shared(P, I, A, params.batchDims); const auto f = std::make_shared(G, ParameterVector{P, I}); return f; } @@ -146,11 +147,11 @@ TEST_P(ReferenceGatherTestV7, CompareWithRefs) { class ReferenceGatherTestV8 : public ReferenceGatherTestV7 { private: static std::shared_ptr CreateFunction(const GatherParamsV7& params) { - const auto P = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto I = std::make_shared(params.indicesTensor.type, params.indicesTensor.shape); + const auto P = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto I = std::make_shared(params.indicesTensor.type, params.indicesTensor.shape); const auto A = - opset1::Constant::create(params.axisTensor.type, params.axisTensor.shape, params.axisTensor.data.data()); - const auto G = std::make_shared(P, I, A, params.batchDims); + op::v0::Constant::create(params.axisTensor.type, params.axisTensor.shape, params.axisTensor.data.data()); + const auto G = std::make_shared(P, I, A, params.batchDims); const auto f = std::make_shared(G, ParameterVector{P, I}); return f; } diff --git a/src/plugins/template/tests/functional/op_reference/gather_tree.cpp b/src/plugins/template/tests/functional/op_reference/gather_tree.cpp index 696820760e8fea..57a8b796431fc2 100644 --- a/src/plugins/template/tests/functional/op_reference/gather_tree.cpp +++ b/src/plugins/template/tests/functional/op_reference/gather_tree.cpp @@ -2,10 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/gather_tree.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -59,11 +61,11 @@ class ReferenceGatherTreeTest : public testing::TestWithParam, private: static std::shared_ptr CreateFunction(const GatherTreeParams& params) { - const auto step_ids = std::make_shared(params.stepIds.type, params.stepIds.shape); - const auto parent_idx = std::make_shared(params.parentIdx.type, params.parentIdx.shape); - const auto max_seq_len = std::make_shared(params.maxSeqLen.type, params.maxSeqLen.shape); - const auto end_token = std::make_shared(params.endToken.type, params.endToken.shape); - const auto gather_tree = std::make_shared(step_ids, parent_idx, max_seq_len, end_token); + const auto step_ids = std::make_shared(params.stepIds.type, params.stepIds.shape); + const auto parent_idx = std::make_shared(params.parentIdx.type, params.parentIdx.shape); + const auto max_seq_len = std::make_shared(params.maxSeqLen.type, params.maxSeqLen.shape); + const auto end_token = std::make_shared(params.endToken.type, params.endToken.shape); + const auto gather_tree = std::make_shared(step_ids, parent_idx, max_seq_len, end_token); const auto f = std::make_shared(gather_tree, ParameterVector{step_ids, parent_idx, max_seq_len, end_token}); return f; diff --git a/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp b/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp index 6cc21eb9cb4f04..b378fe18cc27cf 100644 --- a/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp +++ b/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp @@ -5,8 +5,8 @@ #include #include "base_reference_test.hpp" +#include "openvino/op/constant.hpp" #include "openvino/op/group_conv.hpp" -#include "openvino/opsets/opset8.hpp" using namespace reference_tests; using namespace ov; @@ -187,7 +187,7 @@ class ReferenceGroupConvolutionBackpropDataLayerOutShapeTest const auto in = std::make_shared(params.inType, params.inputShape); const auto filter = std::make_shared(params.inType, params.filterShape); - auto output_shape = std::make_shared(element::i64, + auto output_shape = std::make_shared(element::i64, params.constantOutputShape, params.constantOutputShapeData); const auto GroupConvolutionBackpropData = diff --git a/src/plugins/template/tests/functional/op_reference/if.cpp b/src/plugins/template/tests/functional/op_reference/if.cpp index 81b454c01484cf..eef66bb3e5ad61 100644 --- a/src/plugins/template/tests/functional/op_reference/if.cpp +++ b/src/plugins/template/tests/functional/op_reference/if.cpp @@ -5,11 +5,11 @@ #include #include -#include #include -#include #include "base_reference_test.hpp" +#include "ie_core.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" using namespace reference_tests; using namespace ov; diff --git a/src/plugins/template/tests/functional/op_reference/loop.cpp b/src/plugins/template/tests/functional/op_reference/loop.cpp index 7ff49b7173f9ab..ffdbc0b8dc6ee2 100644 --- a/src/plugins/template/tests/functional/op_reference/loop.cpp +++ b/src/plugins/template/tests/functional/op_reference/loop.cpp @@ -2,14 +2,19 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include "openvino/op/loop.hpp" -#include -#include +#include #include "base_reference_test.hpp" #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/skip_tests_config.hpp" +#include "openvino/core/model.hpp" +#include "openvino/op/add.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/multiply.hpp" +#include "openvino/op/parameter.hpp" +#include "openvino/op/result.hpp" namespace { enum LOOP_IN_TYPE { INVARIANT, MERGED }; @@ -30,36 +35,36 @@ struct LoopDynamicInputs : public LoopFunctionalBase { const int64_t& trip_count_value, const std::vector& loop_in_type, const ov::element::Type& net_type) override { - auto X = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto Y = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto M = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto X = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto Y = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto M = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto Xi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto Yi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto M_body = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto body_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); + auto Xi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto Yi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto M_body = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto body_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); - auto trip_count = std::make_shared(ov::element::i64, ov::Shape{1}, 3); - auto exec_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); + auto trip_count = std::make_shared(ov::element::i64, ov::Shape{1}, 3); + auto exec_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); // Body - auto sum = std::make_shared(Xi, Yi); - auto Zo = std::make_shared(sum, M_body); + auto sum = std::make_shared(Xi, Yi); + auto Zo = std::make_shared(sum, M_body); auto body = std::make_shared(ov::OutputVector{body_condition, Zo}, ov::ParameterVector{Xi, Yi, M_body}); - auto loop = std::make_shared(trip_count, exec_condition); + auto loop = std::make_shared(trip_count, exec_condition); loop->set_function(body); loop->set_invariant_input(Xi, X); loop->set_invariant_input(Yi, Y); loop->set_merged_input(M_body, M, Zo); - loop->set_special_body_ports(ov::opset8::Loop::SpecialBodyPorts{-1, 0}); + loop->set_special_body_ports(ov::op::v5::Loop::SpecialBodyPorts{-1, 0}); // Output is last Zo - auto result = std::make_shared(loop->get_iter_value(Zo, -1)); + auto result = std::make_shared(loop->get_iter_value(Zo, -1)); return std::make_shared(ov::ResultVector{result}, ov::ParameterVector{X, Y, M}); } }; @@ -131,7 +136,7 @@ struct LoopStaticInputs : public LoopFunctionalBase { const ov::element::Type& net_type) override { ov::ParameterVector loop_params; for (auto&& input : loop_inputs) { - loop_params.emplace_back(std::make_shared(input.type, input.shape)); + loop_params.emplace_back(std::make_shared(input.type, input.shape)); } // Set up the cell body, a function from (Xi, Yi) -> (Zo) @@ -139,26 +144,26 @@ struct LoopStaticInputs : public LoopFunctionalBase { const std::vector body_params_shapes(loop_inputs.size(), ov::PartialShape::dynamic()); ov::ParameterVector body_params; for (const auto& pshape : body_params_shapes) { - body_params.emplace_back(std::make_shared(net_type, pshape)); + body_params.emplace_back(std::make_shared(net_type, pshape)); } const auto body_condition_const = - std::make_shared(ov::element::boolean, ov::Shape{1}, true); - const auto exec_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); + std::make_shared(ov::element::boolean, ov::Shape{1}, true); + const auto exec_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); std::shared_ptr trip_count_input; - trip_count_input = std::make_shared(ov::element::i64, ov::Shape{1}, trip_count); + trip_count_input = std::make_shared(ov::element::i64, ov::Shape{1}, trip_count); // Body std::shared_ptr Zo = body_params[0]; for (size_t i = 1; i < body_params.size(); ++i) { - Zo = std::make_shared(body_params[i], Zo); + Zo = std::make_shared(body_params[i], Zo); } const auto body = std::make_shared(ov::OutputVector{body_condition_const, Zo}, body_params); - const auto loop = std::make_shared(trip_count_input, exec_condition); + const auto loop = std::make_shared(trip_count_input, exec_condition); loop->set_function(body); - loop->set_special_body_ports(ov::opset8::Loop::SpecialBodyPorts{-1, 0}); + loop->set_special_body_ports(ov::op::v5::Loop::SpecialBodyPorts{-1, 0}); for (size_t i = 0; i < body_params.size(); ++i) { if (loop_in_type[i] == LOOP_IN_TYPE::INVARIANT) { @@ -177,9 +182,9 @@ struct LoopStaticInputs : public LoopFunctionalBase { // start=0, stride=1, part_size=1, end=-1, axis=1 const auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 1); - const auto result0 = std::make_shared(out0); - const auto result1 = std::make_shared(out1); - const auto result2 = std::make_shared(out2); + const auto result0 = std::make_shared(out0); + const auto result1 = std::make_shared(out1); + const auto result2 = std::make_shared(out2); const auto function = std::make_shared(ov::ResultVector{result0, result1, result2}, loop_params, "loop"); return function; diff --git a/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp b/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp index 8df731e9f6f459..7b8686dcaf8c4b 100644 --- a/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp +++ b/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/lstm_cell.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset4.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -84,15 +85,15 @@ class ReferenceLSTMCellTest : public testing::TestWithParam, pub private: static std::shared_ptr CreateFunction(const LSTMCellParams& params) { - const auto X = std::make_shared(params.X.type, params.X.shape); - const auto W = std::make_shared(params.W.type, params.W.shape); - const auto R = std::make_shared(params.R.type, params.R.shape); - const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); - const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); + const auto X = std::make_shared(params.X.type, params.X.shape); + const auto W = std::make_shared(params.W.type, params.W.shape); + const auto R = std::make_shared(params.R.type, params.R.shape); + const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); + const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); const auto lstm_cell = - std::make_shared(X, + std::make_shared(X, H_t, C_t, op::util::convert_lstm_node_format(W, op::util::LSTMWeightsFormat::IOFC), @@ -117,15 +118,15 @@ class ReferenceLSTMCellTestBiasDefaultAttrs : public ReferenceLSTMCellTest { private: static std::shared_ptr CreateFunction(const LSTMCellParams& params) { - const auto X = std::make_shared(params.X.type, params.X.shape); - const auto W = std::make_shared(params.W.type, params.W.shape); - const auto R = std::make_shared(params.R.type, params.R.shape); - const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); - const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); + const auto X = std::make_shared(params.X.type, params.X.shape); + const auto W = std::make_shared(params.W.type, params.W.shape); + const auto R = std::make_shared(params.R.type, params.R.shape); + const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); + const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); const auto lstm_cell = - std::make_shared(X, + std::make_shared(X, H_t, C_t, op::util::convert_lstm_node_format(W, op::util::LSTMWeightsFormat::IOFC), @@ -152,14 +153,14 @@ class ReferenceLSTMCellTestBiasClip : public ReferenceLSTMCellTest { static std::shared_ptr CreateFunction(const LSTMCellParams& params) { const float clip_threshold = 3.5f; - const auto X = std::make_shared(params.X.type, params.X.shape); - const auto W = std::make_shared(params.W.type, params.W.shape); - const auto R = std::make_shared(params.R.type, params.R.shape); - const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); - const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); + const auto X = std::make_shared(params.X.type, params.X.shape); + const auto W = std::make_shared(params.W.type, params.W.shape); + const auto R = std::make_shared(params.R.type, params.R.shape); + const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); + const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); - const auto lstm_cell = std::make_shared(X, + const auto lstm_cell = std::make_shared(X, H_t, C_t, W, @@ -191,15 +192,15 @@ TEST_P(ReferenceLSTMCellTestBiasClip, CompareWithRefs) { class ReferenceLSTMCellV1Test : public ReferenceLSTMCellTest { private: static std::shared_ptr CreateFunction(const LSTMCellParams& params) { - const auto X = std::make_shared(params.X.type, params.X.shape); - const auto W = std::make_shared(params.W.type, params.W.shape); - const auto R = std::make_shared(params.R.type, params.R.shape); - const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); - const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); + const auto X = std::make_shared(params.X.type, params.X.shape); + const auto W = std::make_shared(params.W.type, params.W.shape); + const auto R = std::make_shared(params.R.type, params.R.shape); + const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); + const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); const auto lstm_cell = - std::make_shared(X, + std::make_shared(X, H_t, C_t, op::util::convert_lstm_node_format(W, op::util::LSTMWeightsFormat::IOFC), @@ -215,15 +216,15 @@ class ReferenceLSTMCellV1Test : public ReferenceLSTMCellTest { class ReferenceLSTMCellV1TestBiasDefaultAttrs : public ReferenceLSTMCellTestBiasDefaultAttrs { private: static std::shared_ptr CreateFunction(const LSTMCellParams& params) { - const auto X = std::make_shared(params.X.type, params.X.shape); - const auto W = std::make_shared(params.W.type, params.W.shape); - const auto R = std::make_shared(params.R.type, params.R.shape); - const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); - const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); + const auto X = std::make_shared(params.X.type, params.X.shape); + const auto W = std::make_shared(params.W.type, params.W.shape); + const auto R = std::make_shared(params.R.type, params.R.shape); + const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); + const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); const auto lstm_cell = - std::make_shared(X, + std::make_shared(X, H_t, C_t, op::util::convert_lstm_node_format(W, op::util::LSTMWeightsFormat::IOFC), @@ -256,15 +257,15 @@ class ReferenceLSTMCellV1TestBiasClip : public ReferenceLSTMCellTestBiasClip { static std::shared_ptr CreateFunction(const LSTMCellParams& params) { const float clip_threshold = 3.5f; - const auto X = std::make_shared(params.X.type, params.X.shape); - const auto W = std::make_shared(params.W.type, params.W.shape); - const auto R = std::make_shared(params.R.type, params.R.shape); - const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); - const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); - const auto B = std::make_shared(params.B.type, params.B.shape); - const auto P = std::make_shared(params.P.type, params.P.shape); + const auto X = std::make_shared(params.X.type, params.X.shape); + const auto W = std::make_shared(params.W.type, params.W.shape); + const auto R = std::make_shared(params.R.type, params.R.shape); + const auto H_t = std::make_shared(params.H_t.type, params.H_t.shape); + const auto C_t = std::make_shared(params.C_t.type, params.C_t.shape); + const auto B = std::make_shared(params.B.type, params.B.shape); + const auto P = std::make_shared(params.P.type, params.P.shape); - const auto lstm_cell = std::make_shared(X, + const auto lstm_cell = std::make_shared(X, H_t, C_t, W, diff --git a/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp b/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp index 4c2fd3ee50755c..f0adb506f6fa21 100644 --- a/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp +++ b/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp @@ -2,18 +2,19 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/matrix_nms.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset8.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; namespace { struct MatrixNmsParams { - MatrixNmsParams(const opset8::MatrixNms::Attributes& attrs, + MatrixNmsParams(const op::v8::MatrixNms::Attributes& attrs, const reference_tests::Tensor& boxes, const reference_tests::Tensor& scores, const reference_tests::Tensor& expectedSelectedScores, @@ -28,7 +29,7 @@ struct MatrixNmsParams { expectedValidOutputs(expectedValidOutputs), testcaseName(testcaseName) {} - opset8::MatrixNms::Attributes attrs; + op::v8::MatrixNms::Attributes attrs; reference_tests::Tensor boxes; reference_tests::Tensor scores; reference_tests::Tensor expectedSelectedScores; @@ -71,9 +72,9 @@ class ReferenceMatrixNmsTest : public testing::TestWithParam, p private: static std::shared_ptr CreateFunction(const MatrixNmsParams& params) { - const auto boxes = std::make_shared(params.boxes.type, PartialShape::dynamic()); - const auto scores = std::make_shared(params.scores.type, PartialShape::dynamic()); - const auto nms = std::make_shared(boxes, scores, params.attrs); + const auto boxes = std::make_shared(params.boxes.type, PartialShape::dynamic()); + const auto scores = std::make_shared(params.scores.type, PartialShape::dynamic()); + const auto nms = std::make_shared(boxes, scores, params.attrs); const auto f = std::make_shared(nms->outputs(), ParameterVector{boxes, scores}); return f; } @@ -91,14 +92,14 @@ std::vector generateParams() { std::vector params{ MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k 0, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -135,14 +136,14 @@ std::vector generateParams() { "matrix_nms_output_type_i64"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k 0, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -179,14 +180,14 @@ std::vector generateParams() { "matrix_nms_output_type_i32"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k 0, // background_class - opset8::MatrixNms::DecayFunction::GAUSSIAN, // decay_function + op::v8::MatrixNms::DecayFunction::GAUSSIAN, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -223,14 +224,14 @@ std::vector generateParams() { "matrix_nms_gaussian"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k 0, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -258,14 +259,14 @@ std::vector generateParams() { "matrix_nms_two_batches_two_classes"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type true, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.5f, // post_threshold true, // normalized @@ -296,14 +297,14 @@ std::vector generateParams() { "matrix_nms_two_batches_two_classes_by_score_cross_batch"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::CLASSID, // sort_result_type + op::v8::MatrixNms::SortResultType::CLASSID, // sort_result_type true, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.5f, // post_threshold true, // normalized @@ -334,14 +335,14 @@ std::vector generateParams() { "matrix_nms_two_batches_two_classes_by_classid_cross_batch"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::CLASSID, // sort_result_type + op::v8::MatrixNms::SortResultType::CLASSID, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k 3, // keep_top_k 0, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -369,14 +370,14 @@ std::vector generateParams() { "matrix_nms_by_keep_top_k"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -400,14 +401,14 @@ std::vector generateParams() { "matrix_nms_background"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -442,14 +443,14 @@ std::vector generateParams() { "matrix_nms_flipped_coordinates"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.8f, // post_threshold true, // normalized @@ -468,14 +469,14 @@ std::vector generateParams() { "matrix_nms_post_threshold"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.3f, // post_threshold true, // normalized @@ -497,14 +498,14 @@ std::vector generateParams() { "matrix_nms_identical_boxes"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 2, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -523,14 +524,14 @@ std::vector generateParams() { "matrix_nms_nms_top_k"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 0.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized @@ -545,14 +546,14 @@ std::vector generateParams() { "matrix_nms_single_box"), MatrixNmsParams( { - opset8::MatrixNms::SortResultType::SCORE, // sort_result_type + op::v8::MatrixNms::SortResultType::SCORE, // sort_result_type false, // sort_result_across_batch ET_IND, // output_type 2.0f, // score_threshold 3, // nms_top_k -1, // keep_top_k -1, // background_class - opset8::MatrixNms::DecayFunction::LINEAR, // decay_function + op::v8::MatrixNms::DecayFunction::LINEAR, // decay_function 2.0f, // gaussian_sigma 0.0f, // post_threshold true, // normalized diff --git a/src/plugins/template/tests/functional/op_reference/nms_rotated.cpp b/src/plugins/template/tests/functional/op_reference/nms_rotated.cpp index d22aa82911830d..34f0bc074ec2f1 100644 --- a/src/plugins/template/tests/functional/op_reference/nms_rotated.cpp +++ b/src/plugins/template/tests/functional/op_reference/nms_rotated.cpp @@ -2,11 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/nms_rotated.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset13.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -72,19 +74,19 @@ class ReferenceNMSRotatedTest : public testing::TestWithParam, private: static std::shared_ptr CreateModel(const NMSRotatedParams& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape, params.maxOutputBoxesPerClass.data.data()); - const auto iou_threshold = std::make_shared(params.iouThreshold.type, + const auto iou_threshold = std::make_shared(params.iouThreshold.type, params.iouThreshold.shape, params.iouThreshold.data.data()); - const auto score_threshold = std::make_shared(params.scoreThreshold.type, + const auto score_threshold = std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape, params.scoreThreshold.data.data()); - const auto nms = std::make_shared(boxes, + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -113,16 +115,16 @@ class ReferenceNMSRotatedTestWithoutConstants : public ReferenceNMSRotatedTest { private: static std::shared_ptr CreateModel(const NMSRotatedParams& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape); const auto iou_threshold = - std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); + std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); const auto score_threshold = - std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); - const auto nms = std::make_shared(boxes, + std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, diff --git a/src/plugins/template/tests/functional/op_reference/non_max_suppression.cpp b/src/plugins/template/tests/functional/op_reference/non_max_suppression.cpp index 333ea4cf0d2845..7a3e8f28b03550 100644 --- a/src/plugins/template/tests/functional/op_reference/non_max_suppression.cpp +++ b/src/plugins/template/tests/functional/op_reference/non_max_suppression.cpp @@ -2,13 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/non_max_suppression.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset3.hpp" -#include "openvino/opsets/opset4.hpp" -#include "openvino/opsets/opset5.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -21,7 +21,7 @@ struct NonMaxSuppressionParams { reference_tests::Tensor iouThreshold; reference_tests::Tensor scoreThreshold; reference_tests::Tensor softNmsSigma; - opset5::NonMaxSuppression::BoxEncodingType boxEncoding; + op::v5::NonMaxSuppression::BoxEncodingType boxEncoding; reference_tests::Tensor expectedSelectedIndices; reference_tests::Tensor expectedSelectedScores; reference_tests::Tensor expectedValidOutputs; @@ -75,22 +75,22 @@ class ReferenceNonMaxSuppressionTest : public testing::TestWithParam CreateFunction(const NonMaxSuppressionParams& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape, params.maxOutputBoxesPerClass.data.data()); - const auto iou_threshold = std::make_shared(params.iouThreshold.type, + const auto iou_threshold = std::make_shared(params.iouThreshold.type, params.iouThreshold.shape, params.iouThreshold.data.data()); - const auto score_threshold = std::make_shared(params.scoreThreshold.type, + const auto score_threshold = std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape, params.scoreThreshold.data.data()); - const auto soft_nms_sigma = std::make_shared(params.softNmsSigma.type, + const auto soft_nms_sigma = std::make_shared(params.softNmsSigma.type, params.softNmsSigma.shape, params.softNmsSigma.data.data()); - const auto nms = std::make_shared(boxes, + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -122,18 +122,18 @@ class ReferenceNonMaxSuppressionTestWithoutConstants : public ReferenceNonMaxSup private: static std::shared_ptr CreateFunction(const NonMaxSuppressionParams& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape); const auto iou_threshold = - std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); + std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); const auto score_threshold = - std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); + std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); const auto soft_nms_sigma = - std::make_shared(params.softNmsSigma.type, params.softNmsSigma.shape); - const auto nms = std::make_shared(boxes, + std::make_shared(params.softNmsSigma.type, params.softNmsSigma.shape); + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -173,7 +173,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CENTER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .expectedSelectedScores( @@ -190,7 +190,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .expectedSelectedScores( @@ -211,7 +211,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .expectedSelectedScores(reference_tests::Tensor(ET_TH, {1, 3}, std::vector{0.0, 0.0, 0.9})) .expectedValidOutputs(reference_tests::Tensor(ET_IND, {1}, std::vector{1})) @@ -226,7 +226,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .expectedSelectedScores( reference_tests::Tensor(ET_TH, {2, 3}, std::vector{0.0, 0.0, 0.95, 0.0, 0.0, 0.9})) @@ -240,7 +240,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .expectedSelectedScores(reference_tests::Tensor(ET_TH, {1, 3}, std::vector{0.0, 0.0, 0.9})) .expectedValidOutputs(reference_tests::Tensor(ET_IND, {1}, std::vector{1})) @@ -255,7 +255,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .expectedSelectedScores( @@ -272,7 +272,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .expectedSelectedScores( reference_tests::Tensor(ET_TH, {2, 3}, std::vector{0.0, 0.0, 0.95, 0.0, 0.0, 0.9})) @@ -294,7 +294,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {4, 3}, std::vector{0, 0, 3, 0, 0, 0, 1, 0, 3, 1, 0, 0})) .expectedSelectedScores(reference_tests::Tensor( @@ -316,7 +316,7 @@ std::vector generateParams() { .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {4, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .expectedSelectedScores(reference_tests::Tensor( @@ -363,7 +363,7 @@ std::vector generateParamsWithoutConstants() { .iouThreshold(reference_tests::Tensor(ET_TH, {1}, std::vector{0.4f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {1}, std::vector{0.2f})) .softNmsSigma(reference_tests::Tensor(ET_TH, {1}, std::vector{0.0f})) - .boxEncoding(opset5::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .expectedSelectedScores(reference_tests::Tensor(ET_TH, {1, 3}, std::vector{0.0f, 0.0f, 0.95f})) .expectedValidOutputs(reference_tests::Tensor(ET_IND, {1}, std::vector{1})) @@ -422,7 +422,7 @@ struct NonMaxSuppression4Params { reference_tests::Tensor maxOutputBoxesPerClass; reference_tests::Tensor iouThreshold; reference_tests::Tensor scoreThreshold; - opset4::NonMaxSuppression::BoxEncodingType boxEncoding; + op::v4::NonMaxSuppression::BoxEncodingType boxEncoding; reference_tests::Tensor expectedSelectedIndices; std::string testcaseName; }; @@ -465,19 +465,19 @@ class ReferenceNonMaxSuppression4Test : public testing::TestWithParam CreateFunction(const NonMaxSuppression4Params& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape, params.maxOutputBoxesPerClass.data.data()); - const auto iou_threshold = std::make_shared(params.iouThreshold.type, + const auto iou_threshold = std::make_shared(params.iouThreshold.type, params.iouThreshold.shape, params.iouThreshold.data.data()); - const auto score_threshold = std::make_shared(params.scoreThreshold.type, + const auto score_threshold = std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape, params.scoreThreshold.data.data()); - const auto nms = std::make_shared(boxes, + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -505,16 +505,16 @@ class ReferenceNonMaxSuppression4TestWithoutConstants : public ReferenceNonMaxSu private: static std::shared_ptr CreateFunction(const NonMaxSuppression4Params& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape); const auto iou_threshold = - std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); + std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); const auto score_threshold = - std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); - const auto nms = std::make_shared(boxes, + std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -552,7 +552,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CENTER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_center_point_box_format"), @@ -565,7 +565,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_flipped_coordinates"), @@ -582,7 +582,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName("nonmaxsuppression_identical_boxes"), @@ -594,7 +594,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName("nonmaxsuppression_limit_output_size"), @@ -604,7 +604,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName("nonmaxsuppression_single_box"), @@ -616,7 +616,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_suppress_by_IOU"), @@ -629,7 +629,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName("nonmaxsuppression_suppress_by_IOU_and_scores"), @@ -647,7 +647,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {4, 3}, std::vector{0, 0, 3, 0, 0, 0, 1, 0, 3, 1, 0, 0})) .testcaseName("nonmaxsuppression_two_batches"), @@ -663,7 +663,7 @@ std::vector generateParams4() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {4, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .testcaseName("nonmaxsuppression_two_classes"), @@ -704,7 +704,7 @@ std::vector generateParams4WithoutConstants() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.2f})) - .boxEncoding(opset4::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .testcaseName("nonmaxsuppression_suppress_by_IOU_and_scores_without_constants"), }; @@ -761,7 +761,7 @@ struct NonMaxSuppression3Params { reference_tests::Tensor maxOutputBoxesPerClass; reference_tests::Tensor iouThreshold; reference_tests::Tensor scoreThreshold; - opset3::NonMaxSuppression::BoxEncodingType boxEncoding; + op::v3::NonMaxSuppression::BoxEncodingType boxEncoding; reference_tests::Tensor expectedSelectedIndices; std::string testcaseName; }; @@ -804,19 +804,19 @@ class ReferenceNonMaxSuppression3Test : public testing::TestWithParam CreateFunction(const NonMaxSuppression3Params& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape, params.maxOutputBoxesPerClass.data.data()); - const auto iou_threshold = std::make_shared(params.iouThreshold.type, + const auto iou_threshold = std::make_shared(params.iouThreshold.type, params.iouThreshold.shape, params.iouThreshold.data.data()); - const auto score_threshold = std::make_shared(params.scoreThreshold.type, + const auto score_threshold = std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape, params.scoreThreshold.data.data()); - const auto nms = std::make_shared(boxes, + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -844,16 +844,16 @@ class ReferenceNonMaxSuppression3TestWithoutConstants : public ReferenceNonMaxSu private: static std::shared_ptr CreateFunction(const NonMaxSuppression3Params& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape); const auto iou_threshold = - std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); + std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); const auto score_threshold = - std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); - const auto nms = std::make_shared(boxes, + std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -891,7 +891,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CENTER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_center_point_box_format"), @@ -904,7 +904,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_flipped_coordinates"), @@ -921,7 +921,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName("nonmaxsuppression_identical_boxes"), @@ -933,7 +933,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName("nonmaxsuppression_limit_output_size"), @@ -943,7 +943,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName("nonmaxsuppression_single_box"), @@ -955,7 +955,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_suppress_by_IOU"), @@ -968,7 +968,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName("nonmaxsuppression_suppress_by_IOU_and_scores"), @@ -983,7 +983,7 @@ std::vector generateParams3() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {4, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .testcaseName("nonmaxsuppression_two_classes"), @@ -1024,7 +1024,7 @@ std::vector generateParams3WithoutConstants() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.2f})) - .boxEncoding(opset3::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .testcaseName("nonmaxsuppression_suppress_by_IOU_and_scores_without_constants"), }; @@ -1081,7 +1081,7 @@ struct NonMaxSuppression1Params { reference_tests::Tensor maxOutputBoxesPerClass; reference_tests::Tensor iouThreshold; reference_tests::Tensor scoreThreshold; - opset1::NonMaxSuppression::BoxEncodingType boxEncoding; + op::v1::NonMaxSuppression::BoxEncodingType boxEncoding; reference_tests::Tensor expectedSelectedIndices; std::string testcaseName; }; @@ -1124,19 +1124,19 @@ class ReferenceNonMaxSuppression1Test : public testing::TestWithParam CreateFunction(const NonMaxSuppression1Params& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape, params.maxOutputBoxesPerClass.data.data()); - const auto iou_threshold = std::make_shared(params.iouThreshold.type, + const auto iou_threshold = std::make_shared(params.iouThreshold.type, params.iouThreshold.shape, params.iouThreshold.data.data()); - const auto score_threshold = std::make_shared(params.scoreThreshold.type, + const auto score_threshold = std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape, params.scoreThreshold.data.data()); - const auto nms = std::make_shared(boxes, + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -1163,16 +1163,16 @@ class ReferenceNonMaxSuppression1TestWithoutConstants : public ReferenceNonMaxSu private: static std::shared_ptr CreateFunction(const NonMaxSuppression1Params& params) { - const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); - const auto scores = std::make_shared(params.scores.type, params.scores.shape); + const auto boxes = std::make_shared(params.boxes.type, params.boxes.shape); + const auto scores = std::make_shared(params.scores.type, params.scores.shape); const auto max_output_boxes_per_class = - std::make_shared(params.maxOutputBoxesPerClass.type, + std::make_shared(params.maxOutputBoxesPerClass.type, params.maxOutputBoxesPerClass.shape); const auto iou_threshold = - std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); + std::make_shared(params.iouThreshold.type, params.iouThreshold.shape); const auto score_threshold = - std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); - const auto nms = std::make_shared(boxes, + std::make_shared(params.scoreThreshold.type, params.scoreThreshold.shape); + const auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, @@ -1209,7 +1209,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CENTER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_center_point_box_format"), @@ -1222,7 +1222,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_flipped_coordinates"), @@ -1239,7 +1239,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName("nonmaxsuppression_identical_boxes"), @@ -1251,7 +1251,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName("nonmaxsuppression_limit_output_size"), @@ -1261,7 +1261,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName("nonmaxsuppression_single_box"), @@ -1273,7 +1273,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {3, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName("nonmaxsuppression_suppress_by_IOU"), @@ -1286,7 +1286,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName("nonmaxsuppression_suppress_by_IOU_and_scores"), @@ -1301,7 +1301,7 @@ std::vector generateParams1() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( reference_tests::Tensor(ET_IND, {4, 3}, std::vector{0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .testcaseName("nonmaxsuppression_two_classes"), @@ -1339,7 +1339,7 @@ std::vector generateParams1WithoutConstants() { .maxOutputBoxesPerClass(reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .scoreThreshold(reference_tests::Tensor(ET_TH, {}, std::vector{0.2f})) - .boxEncoding(opset1::NonMaxSuppression::BoxEncodingType::CORNER) + .boxEncoding(op::v1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices(reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .testcaseName("nonmaxsuppression_suppress_by_IOU_and_scores_without_constants"), }; diff --git a/src/plugins/template/tests/functional/op_reference/pad.cpp b/src/plugins/template/tests/functional/op_reference/pad.cpp index eca5f7dbd074a7..4396aadf415661 100644 --- a/src/plugins/template/tests/functional/op_reference/pad.cpp +++ b/src/plugins/template/tests/functional/op_reference/pad.cpp @@ -6,9 +6,8 @@ #include -#include - #include "base_reference_test.hpp" +#include "functional_test_utils/skip_tests_config.hpp" #include "openvino/op/constant.hpp" using namespace reference_tests; diff --git a/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp b/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp index 9097c3a2019f8b..358477ee9ed40a 100644 --- a/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp +++ b/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp @@ -2,11 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/prior_box_clustered.hpp" + #include #include "base_reference_test.hpp" +#include "openvino/op/constant.hpp" #include "openvino/op/prior_box.hpp" -#include "openvino/opsets/opset1.hpp" using namespace reference_tests; using namespace ov; @@ -76,9 +78,9 @@ class ReferencePriorBoxClusteredLayerTest : public testing::TestWithParam CreateFunction(const PriorBoxClusteredParams& params) { auto LS = - std::make_shared(params.inType, params.layerShapeShape, params.layerShapeData.data()); + std::make_shared(params.inType, params.layerShapeShape, params.layerShapeData.data()); auto IS = - std::make_shared(params.inType, params.imageShapeShape, params.imageShapeData.data()); + std::make_shared(params.inType, params.imageShapeShape, params.imageShapeData.data()); const auto PriorBoxClustered = std::make_shared(LS, IS, params.attrs); return std::make_shared(NodeVector{PriorBoxClustered}, ParameterVector{}); } diff --git a/src/plugins/template/tests/functional/op_reference/random_uniform.cpp b/src/plugins/template/tests/functional/op_reference/random_uniform.cpp index 9da97ef7c0b426..706a7217c1dbae 100644 --- a/src/plugins/template/tests/functional/op_reference/random_uniform.cpp +++ b/src/plugins/template/tests/functional/op_reference/random_uniform.cpp @@ -2,10 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/random_uniform.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset8.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace ov; @@ -64,11 +67,11 @@ class ReferenceRandomUniformLayerTest : public testing::TestWithParam(min_val.type, min_val.shape); - const auto max_val_param = std::make_shared(max_val.type, max_val.shape); - auto out_shape_ = std::make_shared(element::i64, Shape{out_shape.size()}, out_shape); + const auto min_val_param = std::make_shared(min_val.type, min_val.shape); + const auto max_val_param = std::make_shared(max_val.type, max_val.shape); + auto out_shape_ = std::make_shared(element::i64, Shape{out_shape.size()}, out_shape); - return std::make_shared(NodeVector{std::make_shared(out_shape_, + return std::make_shared(NodeVector{std::make_shared(out_shape_, min_val_param, max_val_param, out_type, diff --git a/src/plugins/template/tests/functional/op_reference/roi_align.cpp b/src/plugins/template/tests/functional/op_reference/roi_align.cpp index ede8f75ace3c04..3bad155201bc2e 100644 --- a/src/plugins/template/tests/functional/op_reference/roi_align.cpp +++ b/src/plugins/template/tests/functional/op_reference/roi_align.cpp @@ -2,14 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/roi_align.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset3.hpp" -#include "openvino/opsets/opset4.hpp" -#include "openvino/opsets/opset5.hpp" -#include "openvino/opsets/opset9.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -133,12 +132,12 @@ class ReferenceROIAlignTest : public testing::TestWithParam, pub private: static std::shared_ptr CreateFunction(const ROIAlignParams& params) { - const auto featureMap = std::make_shared(params.iType, params.pShape); + const auto featureMap = std::make_shared(params.iType, params.pShape); const auto coords = - std::make_shared(params.coords.type, params.coords.shape, params.coords.data.data()); + std::make_shared(params.coords.type, params.coords.shape, params.coords.data.data()); const auto roisIdx = - std::make_shared(params.roiIdx.type, params.roiIdx.shape, params.roiIdx.data.data()); - const auto roi_align = std::make_shared(featureMap, + std::make_shared(params.roiIdx.type, params.roiIdx.shape, params.roiIdx.data.data()); + const auto roi_align = std::make_shared(featureMap, coords, roisIdx, params.pooledH, @@ -185,14 +184,14 @@ class ReferenceROIAlignV9Test : public testing::TestWithParam, private: static std::shared_ptr CreateFunction(const ROIAlignV9Params& params) { - const auto featureMap = std::make_shared(params.iType, params.pShape); + const auto featureMap = std::make_shared(params.iType, params.pShape); const auto coords = - std::make_shared(params.coords.type, params.coords.shape, params.coords.data.data()); + std::make_shared(params.coords.type, params.coords.shape, params.coords.data.data()); const auto roisIdx = - std::make_shared(params.roiIdx.type, params.roiIdx.shape, params.roiIdx.data.data()); - const auto pooling_mode = EnumNames::as_enum(params.poolingMode); - const auto aligned_mode = EnumNames::as_enum(params.alignedMode); - const auto roi_align = std::make_shared(featureMap, + std::make_shared(params.roiIdx.type, params.roiIdx.shape, params.roiIdx.data.data()); + const auto pooling_mode = EnumNames::as_enum(params.poolingMode); + const auto aligned_mode = EnumNames::as_enum(params.alignedMode); + const auto roi_align = std::make_shared(featureMap, coords, roisIdx, params.pooledH, diff --git a/src/plugins/template/tests/functional/op_reference/roll.cpp b/src/plugins/template/tests/functional/op_reference/roll.cpp index b9d2b54f5debb0..63293f1c323347 100644 --- a/src/plugins/template/tests/functional/op_reference/roll.cpp +++ b/src/plugins/template/tests/functional/op_reference/roll.cpp @@ -2,11 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/roll.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset7.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -61,14 +63,14 @@ class ReferenceRollLayerTest : public testing::TestWithParam, public private: static std::shared_ptr CreateFunction(const RollParams& params) { - const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto shift = std::make_shared(params.shiftTensor.type, + const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto shift = std::make_shared(params.shiftTensor.type, params.shiftTensor.shape, params.shiftTensor.data.data()); - const auto axes = std::make_shared(params.axesTensor.type, + const auto axes = std::make_shared(params.axesTensor.type, params.axesTensor.shape, params.axesTensor.data.data()); - const auto roll = std::make_shared(data, shift, axes); + const auto roll = std::make_shared(data, shift, axes); return std::make_shared(NodeVector{roll}, ParameterVector{data}); } }; diff --git a/src/plugins/template/tests/functional/op_reference/shuffle_channels.cpp b/src/plugins/template/tests/functional/op_reference/shuffle_channels.cpp index 7b605e62680c73..f3cd395bf4aadc 100644 --- a/src/plugins/template/tests/functional/op_reference/shuffle_channels.cpp +++ b/src/plugins/template/tests/functional/op_reference/shuffle_channels.cpp @@ -2,10 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/shuffle_channels.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -59,8 +61,8 @@ class ReferenceShuffleChannelsLayerTest : public testing::TestWithParam CreateFunction(const ShuffleChannelsParams& params) { - const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto function = std::make_shared(data, params.axis, params.group); + const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto function = std::make_shared(data, params.axis, params.group); return std::make_shared(NodeVector{function}, ParameterVector{data}); } }; diff --git a/src/plugins/template/tests/functional/op_reference/slice.cpp b/src/plugins/template/tests/functional/op_reference/slice.cpp index 2fa64b2dd458d6..21455df6786460 100644 --- a/src/plugins/template/tests/functional/op_reference/slice.cpp +++ b/src/plugins/template/tests/functional/op_reference/slice.cpp @@ -2,12 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/slice.hpp" + #include #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset8.hpp" +#include "openvino/op/parameter.hpp" using namespace ov; @@ -102,13 +104,13 @@ class ReferenceSliceLayerTest : public testing::TestWithParam, publ const reference_tests::Tensor& stop, const reference_tests::Tensor& step, const reference_tests::Tensor& axes) { - const auto data_param = std::make_shared(data.type, data.shape); - const auto start_param = std::make_shared(start.type, start.shape); - const auto stop_param = std::make_shared(stop.type, stop.shape); - const auto step_param = std::make_shared(step.type, step.shape); - const auto axes_param = std::make_shared(axes.type, axes.shape); + const auto data_param = std::make_shared(data.type, data.shape); + const auto start_param = std::make_shared(start.type, start.shape); + const auto stop_param = std::make_shared(stop.type, stop.shape); + const auto step_param = std::make_shared(step.type, step.shape); + const auto axes_param = std::make_shared(axes.type, axes.shape); - const auto slice = std::make_shared(data_param, start_param, stop_param, step_param, axes_param); + const auto slice = std::make_shared(data_param, start_param, stop_param, step_param, axes_param); return std::make_shared(NodeVector{slice}, ParameterVector{data_param, start_param, stop_param, step_param, axes_param}); } @@ -118,12 +120,12 @@ class ReferenceSliceLayerTest : public testing::TestWithParam, publ const reference_tests::Tensor& start, const reference_tests::Tensor& stop, const reference_tests::Tensor& step) { - const auto data_param = std::make_shared(data.type, data.shape); - const auto start_param = std::make_shared(start.type, start.shape); - const auto stop_param = std::make_shared(stop.type, stop.shape); - const auto step_param = std::make_shared(step.type, step.shape); + const auto data_param = std::make_shared(data.type, data.shape); + const auto start_param = std::make_shared(start.type, start.shape); + const auto stop_param = std::make_shared(stop.type, stop.shape); + const auto step_param = std::make_shared(step.type, step.shape); - const auto slice = std::make_shared(data_param, start_param, stop_param, step_param); + const auto slice = std::make_shared(data_param, start_param, stop_param, step_param); return std::make_shared(NodeVector{slice}, ParameterVector{data_param, start_param, stop_param, step_param}); } diff --git a/src/plugins/template/tests/functional/op_reference/space_to_batch.cpp b/src/plugins/template/tests/functional/op_reference/space_to_batch.cpp index 39cadfe89560df..32bcf21cab7f3b 100644 --- a/src/plugins/template/tests/functional/op_reference/space_to_batch.cpp +++ b/src/plugins/template/tests/functional/op_reference/space_to_batch.cpp @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/space_to_batch.hpp" + #include #include "base_reference_test.hpp" #include "openvino/op/constant.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset2.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -70,11 +71,11 @@ class ReferenceSpaceToBatchLayerTest : public testing::TestWithParam CreateFunction(const SpaceToBatchParams& params) { - const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto blockShape = std::make_shared(element::i64, params.blockShapeTensor.shape); - const auto padsBegin = std::make_shared(element::i64, params.padsBeginTensor.shape); - const auto padsEnd = std::make_shared(element::i64, params.padsEndTensor.shape); - const auto batchToSpace = std::make_shared(data, blockShape, padsBegin, padsEnd); + const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto blockShape = std::make_shared(element::i64, params.blockShapeTensor.shape); + const auto padsBegin = std::make_shared(element::i64, params.padsBeginTensor.shape); + const auto padsEnd = std::make_shared(element::i64, params.padsEndTensor.shape); + const auto batchToSpace = std::make_shared(data, blockShape, padsBegin, padsEnd); return std::make_shared(NodeVector{batchToSpace}, ParameterVector{data, blockShape, padsBegin, padsEnd}); } diff --git a/src/plugins/template/tests/functional/op_reference/space_to_depth.cpp b/src/plugins/template/tests/functional/op_reference/space_to_depth.cpp index 7420376f802af7..19a6b71c03463c 100644 --- a/src/plugins/template/tests/functional/op_reference/space_to_depth.cpp +++ b/src/plugins/template/tests/functional/op_reference/space_to_depth.cpp @@ -2,10 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/space_to_depth.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -56,11 +58,10 @@ class ReferenceSpaceToDepthLayerTest : public testing::TestWithParam CreateFunction(const SpaceToDepthParams& params) { - opset1::SpaceToDepth::SpaceToDepthMode mode = params.mode == "DEPTH_FIRST" - ? opset1::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST - : opset1::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST; - const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); - const auto SpaceToDepth = std::make_shared(data, mode, params.blockSize); + const auto mode = params.mode == "DEPTH_FIRST" ? op::v0::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST + : op::v0::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST; + const auto data = std::make_shared(params.dataTensor.type, params.dataTensor.shape); + const auto SpaceToDepth = std::make_shared(data, mode, params.blockSize); return std::make_shared(NodeVector{SpaceToDepth}, ParameterVector{data}); } }; diff --git a/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp b/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp index 5c53422b0dad64..477585ce5a7319 100644 --- a/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp +++ b/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp @@ -2,13 +2,23 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include "openvino/op/tensor_iterator.hpp" -#include -#include +#include #include "base_reference_test.hpp" #include "functional_test_utils/skip_tests_config.hpp" +#include "openvino/core/model.hpp" +#include "openvino/op/add.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/gru_cell.hpp" +#include "openvino/op/lstm_cell.hpp" +#include "openvino/op/multiply.hpp" +#include "openvino/op/parameter.hpp" +#include "openvino/op/result.hpp" +#include "openvino/op/rnn_cell.hpp" +#include "openvino/op/squeeze.hpp" +#include "openvino/op/unsqueeze.hpp" namespace { struct TIFunctionalBase { @@ -23,26 +33,26 @@ struct TIFunctionalBase { struct TIDynamicInputs : public TIFunctionalBase { std::shared_ptr create_function(const std::vector& ti_inputs, const std::vector& results) override { - auto X = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto Y = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto M = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto X = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto Y = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto M = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto Xi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto Yi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto M_body = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); - auto body_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); + auto Xi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto Yi = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto M_body = std::make_shared(ov::element::f32, ov::PartialShape::dynamic()); + auto body_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); - auto trip_count = std::make_shared(ov::element::i64, ov::Shape{1}, 3); - auto exec_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); + auto trip_count = std::make_shared(ov::element::i64, ov::Shape{1}, 3); + auto exec_condition = std::make_shared(ov::element::boolean, ov::Shape{1}, true); // Body - auto sum = std::make_shared(Xi, Yi); - auto Zo = std::make_shared(sum, M_body); + auto sum = std::make_shared(Xi, Yi); + auto Zo = std::make_shared(sum, M_body); auto body = std::make_shared(ov::OutputVector{body_condition, Zo}, ov::ParameterVector{Xi, Yi, M_body}); - auto tensor_iterator = std::make_shared(); + auto tensor_iterator = std::make_shared(); tensor_iterator->set_function(body); tensor_iterator->set_sliced_input(Xi, X, 0, 1, 1, -1, 1); @@ -257,14 +267,14 @@ struct TIStaticInputs : public TIStaticFunctionalBase { std::shared_ptr create_function(const TensorIteratorStaticParams& params) override { std::vector inputShapes; std::shared_ptr function; - auto tensor_iterator = std::make_shared(); + auto tensor_iterator = std::make_shared(); // Each case consist of 3 steps: // 1. Create TensorIterator body. // 2. Set PortMap // 3. Create outer function auto axis = - std::make_shared(ov::element::i64, + std::make_shared(ov::element::i64, ov::Shape{1}, std::vector{static_cast(params.sequenceAxis)}); switch (params.body_type) { @@ -290,13 +300,13 @@ struct TIStaticInputs : public TIStaticFunctionalBase { ov::ParameterVector body_params{std::make_shared(params.iType, inputShapes[0]), std::make_shared(params.iType, inputShapes[1]), std::make_shared(params.iType, inputShapes[2])}; - auto squeeze = std::make_shared(body_params[0], axis); + auto squeeze = std::make_shared(body_params[0], axis); ov::OutputVector out_vector = {squeeze, body_params[1], body_params[2]}; - auto W = std::make_shared(params.W.type, params.W.shape, params.W.data.data()); - auto R = std::make_shared(params.R.type, params.R.shape, params.R.data.data()); - auto B = std::make_shared(params.B.type, params.B.shape, params.B.data.data()); - auto lstm_cell = std::make_shared(out_vector[0], + auto W = std::make_shared(params.W.type, params.W.shape, params.W.data.data()); + auto R = std::make_shared(params.R.type, params.R.shape, params.R.data.data()); + auto B = std::make_shared(params.B.type, params.B.shape, params.B.data.data()); + auto lstm_cell = std::make_shared(out_vector[0], out_vector[1], out_vector[2], W, @@ -308,10 +318,10 @@ struct TIStaticInputs : public TIStaticFunctionalBase { std::vector{}, params.clip); - auto unsqueeze = std::make_shared(lstm_cell->output(0), axis); - ov::ResultVector results{std::make_shared(unsqueeze), - std::make_shared(lstm_cell->output(0)), - std::make_shared(lstm_cell->output(1))}; + auto unsqueeze = std::make_shared(lstm_cell->output(0), axis); + ov::ResultVector results{std::make_shared(unsqueeze), + std::make_shared(lstm_cell->output(0)), + std::make_shared(lstm_cell->output(1))}; auto body = std::make_shared(results, body_params, "lstm_cell"); tensor_iterator->set_function(body); @@ -357,13 +367,13 @@ struct TIStaticInputs : public TIStaticFunctionalBase { ov::ParameterVector body_params{std::make_shared(params.iType, inputShapes[0]), std::make_shared(params.iType, inputShapes[1])}; - auto squeeze = std::make_shared(body_params[0], axis); + auto squeeze = std::make_shared(body_params[0], axis); ov::OutputVector out_vector = {squeeze, body_params[1]}; - auto W = std::make_shared(params.W.type, params.W.shape, params.W.data.data()); - auto R = std::make_shared(params.R.type, params.R.shape, params.R.data.data()); - auto B = std::make_shared(params.B.type, params.B.shape, params.B.data.data()); - auto gru_cell = std::make_shared(out_vector[0], + auto W = std::make_shared(params.W.type, params.W.shape, params.W.data.data()); + auto R = std::make_shared(params.R.type, params.R.shape, params.R.data.data()); + auto B = std::make_shared(params.B.type, params.B.shape, params.B.data.data()); + auto gru_cell = std::make_shared(out_vector[0], out_vector[1], W, R, @@ -375,9 +385,9 @@ struct TIStaticInputs : public TIStaticFunctionalBase { params.clip, false); - auto unsqueeze = std::make_shared(gru_cell->output(0), axis); - ov::ResultVector results{std::make_shared(gru_cell->output(0)), - std::make_shared(unsqueeze)}; + auto unsqueeze = std::make_shared(gru_cell->output(0), axis); + ov::ResultVector results{std::make_shared(gru_cell->output(0)), + std::make_shared(unsqueeze)}; auto body = std::make_shared(results, body_params, "gru_cell"); tensor_iterator->set_function(body); @@ -420,13 +430,13 @@ struct TIStaticInputs : public TIStaticFunctionalBase { inputShapes[0][params.sequenceAxis] = 1; // sliced dimension ov::ParameterVector body_params{std::make_shared(params.iType, inputShapes[0]), std::make_shared(params.iType, inputShapes[1])}; - auto squeeze = std::make_shared(body_params[0], axis); + auto squeeze = std::make_shared(body_params[0], axis); ov::OutputVector out_vector = {squeeze, body_params[1]}; - auto W = std::make_shared(params.W.type, params.W.shape, params.W.data.data()); - auto R = std::make_shared(params.R.type, params.R.shape, params.R.data.data()); - auto B = std::make_shared(params.B.type, params.B.shape, params.B.data.data()); - auto rnn_cell = std::make_shared(out_vector[0], + auto W = std::make_shared(params.W.type, params.W.shape, params.W.data.data()); + auto R = std::make_shared(params.R.type, params.R.shape, params.R.data.data()); + auto B = std::make_shared(params.B.type, params.B.shape, params.B.data.data()); + auto rnn_cell = std::make_shared(out_vector[0], out_vector[1], W, R, @@ -437,9 +447,9 @@ struct TIStaticInputs : public TIStaticFunctionalBase { std::vector{}, params.clip); - auto unsqueeze = std::make_shared(rnn_cell->output(0), axis); - ov::ResultVector results{std::make_shared(rnn_cell), - std::make_shared(unsqueeze)}; + auto unsqueeze = std::make_shared(rnn_cell->output(0), axis); + ov::ResultVector results{std::make_shared(rnn_cell), + std::make_shared(unsqueeze)}; auto body = std::make_shared(results, body_params, "rnn_cell"); tensor_iterator->set_function(body); diff --git a/src/plugins/template/tests/functional/op_reference/tile.cpp b/src/plugins/template/tests/functional/op_reference/tile.cpp index 2a99ee45b11cb4..6caa3d64154e95 100644 --- a/src/plugins/template/tests/functional/op_reference/tile.cpp +++ b/src/plugins/template/tests/functional/op_reference/tile.cpp @@ -2,10 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/tile.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -55,10 +58,10 @@ class ReferenceTileTest : public testing::TestWithParam, public Comm private: static std::shared_ptr CreateFunction(const TileParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); + const auto A = std::make_shared(params.A.type, params.A.shape); const auto repeats = - std::make_shared(params.repeats.type, params.repeats.shape, params.repeats.data.data()); - const auto tile = std::make_shared(A, repeats); + std::make_shared(params.repeats.type, params.repeats.shape, params.repeats.data.data()); + const auto tile = std::make_shared(A, repeats); const auto f = std::make_shared(NodeVector{tile}, ParameterVector{A}); return f; } diff --git a/src/plugins/template/tests/functional/op_reference/topk.cpp b/src/plugins/template/tests/functional/op_reference/topk.cpp index f3fac57bd2acf1..b702a97519d1db 100644 --- a/src/plugins/template/tests/functional/op_reference/topk.cpp +++ b/src/plugins/template/tests/functional/op_reference/topk.cpp @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/topk.hpp" + #include #include "base_reference_test.hpp" -#include "openvino/opsets/opset1.hpp" -#include "openvino/opsets/opset11.hpp" -#include "openvino/opsets/opset3.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" using namespace reference_tests; using namespace ov; @@ -17,8 +18,8 @@ struct TopKParams { TopKParams(const reference_tests::Tensor& A, const reference_tests::Tensor& k, const int64_t axis, - const opset1::TopK::Mode mode, - const opset1::TopK::SortType sort, + const op::v1::TopK::Mode mode, + const op::v1::TopK::SortType sort, const reference_tests::Tensor& result0, const reference_tests::Tensor& result1, const size_t outIdx, @@ -36,8 +37,8 @@ struct TopKParams { reference_tests::Tensor A; reference_tests::Tensor k; int64_t axis; - opset1::TopK::Mode mode; - opset1::TopK::SortType sort; + op::v1::TopK::Mode mode; + op::v1::TopK::SortType sort; reference_tests::Tensor result0; reference_tests::Tensor result1; size_t outIdx; @@ -116,17 +117,17 @@ class ReferenceTopKTestResnet50 : public testing::TestWithParam CreateFunction(const TopKParamsResnet50& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(A, - opset1::Constant::create(element::i64, {}, {5}), + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(A, + op::v0::Constant::create(element::i64, {}, {5}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES); - const auto C = std::make_shared(A, - opset1::Constant::create(element::i64, {}, {1}), + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES); + const auto C = std::make_shared(A, + op::v0::Constant::create(element::i64, {}, {1}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES); + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES); const auto out5_value = B->output(0); const auto out5_index = B->output(1); @@ -247,9 +248,9 @@ class ReferenceTopKTestMaxMinSort : public ReferenceTopKTest { private: static std::shared_ptr CreateFunction(const TopKParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(B->outputs(), ParameterVector{A}); return f; } @@ -279,8 +280,8 @@ std::vector generateParamsMaxMinSort() { }({128, 1000})), reference_tests::Tensor(ET2, {}, std::vector{5}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::NONE, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::NONE, reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector { @@ -323,8 +324,8 @@ std::vector generateParamsMaxMinSort() { }({128, 1000})), reference_tests::Tensor(ET2, {}, std::vector{5}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::NONE, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::NONE, reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector { @@ -368,8 +369,8 @@ std::vector generateParamsMaxMinSort() { }({128, 1000})), reference_tests::Tensor(ET2, {}, std::vector{5}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector { @@ -408,8 +409,8 @@ std::vector generateParamsMaxMinSort() { }({128, 1000})), reference_tests::Tensor(ET2, {}, std::vector{5}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector { @@ -449,8 +450,8 @@ std::vector generateParamsMaxMinSort() { }({128, 1000})), reference_tests::Tensor(ET2, {}, std::vector{5}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_INDICES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_INDICES, reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector { @@ -493,8 +494,8 @@ std::vector generateParamsMaxMinSort() { }({128, 1000})), reference_tests::Tensor(ET2, {}, std::vector{5}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_INDICES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_INDICES, reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector { @@ -523,8 +524,8 @@ std::vector generateParamsMaxMinSort() { TopKParams(reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {3}, std::vector{5, 4, 3}), reference_tests::Tensor(ET_OUT, {3}, std::vector{3, 4, 0}), 0, @@ -533,8 +534,8 @@ std::vector generateParamsMaxMinSort() { TopKParams(reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_INDICES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_INDICES, reference_tests::Tensor(ET, {3}, std::vector{3, 5, 4}), reference_tests::Tensor(ET_OUT, {3}, std::vector{0, 3, 4}), 0, @@ -543,8 +544,8 @@ std::vector generateParamsMaxMinSort() { TopKParams(reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), reference_tests::Tensor(ET_OUT, {3}, std::vector{1, 2, 0}), 0, @@ -553,8 +554,8 @@ std::vector generateParamsMaxMinSort() { TopKParams(reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_INDICES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_INDICES, reference_tests::Tensor(ET, {3}, std::vector{3, 1, 2}), reference_tests::Tensor(ET_OUT, {3}, std::vector{0, 1, 2}), 0, @@ -602,9 +603,9 @@ class ReferenceTopKTestBackend : public ReferenceTopKTest { private: static std::shared_ptr CreateFunction(const TopKParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(B->outputs(), ParameterVector{A}); return f; } @@ -674,9 +675,9 @@ class ReferenceTopKTest1dMaxMin : public ReferenceTopKTest { private: static std::shared_ptr CreateFunction(const TopKParams& params, size_t out_idx) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(OutputVector{B->output(out_idx)}, ParameterVector{A}); return f; } @@ -695,8 +696,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET2, {}, std::vector{6}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 0, @@ -705,8 +706,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET2, {}, std::vector{6}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 1, @@ -715,8 +716,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {3}, std::vector{6, 5, 4}), reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 0, @@ -725,8 +726,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {3}, std::vector{6, 5, 4}), reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 1, @@ -735,8 +736,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {1}, std::vector{6}), reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 0, @@ -745,8 +746,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {1}, std::vector{6}), reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 1, @@ -755,8 +756,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET2, {}, std::vector{6}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 0, @@ -765,8 +766,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET2, {}, std::vector{6}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 1, @@ -775,8 +776,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 0, @@ -785,8 +786,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET2, {}, std::vector{3}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 1, @@ -795,8 +796,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {1}, std::vector{1}), reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 0, @@ -805,8 +806,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {1}, std::vector{1}), reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 1, @@ -815,8 +816,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{3}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3, 2}, std::vector{10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1}), reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0}), 0, @@ -825,8 +826,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{3}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3, 2}, std::vector{10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1}), reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0}), 1, @@ -854,8 +855,8 @@ std::vector generateParams1dMaxMin() { 215, 287, 200, 272, 208, 280, 216, 288}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor( ET, {2, 2, 3, 2, 4}, @@ -897,8 +898,8 @@ std::vector generateParams1dMaxMin() { 215, 287, 200, 272, 208, 280, 216, 288}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor( ET, {2, 2, 3, 2, 4}, @@ -921,8 +922,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 2, 2}, std::vector{10, 12, 9, 4, 11, 7, 6, 3}), reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{1, 1, 0, 2, 2, 2, 0, 1}), 0, @@ -931,8 +932,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 2, 2}, std::vector{10, 12, 9, 4, 11, 7, 6, 3}), reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{1, 1, 0, 2, 2, 2, 0, 1}), 1, @@ -941,8 +942,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 1, 2}, std::vector{10, 12, 11, 7}), reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{1, 1, 2, 2}), 0, @@ -951,8 +952,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 1, 2}, std::vector{10, 12, 11, 7}), reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{1, 1, 2, 2}), 1, @@ -961,8 +962,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{3}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3, 2}, std::vector{8, 2, 10, 4, 12, 9, 5, 1, 6, 3, 11, 7}), reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{2, 0, 1, 2, 0, 1, 1, 0, 0, 1, 2, 2}), 0, @@ -971,8 +972,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{3}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3, 2}, std::vector{8, 2, 10, 4, 12, 9, 5, 1, 6, 3, 11, 7}), reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{2, 0, 1, 2, 0, 1, 1, 0, 0, 1, 2, 2}), 1, @@ -981,8 +982,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 2, 2}, std::vector{8, 2, 10, 4, 5, 1, 6, 3}), reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{2, 0, 1, 2, 1, 0, 0, 1}), 0, @@ -991,8 +992,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 2, 2}, std::vector{8, 2, 10, 4, 5, 1, 6, 3}), reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{2, 0, 1, 2, 1, 0, 0, 1}), 1, @@ -1001,8 +1002,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 1, 2}, std::vector{8, 2, 5, 1}), reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{2, 0, 1, 0}), 0, @@ -1011,8 +1012,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 1, 2}, std::vector{8, 2, 5, 1}), reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{2, 0, 1, 0}), 1, @@ -1021,8 +1022,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{4}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {4, 3}, std::vector{12, 11, 10, 9, 8, 7, 6, 2, 5, 3, 1, 4}), reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{1, 3, 0, 0, 1, 3, 2, 0, 2, 3, 2, 1}), 0, @@ -1031,8 +1032,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{4}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {4, 3}, std::vector{12, 11, 10, 9, 8, 7, 6, 2, 5, 3, 1, 4}), reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{1, 3, 0, 0, 1, 3, 2, 0, 2, 3, 2, 1}), 1, @@ -1041,8 +1042,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3}, std::vector{12, 11, 10, 9, 8, 7}), reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{1, 3, 0, 0, 1, 3}), 0, @@ -1051,8 +1052,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3}, std::vector{12, 11, 10, 9, 8, 7}), reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{1, 3, 0, 0, 1, 3}), 1, @@ -1061,8 +1062,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {1, 3}, std::vector{12, 11, 10}), reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{1, 3, 0}), 0, @@ -1071,8 +1072,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {1, 3}, std::vector{12, 11, 10}), reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{1, 3, 0}), 1, @@ -1081,8 +1082,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 4}, std::vector{1, 3, 2, 4, 1, 3, 3, 2}), reference_tests::Tensor(ET2, {}, std::vector{1}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 1}, std::vector{4, 3}), reference_tests::Tensor(ET_OUT, {2, 1}, std::vector{3, 1}), 0, @@ -1091,8 +1092,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {2, 4}, std::vector{1, 3, 2, 4, 1, 3, 3, 2}), reference_tests::Tensor(ET2, {}, std::vector{1}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 1}, std::vector{4, 3}), reference_tests::Tensor(ET_OUT, {2, 1}, std::vector{3, 1}), 1, @@ -1101,8 +1102,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{4}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {4, 3}, std::vector{3, 1, 4, 6, 2, 5, 9, 8, 7, 12, 11, 10}), reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{3, 2, 1, 2, 0, 2, 1, 1, 3, 0, 3, 0}), 0, @@ -1111,8 +1112,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{4}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {4, 3}, std::vector{3, 1, 4, 6, 2, 5, 9, 8, 7, 12, 11, 10}), reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{3, 2, 1, 2, 0, 2, 1, 1, 3, 0, 3, 0}), 1, @@ -1121,8 +1122,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3}, std::vector{3, 1, 4, 6, 2, 5}), reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{3, 2, 1, 2, 0, 2}), 0, @@ -1131,8 +1132,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3}, std::vector{3, 1, 4, 6, 2, 5}), reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{3, 2, 1, 2, 0, 2}), 1, @@ -1141,8 +1142,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::NONE, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::NONE, reference_tests::Tensor(ET, {1, 3}, std::vector{3, 1, 4}), reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{3, 2, 1}), 0, @@ -1151,8 +1152,8 @@ std::vector generateParams1dMaxMin() { TopKParams(reference_tests::Tensor(ET, {4, 3}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{1}), 0, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::NONE, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::NONE, reference_tests::Tensor(ET, {1, 3}, std::vector{3, 1, 4}), reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{3, 2, 1}), 1, @@ -1190,9 +1191,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, class ReferenceTopKTestInt64 : public ReferenceTopKTest1dMaxMin { private: static std::shared_ptr CreateFunction(const TopKParams& params, size_t out_idx) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort, element::i64); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort, element::i64); const auto f = std::make_shared(OutputVector{B->output(out_idx)}, ParameterVector{A}); return f; } @@ -1211,8 +1212,8 @@ std::vector generateParamsInt64() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{3}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3, 2}, std::vector{10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1}), reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0}), 0, @@ -1220,8 +1221,8 @@ std::vector generateParamsInt64() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{3}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3, 2}, std::vector{10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1}), reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0}), 1, @@ -1258,9 +1259,9 @@ class ReferenceTopKTestSingleOutput : public ReferenceTopKTest { private: static std::shared_ptr CreateFunction(const TopKParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(OutputVector{B->output(1)}, ParameterVector{A}); return f; } @@ -1279,8 +1280,8 @@ std::vector generateParamsSingleOutput() { TopKParams(reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 2, 2}, std::vector{}), reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{2, 0, 1, 2, 1, 0, 0, 1}), 0, @@ -1318,36 +1319,36 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, ReferenceTopKTest::getTestCaseName); TEST(ReferenceTopKTestInvalid, topk_v1_invalid_strings) { - const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); - const auto k = opset1::Constant::create(element::i64, Shape{}, {1}); - EXPECT_THROW(opset1::TopK(data, k, 0, "max", "invalid_mode"), ov::AssertFailure); - EXPECT_THROW(opset1::TopK(data, k, 0, "invalid_sort", "index"), ov::AssertFailure); + const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); + const auto k = op::v0::Constant::create(element::i64, Shape{}, {1}); + EXPECT_THROW(op::v1::TopK(data, k, 0, "max", "invalid_mode"), ov::AssertFailure); + EXPECT_THROW(op::v1::TopK(data, k, 0, "invalid_sort", "index"), ov::AssertFailure); } TEST(ReferenceTopKTestInvalid, topk_v1_invalid_k) { - const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); - const auto k_non_scalar = opset1::Constant::create(element::i64, Shape{2}, {1, 2}); - EXPECT_THROW(opset1::TopK(data, k_non_scalar, 0, "max", "index"), ov::NodeValidationFailure); - const auto k_float = opset1::Constant::create(element::f32, Shape{}, {1.0f}); - EXPECT_THROW(opset1::TopK(data, k_float, 0, "max", "index"), ov::NodeValidationFailure); - const auto k_negative = opset1::Constant::create(element::i8, Shape{}, {-1}); - EXPECT_THROW(opset1::TopK(data, k_negative, 0, "max", "index"), ov::NodeValidationFailure); + const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); + const auto k_non_scalar = op::v0::Constant::create(element::i64, Shape{2}, {1, 2}); + EXPECT_THROW(op::v1::TopK(data, k_non_scalar, 0, "max", "index"), ov::NodeValidationFailure); + const auto k_float = op::v0::Constant::create(element::f32, Shape{}, {1.0f}); + EXPECT_THROW(op::v1::TopK(data, k_float, 0, "max", "index"), ov::NodeValidationFailure); + const auto k_negative = op::v0::Constant::create(element::i8, Shape{}, {-1}); + EXPECT_THROW(op::v1::TopK(data, k_negative, 0, "max", "index"), ov::NodeValidationFailure); } class ReferenceTopKTestResnet50V3 : public ReferenceTopKTestResnet50 { private: static std::shared_ptr CreateFunction(const TopKParamsResnet50& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto B = std::make_shared(A, - opset1::Constant::create(element::i64, {}, {5}), + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto B = std::make_shared(A, + op::v0::Constant::create(element::i64, {}, {5}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES); - const auto C = std::make_shared(A, - opset1::Constant::create(element::i64, {}, {1}), + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES); + const auto C = std::make_shared(A, + op::v0::Constant::create(element::i64, {}, {1}), 1, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES); + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES); const auto out5_value = B->output(0); const auto out5_index = B->output(1); @@ -1371,9 +1372,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, class ReferenceTopKTestMaxMinSortV3 : public ReferenceTopKTestMaxMinSort { private: static std::shared_ptr CreateFunction(const TopKParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(B->outputs(), ParameterVector{A}); return f; } @@ -1391,9 +1392,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, class ReferenceTopKTestBackendV3 : public ReferenceTopKTestBackend { private: static std::shared_ptr CreateFunction(const TopKParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(B->outputs(), ParameterVector{A}); return f; } @@ -1411,9 +1412,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, class ReferenceTopKTest1dMaxMinV3 : public ReferenceTopKTest1dMaxMin { private: static std::shared_ptr CreateFunction(const TopKParams& params, size_t out_idx) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(OutputVector{B->output(out_idx)}, ParameterVector{A}); return f; } @@ -1431,9 +1432,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, class ReferenceTopKTestInt64V3 : public ReferenceTopKTestInt64 { private: static std::shared_ptr CreateFunction(const TopKParams& params, size_t out_idx) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort, element::i64); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort, element::i64); const auto f = std::make_shared(OutputVector{B->output(out_idx)}, ParameterVector{A}); return f; } @@ -1451,9 +1452,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, class ReferenceTopKTestSingleOutputV3 : public ReferenceTopKTestSingleOutput { private: static std::shared_ptr CreateFunction(const TopKParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset1::Constant::create(params.k.type, params.k.shape, params.k.data.data()); - const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto B = std::make_shared(A, k, params.axis, params.mode, params.sort); const auto f = std::make_shared(OutputVector{B->output(1)}, ParameterVector{A}); return f; } @@ -1469,20 +1470,20 @@ INSTANTIATE_TEST_SUITE_P(smoke_TopK_With_Hardcoded_Refs, ReferenceTopKTestSingleOutputV3::getTestCaseName); TEST(ReferenceTopKTestInvalidV3, topk_v3_invalid_strings) { - const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); - const auto k = opset1::Constant::create(element::i64, Shape{}, {1}); - EXPECT_THROW(opset3::TopK(data, k, 0, "max", "invalid_mode"), ov::AssertFailure); - EXPECT_THROW(opset3::TopK(data, k, 0, "invalid_sort", "index"), ov::AssertFailure); + const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); + const auto k = op::v0::Constant::create(element::i64, Shape{}, {1}); + EXPECT_THROW(op::v3::TopK(data, k, 0, "max", "invalid_mode"), ov::AssertFailure); + EXPECT_THROW(op::v3::TopK(data, k, 0, "invalid_sort", "index"), ov::AssertFailure); } TEST(ReferenceTopKTestInvalidV3, topk_v3_invalid_k) { - const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); - const auto k_non_scalar = opset1::Constant::create(element::i64, Shape{2}, {1, 2}); - EXPECT_THROW(opset3::TopK(data, k_non_scalar, 0, "max", "index"), ov::NodeValidationFailure); - const auto k_float = opset1::Constant::create(element::f32, Shape{}, {1.0f}); - EXPECT_THROW(opset3::TopK(data, k_float, 0, "max", "index"), ov::NodeValidationFailure); - const auto k_negative = opset1::Constant::create(element::i8, Shape{}, {-1}); - EXPECT_THROW(opset3::TopK(data, k_negative, 0, "max", "index"), ov::NodeValidationFailure); + const auto data = std::make_shared(element::f32, Shape{1, 2, 3}); + const auto k_non_scalar = op::v0::Constant::create(element::i64, Shape{2}, {1, 2}); + EXPECT_THROW(op::v3::TopK(data, k_non_scalar, 0, "max", "index"), ov::NodeValidationFailure); + const auto k_float = op::v0::Constant::create(element::f32, Shape{}, {1.0f}); + EXPECT_THROW(op::v3::TopK(data, k_float, 0, "max", "index"), ov::NodeValidationFailure); + const auto k_negative = op::v0::Constant::create(element::i8, Shape{}, {-1}); + EXPECT_THROW(op::v3::TopK(data, k_negative, 0, "max", "index"), ov::NodeValidationFailure); } class ReferenceTopKv11StableTest : public ReferenceTopKTest { @@ -1502,12 +1503,12 @@ class ReferenceTopKv11StableTest : public ReferenceTopKTest { private: static std::shared_ptr CreateFunction(const TopKParams& params) { - const auto A = std::make_shared(params.A.type, params.A.shape); - const auto k = opset11::Constant::create(params.k.type, params.k.shape, params.k.data.data()); + const auto A = std::make_shared(params.A.type, params.A.shape); + const auto k = op::v0::Constant::create(params.k.type, params.k.shape, params.k.data.data()); const auto topk_stable = - std::make_shared(A, k, params.axis, params.mode, params.sort, params.result1.type, true); + std::make_shared(A, k, params.axis, params.mode, params.sort, params.result1.type, true); const auto topk_unstable = - std::make_shared(A, k, params.axis, params.mode, params.sort, params.result1.type, false); + std::make_shared(A, k, params.axis, params.mode, params.sort, params.result1.type, false); return std::make_shared( OutputVector{topk_stable->output(0), topk_stable->output(1), topk_unstable->output(0)}, @@ -1528,8 +1529,8 @@ std::vector generateParamsForStableTest() { TopKParams(reference_tests::Tensor(ET, {2, 7}, std::vector{5, 4, 3, 1, 7, 1, 3, 2, 1, 2, 5, 1, 7, 3}), reference_tests::Tensor(ET2, {}, std::vector{3}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 3}, std::vector{1, 1, 3, 1, 1, 2}), reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{3, 5, 2, 1, 4, 0}), 0, @@ -1541,8 +1542,8 @@ std::vector generateParamsForStableTest() { }), reference_tests::Tensor(ET2, {}, std::vector{4}), 0, - opset1::TopK::Mode::MAX, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MAX, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {4, 3}, std::vector{8, 9, 5, 7, 8, 4, 7, 7, 3, 5, 7, 2}), reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{5, 1, 4, 1, 3, 5, 4, 0, 6, 0, 2, 2}), 0, @@ -1552,8 +1553,8 @@ std::vector generateParamsForStableTest() { std::vector{1, 3, 3, 1, 2, 4, 2, 2, 3, 7, 7, 1, 7, 9, 7, 5, 7, 7}), reference_tests::Tensor(ET2, {}, std::vector{2}), 1, - opset1::TopK::Mode::MIN, - opset1::TopK::SortType::SORT_VALUES, + op::v1::TopK::Mode::MIN, + op::v1::TopK::SortType::SORT_VALUES, reference_tests::Tensor(ET, {2, 2, 3}, std::vector{1, 2, 3, 1, 2, 3, 5, 7, 1, 7, 7, 7}), reference_tests::Tensor(ET_OUT, {2, 2, 3}, std::vector{0, 1, 0, 1, 2, 2, 2, 0, 0, 0, 2, 1}), 0, diff --git a/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/ov_exec_net_import_export.cpp b/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/ov_exec_net_import_export.cpp index 391c2919c26e74..388150d628600b 100644 --- a/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/ov_exec_net_import_export.cpp +++ b/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/ov_exec_net_import_export.cpp @@ -1,9 +1,8 @@ // Copyright (C) 2018-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include - #include "behavior/compiled_model/import_export.hpp" +#include "common_test_utils/test_constants.hpp" #include "ie_plugin_config.hpp" using namespace ov::test::behavior; diff --git a/src/plugins/template/tests/functional/subgraph_reference/preprocess_opencv.cpp b/src/plugins/template/tests/functional/subgraph_reference/preprocess_opencv.cpp index 32b4097eb58550..a19631713ad3c1 100644 --- a/src/plugins/template/tests/functional/subgraph_reference/preprocess_opencv.cpp +++ b/src/plugins/template/tests/functional/subgraph_reference/preprocess_opencv.cpp @@ -8,13 +8,13 @@ # include # include -# include -# include -# include -# include # include "base_reference_test.hpp" +# include "openvino/core/preprocess/pre_post_process.hpp" # include "ov_models/builders.hpp" +# include "shared_test_classes/base/layer_test_utils.hpp" +# include "shared_test_classes/single_layer/convert_color_i420.hpp" +# include "shared_test_classes/single_layer/convert_color_nv12.hpp" using namespace ov; using namespace ov::preprocess; diff --git a/src/plugins/template/tests/functional/transformations/disable_transformations_test.cpp b/src/plugins/template/tests/functional/transformations/disable_transformations_test.cpp index 6ad9c5c024f18a..7d5f878869f4ec 100644 --- a/src/plugins/template/tests/functional/transformations/disable_transformations_test.cpp +++ b/src/plugins/template/tests/functional/transformations/disable_transformations_test.cpp @@ -11,21 +11,24 @@ #include "common_test_utils/graph_comparator.hpp" #include "common_test_utils/ov_test_utils.hpp" #include "functional_test_utils/ov_plugin_cache.hpp" -#include "openvino/opsets/opset11.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/convert.hpp" +#include "openvino/op/convert_like.hpp" +#include "openvino/op/parameter.hpp" #include "template/properties.hpp" TEST(DisableTransformationsTests, TestTemplatePluginProperty) { std::shared_ptr m(nullptr), m_ref(nullptr); { - auto data = std::make_shared(ov::element::f32, ov::Shape{3, 1, 2}); - auto like = ov::opset11::Constant::create(ov::element::i32, ov::Shape{1}, {1}); - auto cvtlike = std::make_shared(data, like); + auto data = std::make_shared(ov::element::f32, ov::Shape{3, 1, 2}); + auto like = ov::op::v0::Constant::create(ov::element::i32, ov::Shape{1}, {1}); + auto cvtlike = std::make_shared(data, like); m = std::make_shared(ov::NodeVector{cvtlike}, ov::ParameterVector{data}); } { - auto data = std::make_shared(ov::element::f32, ov::Shape{3, 1, 2}); - auto cvt = std::make_shared(data, ov::element::i32); + auto data = std::make_shared(ov::element::f32, ov::Shape{3, 1, 2}); + auto cvt = std::make_shared(data, ov::element::i32); m_ref = std::make_shared(ov::NodeVector{cvt}, ov::ParameterVector{data}); }