diff --git a/src/plugins/template/backend/ops/convert.cpp b/src/plugins/template/backend/ops/convert.cpp index 4563e0081fd4bb..5a2b4ea79c0c7d 100644 --- a/src/plugins/template/backend/ops/convert.cpp +++ b/src/plugins/template/backend/ops/convert.cpp @@ -16,10 +16,9 @@ inline void evaluate(const std::shared_ptr& op, outputs[0].set_shape(inputs[0].get_shape()); size_t element_count = ov::shape_size(outputs[0].get_shape()); - if (((ti == ngraph::element::u1) || (to == ngraph::element::u1)) || - ((ti == ngraph::element::u4) || (to == ngraph::element::u4)) || - ((ti == ngraph::element::i4) || (to == ngraph::element::i4)) || - ((ti == ngraph::element::nf4) || (to == ngraph::element::nf4))) { + if (((ti == ov::element::u1) || (to == ov::element::u1)) || ((ti == ov::element::u4) || (to == ov::element::u4)) || + ((ti == ov::element::i4) || (to == ov::element::i4)) || + ((ti == ov::element::nf4) || (to == ov::element::nf4))) { ov::reference::detail::lp_convert(inputs[0].data(), outputs[0].data(), element_count, ti, to); } else { ov::reference::convert(inputs[0].data(), outputs[0].data(), element_count); 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 2e9747596965b6..d58da252eaff6b 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 @@ -13,7 +13,6 @@ #include "openvino/op/i420_to_rgb.hpp" using namespace ov; -using namespace InferenceEngine; using namespace reference_tests; class ReferenceConvertColorI420LayerTest : public testing::Test, public CommonReferenceTest { 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 77781766478765..902d72b96ca7fc 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 @@ -13,7 +13,6 @@ #include "openvino/op/nv12_to_rgb.hpp" using namespace ov; -using namespace InferenceEngine; using namespace reference_tests; class ReferenceConvertColorNV12LayerTest : public testing::Test, public CommonReferenceTest { 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 4726ccdffd6a51..a9fc92d6df87fc 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 @@ -9,7 +9,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; struct EmbeddingSegmentsSumParams { template 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 9967e99b8e2317..ed12500db0c50d 100644 --- a/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp @@ -9,7 +9,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; struct EmbeddingBagOffsetsSumParams { template 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 ea9dfe34decb22..f2bb7946fb9603 100644 --- a/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp @@ -9,7 +9,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; struct EmbeddingBagPackedSumParams { template diff --git a/src/plugins/template/tests/functional/op_reference/exp.cpp b/src/plugins/template/tests/functional/op_reference/exp.cpp index 4e06b1dc2a8be5..5267c473927e30 100644 --- a/src/plugins/template/tests/functional/op_reference/exp.cpp +++ b/src/plugins/template/tests/functional/op_reference/exp.cpp @@ -11,7 +11,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; namespace { struct ExpParams { diff --git a/src/plugins/template/tests/functional/op_reference/gelu.cpp b/src/plugins/template/tests/functional/op_reference/gelu.cpp index 08624796c06658..2f87fbe1832b41 100644 --- a/src/plugins/template/tests/functional/op_reference/gelu.cpp +++ b/src/plugins/template/tests/functional/op_reference/gelu.cpp @@ -10,7 +10,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; namespace { struct GeluParams { diff --git a/src/plugins/template/tests/functional/op_reference/hswish.cpp b/src/plugins/template/tests/functional/op_reference/hswish.cpp index 0da8582df0bb3b..8deb3553df3f55 100644 --- a/src/plugins/template/tests/functional/op_reference/hswish.cpp +++ b/src/plugins/template/tests/functional/op_reference/hswish.cpp @@ -10,7 +10,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; namespace { struct HSwishParams { diff --git a/src/plugins/template/tests/functional/op_reference/if.cpp b/src/plugins/template/tests/functional/op_reference/if.cpp index eef66bb3e5ad61..5f51a03f02d427 100644 --- a/src/plugins/template/tests/functional/op_reference/if.cpp +++ b/src/plugins/template/tests/functional/op_reference/if.cpp @@ -13,7 +13,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; struct IfFunctionalBase { virtual std::shared_ptr create_function(const std::vector& if_inputs, diff --git a/src/plugins/template/tests/functional/op_reference/log_softmax.cpp b/src/plugins/template/tests/functional/op_reference/log_softmax.cpp index 1d834f6ff71cfb..0b929c418612a1 100644 --- a/src/plugins/template/tests/functional/op_reference/log_softmax.cpp +++ b/src/plugins/template/tests/functional/op_reference/log_softmax.cpp @@ -10,7 +10,6 @@ using namespace reference_tests; using namespace ov; -using namespace InferenceEngine; namespace { struct LogSoftmaxParams { diff --git a/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp b/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp index 6f1c98f11bc00c..2e525c84cc60d0 100644 --- a/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp +++ b/src/plugins/template/tests/functional/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp @@ -9,8 +9,6 @@ using namespace ov::test::behavior; -using namespace InferenceEngine::PluginConfigParams; - namespace { // diff --git a/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp b/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp index f1d1b2c31e2ec5..43f44cd68c8587 100644 --- a/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp +++ b/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp @@ -2,20 +2,20 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/convolution.hpp" +#include "single_op_tests/convolution.hpp" #include #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using ov::test::ConvolutionLayerTest; namespace { // ! [test_convolution:declare_parameters] -const std::vector netPrecisions = { - InferenceEngine::Precision::FP32, - InferenceEngine::Precision::FP16, +const std::vector model_types = { + ov::element::f32, + ov::element::f16, }; /* ============= 2D Convolution ============= */ @@ -46,30 +46,24 @@ const auto conv2DParams_AutoPadValid = ::testing::Combine(::testing::ValuesIn(ke ::testing::Values(ov::op::PadType::VALID)); // ! [test_convolution:instantiate] -INSTANTIATE_TEST_SUITE_P(Convolution2D_ExplicitPadding, - ConvolutionLayerTest, - ::testing::Combine(conv2DParams_ExplicitPadding, - ::testing::ValuesIn(netPrecisions), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(std::vector({1, 3, 30, 30})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), - ConvolutionLayerTest::getTestCaseName); +INSTANTIATE_TEST_SUITE_P( + Convolution2D_ExplicitPadding, + ConvolutionLayerTest, + ::testing::Combine(conv2DParams_ExplicitPadding, + ::testing::ValuesIn(model_types), + ::testing::Values(ov::test::static_shapes_to_test_representation({{1, 3, 30, 30}})), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), + ConvolutionLayerTest::getTestCaseName); // ! [test_convolution:instantiate] -INSTANTIATE_TEST_SUITE_P(Convolution2D_AutoPadValid, - ConvolutionLayerTest, - ::testing::Combine(conv2DParams_AutoPadValid, - ::testing::ValuesIn(netPrecisions), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(std::vector({1, 3, 30, 30})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), - ConvolutionLayerTest::getTestCaseName); +INSTANTIATE_TEST_SUITE_P( + Convolution2D_AutoPadValid, + ConvolutionLayerTest, + ::testing::Combine(conv2DParams_AutoPadValid, + ::testing::ValuesIn(model_types), + ::testing::Values(ov::test::static_shapes_to_test_representation({{1, 3, 30, 30}})), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), + ConvolutionLayerTest::getTestCaseName); /* ============= 3D Convolution ============= */ @@ -95,28 +89,22 @@ const auto conv3DParams_AutoPadValid = ::testing::Combine(::testing::ValuesIn(ke ::testing::Values(5), ::testing::Values(ov::op::PadType::VALID)); -INSTANTIATE_TEST_SUITE_P(smoke_Convolution3D_ExplicitPadding, - ConvolutionLayerTest, - ::testing::Combine(conv3DParams_ExplicitPadding, - ::testing::ValuesIn(netPrecisions), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(std::vector({1, 3, 10, 10, 10})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), - ConvolutionLayerTest::getTestCaseName); - -INSTANTIATE_TEST_SUITE_P(nightly_Convolution3D_AutoPadValid, - ConvolutionLayerTest, - ::testing::Combine(conv3DParams_AutoPadValid, - ::testing::ValuesIn(netPrecisions), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(std::vector({1, 3, 10, 10, 10})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), - ConvolutionLayerTest::getTestCaseName); +INSTANTIATE_TEST_SUITE_P( + smoke_Convolution3D_ExplicitPadding, + ConvolutionLayerTest, + ::testing::Combine(conv3DParams_ExplicitPadding, + ::testing::ValuesIn(model_types), + ::testing::Values(ov::test::static_shapes_to_test_representation({{1, 3, 10, 10, 10}})), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), + ConvolutionLayerTest::getTestCaseName); + +INSTANTIATE_TEST_SUITE_P( + nightly_Convolution3D_AutoPadValid, + ConvolutionLayerTest, + ::testing::Combine(conv3DParams_AutoPadValid, + ::testing::ValuesIn(model_types), + ::testing::Values(ov::test::static_shapes_to_test_representation({{1, 3, 10, 10, 10}})), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), + ConvolutionLayerTest::getTestCaseName); } // namespace diff --git a/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp b/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp index 576490fa79d8de..f6c17028cafd0f 100644 --- a/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp +++ b/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp @@ -2,58 +2,43 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/reshape.hpp" +#include "single_op_tests/reshape.hpp" #include #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using ov::test::ReshapeLayerTest; namespace { -const std::vector netPrecisions = { - InferenceEngine::Precision::FP32, +const std::vector model_types = { + ov::element::f32, }; INSTANTIATE_TEST_SUITE_P(smoke_ReshapeCheckDynBatch, ReshapeLayerTest, ::testing::Combine(::testing::Values(true), - ::testing::ValuesIn(netPrecisions), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(model_types), ::testing::Values(std::vector({30, 30, 30, 30})), ::testing::Values(std::vector({30, 30, 30, 30})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE), - ::testing::Values(std::map({}))), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), ReshapeLayerTest::getTestCaseName); INSTANTIATE_TEST_SUITE_P(smoke_ReshapeCheck, ReshapeLayerTest, ::testing::Combine(::testing::Values(true), - ::testing::ValuesIn(netPrecisions), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(model_types), ::testing::Values(std::vector({10, 10, 10, 10})), ::testing::Values(std::vector({10, 0, 100})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE), - ::testing::Values(std::map({}))), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), ReshapeLayerTest::getTestCaseName); INSTANTIATE_TEST_SUITE_P(smoke_ReshapeCheckNegative, ReshapeLayerTest, ::testing::Combine(::testing::Values(true), - ::testing::ValuesIn(netPrecisions), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(model_types), ::testing::Values(std::vector({10, 10, 10, 10})), ::testing::Values(std::vector({10, -1, 100})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE), - ::testing::Values(std::map({}))), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), ReshapeLayerTest::getTestCaseName); } // namespace diff --git a/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/split.cpp b/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/split.cpp index 064f1b5150274f..e2d84bad5e7f0b 100644 --- a/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/split.cpp +++ b/src/plugins/template/tests/functional/shared_tests_instances/single_layer_tests/split.cpp @@ -2,28 +2,25 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/split.hpp" +#include "single_op_tests/split.hpp" #include #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using ov::test::SplitLayerTest; namespace { -INSTANTIATE_TEST_SUITE_P(smoke_NumSplitsCheck, - SplitLayerTest, - ::testing::Combine(::testing::Values(1, 2, 3, 5, 6, 10, 30), - ::testing::Values(0, 1, 2, 3), - ::testing::Values(InferenceEngine::Precision::FP32), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(std::vector({30, 30, 30, 30})), - ::testing::Values(std::vector({})), - ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), - SplitLayerTest::getTestCaseName); +INSTANTIATE_TEST_SUITE_P( + smoke_NumSplitsCheck, + SplitLayerTest, + ::testing::Combine(::testing::Values(1, 2, 3, 5, 6, 10, 30), + ::testing::Values(0, 1, 2, 3), + ::testing::Values(ov::element::f32), + ::testing::Values(ov::test::static_shapes_to_test_representation({{30, 30, 30, 30}})), + ::testing::Values(std::vector({})), + ::testing::Values(ov::test::utils::DEVICE_TEMPLATE)), + SplitLayerTest::getTestCaseName); } // namespace diff --git a/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp b/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp index cdd0cf5c2318dc..865d8c3d92b2f9 100644 --- a/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp +++ b/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp @@ -351,7 +351,6 @@ static RefPreprocessParams resize_to_network_width_height() { return f; }; - auto result = std::make_shared(); // clang-format off std::vector input = {0., 1., 2., 3., 4., 1., 2., 3., 4., 5., @@ -380,7 +379,6 @@ static RefPreprocessParams resize_to_specified_width_height() { return f; }; - auto result = std::make_shared(); // clang-format off std::vector input = {0., 1., 2., 3., 4., 1., 2., 3., 4., 5., @@ -747,7 +745,6 @@ static RefPreprocessParams resize_and_convert_layout() { return f; }; - auto result = std::make_shared(); // clang-format off std::vector input = { 1., 1., 1., 1., // channel 1 @@ -857,7 +854,6 @@ static RefPreprocessParams convert_color_nv12_layout_resize() { return f; }; - auto result = std::make_shared(); // clang-format off auto input = std::vector {81, 81, 145, 145, // RRGG 81, 81, 145, 145, // RRGG