Moved migrated classes to ov::test namespace (#20226)

* Moved migrated classes to ov::test namespace

* Revert redundant changes

* Fixed build
This commit is contained in:
Ilya Churaev 2023-10-08 17:16:24 +04:00 committed by GitHub
parent ad41d0f52f
commit 51afe489aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 584 additions and 522 deletions

View File

@ -2,183 +2,195 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "subgraph_tests/conv_eltwise_fusion.hpp"
#include <vector>
#include "subgraph_tests/conv_eltwise_fusion.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace SubgraphTestsDefinitions;
namespace {
const std::vector<ngraph::element::Type> types{ngraph::element::f32, ngraph::element::f16};
const std::vector<ngraph::NodeTypeInfo> eltwise_types{ngraph::opset4::Multiply::get_type_info_static(),
/* ngraph::opset4::Add::get_type_info_static() */};
const std::vector<ov::element::Type> types{ov::element::f32, ov::element::f16};
const std::vector<ov::NodeTypeInfo> eltwise_types{ov::op::v1::Multiply::get_type_info_static(),
/* ov::opset4::Add::get_type_info_static() */};
INSTANTIATE_TEST_SUITE_P(smoke_Convolution_1D, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::Convolution::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 8, 64}),
::testing::Values(ngraph::Shape{64, 8, 1}),
::testing::Values(ngraph::Shape{64, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Convolution_1D,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::Convolution::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 8, 64}),
::testing::Values(ov::Shape{64, 8, 1}),
::testing::Values(ov::Shape{64, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolution_1D, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::GroupConvolution::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 12, 5}),
::testing::Values(ngraph::Shape{4, 5, 3, 2}),
::testing::Values(ngraph::Shape{20, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolution_1D,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::GroupConvolution::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 12, 5}),
::testing::Values(ov::Shape{4, 5, 3, 2}),
::testing::Values(ov::Shape{20, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_ConvolutionBackpropData_1D, ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(
::testing::Values(ngraph::opset4::ConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 12, 64}),
::testing::Values(ngraph::Shape{12, 20, 1}),
::testing::Values(ngraph::Shape{20, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_ConvolutionBackpropData_1D,
ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(::testing::Values(ov::op::v1::ConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 12, 64}),
::testing::Values(ov::Shape{12, 20, 1}),
::testing::Values(ov::Shape{20, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolutionBackpropData_1D, ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(
::testing::Values(ngraph::opset4::GroupConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 12, 64}),
::testing::Values(ngraph::Shape{4, 3, 5, 1}),
::testing::Values(ngraph::Shape{1, 20, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_GroupConvolutionBackpropData_1D,
ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(::testing::Values(ov::op::v1::GroupConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 12, 64}),
::testing::Values(ov::Shape{4, 3, 5, 1}),
::testing::Values(ov::Shape{1, 20, 1}),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
const std::vector<ngraph::Shape> const_shapes_2d{
{},
{1, 1},
{1, 1, 1},
{20, 1, 1},
{1, 1, 1, 1}
};
const std::vector<ov::Shape> const_shapes_2d{{}, {1, 1}, {1, 1, 1}, {20, 1, 1}, {1, 1, 1, 1}};
INSTANTIATE_TEST_SUITE_P(smoke_Convolution_2D, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::Convolution::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 3, 64, 64}),
::testing::Values(ngraph::Shape{20, 3, 1, 1}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Convolution_2D,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::Convolution::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 3, 64, 64}),
::testing::Values(ov::Shape{20, 3, 1, 1}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolution_2D, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::GroupConvolution::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 12, 64, 64}),
::testing::Values(ngraph::Shape{4, 5, 3, 1, 2}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolution_2D,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::GroupConvolution::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 12, 64, 64}),
::testing::Values(ov::Shape{4, 5, 3, 1, 2}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_ConvolutionBackpropData_2D, ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(
::testing::Values(ngraph::opset4::ConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 3, 64, 64}),
::testing::Values(ngraph::Shape{3, 20, 3, 3}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_ConvolutionBackpropData_2D,
ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(::testing::Values(ov::op::v1::ConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 3, 64, 64}),
::testing::Values(ov::Shape{3, 20, 3, 3}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolutionBackpropData_2D, ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(
::testing::Values(ngraph::opset4::GroupConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ngraph::Shape{1, 12, 64, 64}),
::testing::Values(ngraph::Shape{4, 3, 5, 1, 1}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_GroupConvolutionBackpropData_2D,
ConvEltwiseFusion,
::testing::Combine(
::testing::Combine(::testing::Values(ov::op::v1::GroupConvolutionBackpropData::get_type_info_static()),
::testing::ValuesIn(std::vector<size_t>{2, 3})),
::testing::ValuesIn(eltwise_types),
::testing::Values(false),
::testing::Values(ov::Shape{1, 12, 64, 64}),
::testing::Values(ov::Shape{4, 3, 5, 1, 1}),
::testing::ValuesIn(const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
const std::vector<ngraph::Shape> neg_const_shapes_2d{
{1, 1, 1, 1, 1}, /* Broadcast output */
{3}, {3, 1}, {3, 1, 1, 1}
};
const std::vector<ov::Shape> neg_const_shapes_2d{{1, 1, 1, 1, 1}, /* Broadcast output */
{3},
{3, 1},
{3, 1, 1, 1}};
INSTANTIATE_TEST_SUITE_P(smoke_Convolution_2D_Negative, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::Convolution::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ngraph::Shape{1, 3, 3, 3}),
::testing::Values(ngraph::Shape{3, 3, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Convolution_2D_Negative,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::Convolution::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ov::Shape{1, 3, 3, 3}),
::testing::Values(ov::Shape{3, 3, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolution_2D_Negative, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(
std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::GroupConvolution::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ngraph::Shape{1, 12, 3, 3}),
::testing::Values(ngraph::Shape{4, 5, 3, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolution_2D_Negative,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::GroupConvolution::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ov::Shape{1, 12, 3, 3}),
::testing::Values(ov::Shape{4, 5, 3, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_ConvolutionBackpropData_2D_Negative, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(
std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::ConvolutionBackpropData::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ngraph::Shape{1, 12, 3, 3}),
::testing::Values(ngraph::Shape{12, 3, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_ConvolutionBackpropData_2D_Negative,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::ConvolutionBackpropData::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ov::Shape{1, 12, 3, 3}),
::testing::Values(ov::Shape{12, 3, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolutionBackpropData_2D_Negative, ConvEltwiseFusion,
::testing::Combine(
::testing::Values(
std::tuple<ngraph::NodeTypeInfo, size_t>{ngraph::opset4::GroupConvolutionBackpropData::get_type_info_static(), 2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ngraph::Shape{1, 12, 3, 3}),
::testing::Values(ngraph::Shape{4, 3, 5, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolutionBackpropData_2D_Negative,
ConvEltwiseFusion,
::testing::Combine(::testing::Values(std::tuple<ov::NodeTypeInfo, size_t>{
ov::op::v1::GroupConvolutionBackpropData::get_type_info_static(),
2}),
::testing::ValuesIn(eltwise_types),
::testing::Values(true),
::testing::Values(ov::Shape{1, 12, 3, 3}),
::testing::Values(ov::Shape{4, 3, 5, 1, 1}),
::testing::ValuesIn(neg_const_shapes_2d),
::testing::ValuesIn(types),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ConvEltwiseFusion::getTestCaseName);
} // namespace

View File

@ -3,28 +3,31 @@
//
#include "subgraph_tests/parameter_result.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace SubgraphTestsDefinitions;
using namespace ov::test;
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_Check, ParameterResultSubgraphTestLegacyApi,
::testing::Combine(
::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {}}),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Check,
ParameterResultSubgraphTestLegacyApi,
::testing::Combine(::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {}}),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
const std::vector<ov::test::InputShape> inputShapes = {
ov::test::InputShape{{1, 3, 10, 10}, {{ 1, 3, 10, 10}, { 1, 3, 10, 10}}},
ov::test::InputShape{{-1, -1, -1, -1}, {{ 1, 3, 10, 10}, { 2, 5, 3, 10}, { 1, 3, 10, 10}, { 1, 3, 10, 10}}},
ov::test::InputShape{{{1, 10}, {1, 10}, {1, 10}, {1, 10}}, {{ 1, 3, 10, 10}, { 2, 5, 3, 10}, { 1, 3, 10, 10}, { 1, 3, 10, 10}}},
ov::test::InputShape{{1, 3, 10, 10}, {{1, 3, 10, 10}, {1, 3, 10, 10}}},
ov::test::InputShape{{-1, -1, -1, -1}, {{1, 3, 10, 10}, {2, 5, 3, 10}, {1, 3, 10, 10}, {1, 3, 10, 10}}},
ov::test::InputShape{{{1, 10}, {1, 10}, {1, 10}, {1, 10}},
{{1, 3, 10, 10}, {2, 5, 3, 10}, {1, 3, 10, 10}, {1, 3, 10, 10}}},
};
INSTANTIATE_TEST_SUITE_P(smoke_Check, ParameterResultSubgraphTest,
::testing::Combine(
::testing::ValuesIn(inputShapes),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Check,
ParameterResultSubgraphTest,
::testing::Combine(::testing::ValuesIn(inputShapes),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
} // namespace

View File

@ -2,14 +2,15 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/subgraph/preprocess.hpp"
using namespace SubgraphTestsDefinitions;
#include <vector>
INSTANTIATE_TEST_SUITE_P(smoke_PrePostProcess, PrePostProcessTest,
::testing::Combine(
::testing::ValuesIn(ov::builder::preprocess::generic_preprocess_functions()),
::testing::Values(ov::test::utils::DEVICE_CPU)),
PrePostProcessTest::getTestCaseName);
using namespace ov::test;
INSTANTIATE_TEST_SUITE_P(
smoke_PrePostProcess,
PrePostProcessTest,
::testing::Combine(::testing::ValuesIn(ov::builder::preprocess::generic_preprocess_functions()),
::testing::Values(ov::test::utils::DEVICE_CPU)),
PrePostProcessTest::getTestCaseName);

View File

@ -4,121 +4,81 @@
#include "shared_test_classes/subgraph/simple_if.hpp"
using namespace SubgraphTestsDefinitions;
using namespace ov::test;
namespace {
std::vector<std::vector<ov::test::InputShape>> inputShapes = {
{
{{}, {{5, 7}}},
{{}, {{5, 7}}},
},
{
{{}, {{30, 20, 10}}},
{{}, {{30, 20, 10}}}
},
{
{
{-1, -1, -1},
{{10, 20, 5}, {10, 0, 5}, {1, 5, 5}}
},
{
{-1, -1, -1},
{{10, 20, 5}, {10, 0, 5}, {1, 1, 5}}
}
},
{
{
{-1, 5, -1},
{{10, 5, 10}, {2, 5, 5}, {1, 5, 5}}
},
{
{-1, 5, -1},
{{1, 5, 1}, {2, 5, 5}, {5, 5, 5}}
}
},
{
{
{{1, 10}, {1, 10}, {1, 10}},
{{2, 5, 10}, {2, 5, 1}, {1, 5, 5}}
},
{
{{1, 10}, {1, 10}, {1, 10}},
{{2, 5, 10}, {2, 1, 5}, {5, 5, 5}}
}
},
{
{{}, {{5, 7}}},
{{}, {{5, 7}}},
},
{{{}, {{30, 20, 10}}}, {{}, {{30, 20, 10}}}},
{{{-1, -1, -1}, {{10, 20, 5}, {10, 0, 5}, {1, 5, 5}}}, {{-1, -1, -1}, {{10, 20, 5}, {10, 0, 5}, {1, 1, 5}}}},
{{{-1, 5, -1}, {{10, 5, 10}, {2, 5, 5}, {1, 5, 5}}}, {{-1, 5, -1}, {{1, 5, 1}, {2, 5, 5}, {5, 5, 5}}}},
{{{{1, 10}, {1, 10}, {1, 10}}, {{2, 5, 10}, {2, 5, 1}, {1, 5, 5}}},
{{{1, 10}, {1, 10}, {1, 10}}, {{2, 5, 10}, {2, 1, 5}, {5, 5, 5}}}},
};
const std::vector<ov::test::ElementType> inTypes = {
ov::test::ElementType::f32,
ov::test::ElementType::bf16,
ov::test::ElementType::i8
};
const std::vector<ov::test::ElementType> inTypes = {ov::test::ElementType::f32,
ov::test::ElementType::bf16,
ov::test::ElementType::i8};
std::vector<bool> conditions = {true, false};
INSTANTIATE_TEST_SUITE_P(smoke_If, SimpleIfTest,
::testing::Combine(
::testing::ValuesIn(inputShapes),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIfTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_If,
SimpleIfTest,
::testing::Combine(::testing::ValuesIn(inputShapes),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIfTest::getTestCaseName);
TEST_P(SimpleIfTest, CompareWithRefs) {
run();
};
INSTANTIATE_TEST_SUITE_P(smoke_If, SimpleIf2OutTest,
::testing::Combine(
::testing::ValuesIn(inputShapes),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIf2OutTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_If,
SimpleIf2OutTest,
::testing::Combine(::testing::ValuesIn(inputShapes),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIf2OutTest::getTestCaseName);
TEST_P(SimpleIf2OutTest, CompareWithRefs) {
run();
};
INSTANTIATE_TEST_SUITE_P(smoke_If, SimpleIfNotConstConditionTest,
::testing::Combine(
::testing::ValuesIn(inputShapes),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIfNotConstConditionTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_If,
SimpleIfNotConstConditionTest,
::testing::Combine(::testing::ValuesIn(inputShapes),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIfNotConstConditionTest::getTestCaseName);
TEST_P(SimpleIfNotConstConditionTest, CompareWithRefs) {
run();
};
std::vector<std::vector<ov::test::InputShape>> inputShapes_2 = {
{
{
{-1, -1, -1},
{{10, 20, 5}, {10, 20, 5}, {1, 5, 5}}
},
},
{
{
{-1, 5, -1},
{{10, 5, 10}, {2, 5, 5}, {1, 5, 5}}
},
},
{
{
{{0, 10}, {0, 10}, {0, 10}},
{{2, 5, 10}, {2, 5, 1}, {2, 5, 0}, {1, 5, 5}}
},
},
{
{{-1, -1, -1}, {{10, 20, 5}, {10, 20, 5}, {1, 5, 5}}},
},
{
{{-1, 5, -1}, {{10, 5, 10}, {2, 5, 5}, {1, 5, 5}}},
},
{
{{{0, 10}, {0, 10}, {0, 10}}, {{2, 5, 10}, {2, 5, 1}, {2, 5, 0}, {1, 5, 5}}},
},
};
INSTANTIATE_TEST_SUITE_P(smoke_If, SimpleIfNotConstConditionAndInternalDynamismTest,
::testing::Combine(
::testing::ValuesIn(inputShapes_2),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
INSTANTIATE_TEST_SUITE_P(smoke_If,
SimpleIfNotConstConditionAndInternalDynamismTest,
::testing::Combine(::testing::ValuesIn(inputShapes_2),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIfNotConstConditionTest::getTestCaseName);
TEST_P(SimpleIfNotConstConditionAndInternalDynamismTest, CompareWithRefs) {
@ -126,51 +86,43 @@ TEST_P(SimpleIfNotConstConditionAndInternalDynamismTest, CompareWithRefs) {
};
std::vector<std::vector<ov::test::InputShape>> inputShapes_3 = {
{
{
{-1, 2, -1},
{{1, 2, 0}, {2, 2, 5}}
},
},
{
{
{{0, 10}, {0, 10}, {0, 10}},
{{2, 5, 10}, {2, 0, 0}}
},
},
{
{{-1, 2, -1}, {{1, 2, 0}, {2, 2, 5}}},
},
{
{{{0, 10}, {0, 10}, {0, 10}}, {{2, 5, 10}, {2, 0, 0}}},
},
};
INSTANTIATE_TEST_SUITE_P(smoke_If, SimpleIfNotConstConditionAndDimsIncreaseTest,
::testing::Combine(
::testing::ValuesIn(inputShapes_3),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
INSTANTIATE_TEST_SUITE_P(smoke_If,
SimpleIfNotConstConditionAndDimsIncreaseTest,
::testing::Combine(::testing::ValuesIn(inputShapes_3),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIfNotConstConditionTest::getTestCaseName);
TEST_P(SimpleIfNotConstConditionAndDimsIncreaseTest, CompareWithRefs) {
run();
};
// the axis of split in test suit "SimpleIfNotConstConditionUnusedOutputPortsTest" is hardcoded as 1, so shape[axis] should be static
// the axis of split in test suit "SimpleIfNotConstConditionUnusedOutputPortsTest" is hardcoded as 1, so shape[axis]
// should be static
std::vector<std::vector<ov::test::InputShape>> inputShapes_4 = {
{
{{}, {{5, 7}}},
},
{
{
{-1, 5, -1},
{{10, 5, 10}, {2, 5, 5}, {1, 5, 5}}
},
},
{
{{}, {{5, 7}}},
},
{
{{-1, 5, -1}, {{10, 5, 10}, {2, 5, 5}, {1, 5, 5}}},
},
};
INSTANTIATE_TEST_SUITE_P(smoke_If, SimpleIfNotConstConditionUnusedOutputPortsTest,
::testing::Combine(
::testing::ValuesIn(inputShapes_4),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
INSTANTIATE_TEST_SUITE_P(smoke_If,
SimpleIfNotConstConditionUnusedOutputPortsTest,
::testing::Combine(::testing::ValuesIn(inputShapes_4),
::testing::ValuesIn(inTypes),
::testing::ValuesIn(conditions),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SimpleIfNotConstConditionUnusedOutputPortsTest::getTestCaseName);
TEST_P(SimpleIfNotConstConditionUnusedOutputPortsTest, CompareWithRefs) {

View File

@ -2,21 +2,21 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "subgraph_tests/split_concat_memory.hpp"
using namespace ov::test::subgraph;
#include <vector>
using namespace ov::test;
namespace {
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32,
ov::element::i32,
ov::element::f16,
ov::element::i16,
ov::element::u8,
ov::element::i8,
ov::element::f32,
ov::element::i32,
ov::element::f16,
ov::element::i16,
ov::element::u8,
ov::element::i8,
};
const std::vector<ov::Shape> shapes = {
@ -26,11 +26,11 @@ const std::vector<ov::Shape> shapes = {
{3, 8},
};
INSTANTIATE_TEST_SUITE_P(smoke_CPU, SplitConcatMemory,
::testing::Combine(
::testing::ValuesIn(shapes),
::testing::ValuesIn(netPrecisions),
::testing::Values(1),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SplitConcatMemory::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_CPU,
SplitConcatMemory,
::testing::Combine(::testing::ValuesIn(shapes),
::testing::ValuesIn(netPrecisions),
::testing::Values(1),
::testing::Values(ov::test::utils::DEVICE_CPU)),
SplitConcatMemory::getTestCaseName);
} // namespace

View File

@ -2,16 +2,17 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/subgraph/parameter_result.hpp"
#include "common_test_utils/test_constants.hpp"
#include "shared_test_classes/subgraph/parameter_result.hpp"
using namespace SubgraphTestsDefinitions;
using namespace ov::test;
using namespace InferenceEngine;
namespace CPULayerTestsDefinitions {
class ParameterResultCustomBlobTest : public ParameterResultSubgraphTestLegacyApi {
protected:
protected:
void Infer() override {
constexpr size_t inferIterations = 10lu;
@ -25,7 +26,7 @@ class ParameterResultCustomBlobTest : public ParameterResultSubgraphTestLegacyAp
std::string inputName = cnnNetwork.getInputsInfo().begin()->first;
std::vector<float> customInpData(elementsCount);
auto inpBlobData = inputBlob->buffer().as<const float *>();
auto inpBlobData = inputBlob->buffer().as<const float*>();
std::copy(inpBlobData, inpBlobData + elementsCount, customInpData.begin());
auto& tensorDesc = inputsInfo->getTensorDesc();
@ -38,7 +39,7 @@ class ParameterResultCustomBlobTest : public ParameterResultSubgraphTestLegacyAp
}
}
void Validate() override {
//Do nothing. We call Validate() in the Infer() method
// Do nothing. We call Validate() in the Infer() method
}
};
@ -51,12 +52,12 @@ TEST_P(ParameterResultCustomBlobTest, CompareWithRefs) {
Run();
}
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_Check_Custom_Blob, ParameterResultCustomBlobTest,
::testing::Combine(
::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {{}}}),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
} // namespace
INSTANTIATE_TEST_SUITE_P(smoke_Check_Custom_Blob,
ParameterResultCustomBlobTest,
::testing::Combine(::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {{}}}),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
} // namespace
class ParameterResultSameBlobTest : public ParameterResultSubgraphTestLegacyApi {
protected:
@ -69,7 +70,7 @@ protected:
}
}
void Validate() override {
//Do nothing. We call Validate() in the Infer() method
// Do nothing. We call Validate() in the Infer() method
}
};
@ -77,10 +78,10 @@ TEST_P(ParameterResultSameBlobTest, CompareWithRefs) {
Run();
}
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_Check_Same_Blob, ParameterResultSameBlobTest,
::testing::Combine(
::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {{}}}),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
} // namespace
} // namespace CPULayerTestsDefinitions
INSTANTIATE_TEST_SUITE_P(smoke_Check_Same_Blob,
ParameterResultSameBlobTest,
::testing::Combine(::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {{}}}),
::testing::Values(ov::test::utils::DEVICE_CPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
} // namespace
} // namespace CPULayerTestsDefinitions

View File

@ -2,25 +2,27 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "subgraph_tests/parameter_result.hpp"
#include <vector>
#include "subgraph_tests/parameter_result.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace SubgraphTestsDefinitions;
using namespace ov::test;
namespace {
INSTANTIATE_TEST_SUITE_P(smoke_Check, ParameterResultSubgraphTestLegacyApi,
::testing::Combine(
::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {}}),
::testing::Values(ov::test::utils::DEVICE_GPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Check,
ParameterResultSubgraphTestLegacyApi,
::testing::Combine(::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {}}),
::testing::Values(ov::test::utils::DEVICE_GPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Check, ParameterResultSubgraphTest,
::testing::Combine(
::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {{1, 3, 10, 10}}}),
::testing::Values(ov::test::utils::DEVICE_GPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Check,
ParameterResultSubgraphTest,
::testing::Combine(::testing::Values(ov::test::InputShape{{1, 3, 10, 10}, {{1, 3, 10, 10}}}),
::testing::Values(ov::test::utils::DEVICE_GPU)),
ParameterResultSubgraphTestBase::getTestCaseName);
} // namespace

View File

@ -2,11 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/subgraph/preprocess.hpp"
using namespace SubgraphTestsDefinitions;
#include <vector>
using namespace ov::test;
namespace {
@ -28,7 +28,7 @@ inline std::vector<preprocess_func> GPU_smoke_preprocess_functions() {
preprocess_func(resize_nearest, "resize_nearest", 0.01f),
preprocess_func(resize_linear_nhwc, "resize_linear_nhwc", 0.01f),
preprocess_func(resize_cubic, "resize_cubic", 0.01f),
preprocess_func(resize_dynamic, "resize_dynamic", 0.01f, { ov::Shape {1, 3, 123, 123} }),
preprocess_func(resize_dynamic, "resize_dynamic", 0.01f, {ov::Shape{1, 3, 123, 123}}),
preprocess_func(crop_basic, "crop_basic", 0.000001f),
preprocess_func(crop_negative, "crop_negative", 0.000001f),
preprocess_func(convert_layout_by_dims, "convert_layout_by_dims", 0.01f),
@ -43,10 +43,10 @@ inline std::vector<preprocess_func> GPU_smoke_preprocess_functions() {
};
}
INSTANTIATE_TEST_SUITE_P(smoke_PrePostProcess_GPU, PrePostProcessTest,
::testing::Combine(
::testing::ValuesIn(GPU_smoke_preprocess_functions()),
::testing::Values(ov::test::utils::DEVICE_GPU)),
INSTANTIATE_TEST_SUITE_P(smoke_PrePostProcess_GPU,
PrePostProcessTest,
::testing::Combine(::testing::ValuesIn(GPU_smoke_preprocess_functions()),
::testing::Values(ov::test::utils::DEVICE_GPU)),
PrePostProcessTest::getTestCaseName);
} // namespace

View File

@ -11,4 +11,5 @@ namespace SubgraphTestsDefinitions {
TEST_P(ConvEltwiseFusion, CompareWithRefs) {
Run();
}
} // namespace SubgraphTestsDefinitions
} // namespace SubgraphTestsDefinitions

View File

@ -12,8 +12,14 @@ TEST_P(ParameterResultSubgraphTestLegacyApi, CompareWithRefs) {
Run();
}
} // namespace SubgraphTestsDefinitions
namespace ov {
namespace test {
TEST_P(ParameterResultSubgraphTest, CompareWithRefs) {
run();
}
} // namespace SubgraphTestsDefinitions
} // namespace test
} // namespace ov

View File

@ -4,12 +4,11 @@
#pragma once
#include "shared_test_classes/subgraph/split_concat_memory.hpp"
#include "common_test_utils/data_utils.hpp"
#include "shared_test_classes/subgraph/split_concat_memory.hpp"
namespace ov {
namespace test {
namespace subgraph {
TEST_P(SplitConcatMemory, cyclicBufferCorrectness) {
/*
@ -28,7 +27,7 @@ TEST_P(SplitConcatMemory, cyclicBufferCorrectness) {
auto o_tensor = inferRequest.get_tensor(*function->outputs().begin());
auto output_tensor_ref = ov::Tensor(o_tensor.get_element_type(), o_tensor.get_shape());
auto fill_by_quarter = [this] (ov::Tensor& tensor, std::vector<float> vals) {
auto fill_by_quarter = [this](ov::Tensor& tensor, std::vector<float> vals) {
OPENVINO_ASSERT(vals.size() == 4);
auto quarter_blocked_shape = tensor.get_shape();
@ -38,7 +37,7 @@ TEST_P(SplitConcatMemory, cyclicBufferCorrectness) {
quarter_blocked_shape.insert(quarter_blocked_shape.begin() + axis, vals.size());
OPENVINO_ASSERT(ov::shape_size(quarter_blocked_shape) == tensor.get_size());
auto quarter_blocked_view = ov::Tensor(tensor.get_element_type(), quarter_blocked_shape, tensor.data());
auto quarter_blocked_view = ov::Tensor(tensor.get_element_type(), quarter_blocked_shape, tensor.data());
ov::test::utils::fill_data_with_broadcast(quarter_blocked_view, axis, vals);
};
@ -63,7 +62,6 @@ TEST_P(SplitConcatMemory, cyclicBufferCorrectness) {
compare({output_tensor_ref}, {o_tensor});
}
} // namespace subgraph
} // namespace test
} // namespace ov

View File

@ -4,37 +4,35 @@
#pragma once
#include <tuple>
#include <string>
#include <tuple>
#include <vector>
#include "shared_test_classes/base/layer_test_utils.hpp"
#include "ov_models/builders.hpp"
#include <ngraph/shape.hpp>
#include <ngraph/node.hpp>
#include "shared_test_classes/base/layer_test_utils.hpp"
namespace SubgraphTestsDefinitions {
typedef std::tuple<
std::tuple<
ngraph::NodeTypeInfo, // Convolution type
size_t // Number of inputs
>,
ngraph::NodeTypeInfo, // Eltwise type
bool, // Is the test negative or not
ngraph::Shape, // Input shape
ngraph::Shape, // Weights shape
ngraph::Shape, // Const shape
ngraph::element::Type, // Network precision
std::string // Device name
> ConvEltwiseFusionParams;
typedef std::tuple<std::tuple<ov::NodeTypeInfo, // Convolution type
size_t // Number of inputs
>,
ov::NodeTypeInfo, // Eltwise type
bool, // Is the test negative or not
ov::Shape, // Input shape
ov::Shape, // Weights shape
ov::Shape, // Const shape
ov::element::Type, // Network precision
std::string // Device name
>
ConvEltwiseFusionParams;
class ConvEltwiseFusion
: public testing::WithParamInterface<ConvEltwiseFusionParams>,
virtual public LayerTestsUtils::LayerTestsCommon {
class ConvEltwiseFusion : public testing::WithParamInterface<ConvEltwiseFusionParams>,
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(const testing::TestParamInfo<ConvEltwiseFusionParams> &obj);
static std::string getTestCaseName(const testing::TestParamInfo<ConvEltwiseFusionParams>& obj);
protected:
void SetUp() override;
};
} // namespace SubgraphTestsDefinitions
} // namespace SubgraphTestsDefinitions

View File

@ -4,37 +4,42 @@
#pragma once
#include <tuple>
#include <string>
#include <vector>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include "shared_test_classes/base/layer_test_utils.hpp"
#include "shared_test_classes/base/ov_subgraph.hpp"
#include "ov_models/builders.hpp"
namespace ov {
namespace test {
using parameterResultParams = std::tuple<ov::test::InputShape, // Input shape
std::string>; // Device name
class ParameterResultSubgraphTestBase : public testing::WithParamInterface<parameterResultParams> {
public:
static std::string getTestCaseName(const testing::TestParamInfo<parameterResultParams>& obj);
protected:
std::shared_ptr<ov::Model> createModel(const ov::PartialShape& shape);
};
class ParameterResultSubgraphTest : public ParameterResultSubgraphTestBase, virtual public ov::test::SubgraphBaseTest {
protected:
void SetUp() override;
};
} // namespace test
} // namespace ov
namespace SubgraphTestsDefinitions {
using parameterResultParams = std::tuple<ov::test::InputShape, // Input shape
std::string>; // Device name
class ParameterResultSubgraphTestBase : public testing::WithParamInterface<parameterResultParams> {
public:
static std::string getTestCaseName(const testing::TestParamInfo<parameterResultParams>& obj);
protected:
std::shared_ptr<ov::Model> createModel(const ov::PartialShape& shape);
};
class ParameterResultSubgraphTestLegacyApi : public ParameterResultSubgraphTestBase,
class ParameterResultSubgraphTestLegacyApi : public ov::test::ParameterResultSubgraphTestBase,
virtual public LayerTestsUtils::LayerTestsCommon {
protected:
void SetUp() override;
};
class ParameterResultSubgraphTest : public ParameterResultSubgraphTestBase,
virtual public ov::test::SubgraphBaseTest {
protected:
void SetUp() override;
};
} // namespace SubgraphTestsDefinitions

View File

@ -4,29 +4,37 @@
#pragma once
#include <tuple>
#include <string>
#include <vector>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include "shared_test_classes/base/ov_subgraph.hpp"
#include "ov_models/builders.hpp"
#include "ov_models/preprocess/preprocess_builders.hpp"
#include "ov_models/utils/ov_helpers.hpp"
#include "shared_test_classes/base/ov_subgraph.hpp"
namespace SubgraphTestsDefinitions {
namespace ov {
namespace test {
using preprocessParamsTuple = std::tuple<
ov::builder::preprocess::preprocess_func, // Function with preprocessing
std::string>; // Device name
using preprocessParamsTuple = std::tuple<ov::builder::preprocess::preprocess_func, // Function with preprocessing
std::string>; // Device name
class PrePostProcessTest : public testing::WithParamInterface<preprocessParamsTuple>,
virtual public ov::test::SubgraphBaseTest {
public:
static std::string getTestCaseName(const testing::TestParamInfo<preprocessParamsTuple> &obj);
static std::string getTestCaseName(const testing::TestParamInfo<preprocessParamsTuple>& obj);
protected:
void SetUp() override;
};
} // namespace test
} // namespace ov
namespace SubgraphTestsDefinitions {
using ov::test::PrePostProcessTest;
using ov::test::preprocessParamsTuple;
} // namespace SubgraphTestsDefinitions

View File

@ -4,30 +4,30 @@
#pragma once
#include <tuple>
#include <string>
#include <tuple>
#include <vector>
#include "shared_test_classes/base/ov_subgraph.hpp"
#include "shared_test_classes/base/layer_test_utils.hpp"
#include "shared_test_classes/base/ov_subgraph.hpp"
namespace SubgraphTestsDefinitions {
namespace ov {
namespace test {
using SimpleIfParamsTuple = typename std::tuple<
std::vector<ov::test::InputShape>, // Input shapes
ov::test::ElementType, // Network precision
bool, // If condition
std::string // Device name
>;
using SimpleIfParamsTuple = typename std::tuple<std::vector<ov::test::InputShape>, // Input shapes
ov::test::ElementType, // Network precision
bool, // If condition
std::string // Device name
>;
class SimpleIfTest:
public testing::WithParamInterface<SimpleIfParamsTuple>,
virtual public ov::test::SubgraphBaseTest {
class SimpleIfTest : public testing::WithParamInterface<SimpleIfParamsTuple>,
virtual public ov::test::SubgraphBaseTest {
public:
static std::string getTestCaseName(const testing::TestParamInfo<SimpleIfParamsTuple> &obj);
static std::string getTestCaseName(const testing::TestParamInfo<SimpleIfParamsTuple>& obj);
protected:
void SetUp() override;
void compare(const std::vector<ov::Tensor> &expected, const std::vector<ov::Tensor> &actual) override;
void compare(const std::vector<ov::Tensor>& expected, const std::vector<ov::Tensor>& actual) override;
size_t inferNum = 0;
};
@ -55,12 +55,12 @@ protected:
class SimpleIfNotConstConditionAndDimsIncreaseTest : public SimpleIfNotConstConditionTest {
protected:
void SetUp() override;
void compare(const std::vector<ov::Tensor> &expected, const std::vector<ov::Tensor> &actual) override;
void compare(const std::vector<ov::Tensor>& expected, const std::vector<ov::Tensor>& actual) override;
};
class SimpleIfNotConstConditionUnusedOutputPortsTest : public SimpleIfNotConstConditionTest {
protected:
void SetUp() override;
};
} // namespace SubgraphTestsDefinitions
} // namespace test
} // namespace ov

View File

@ -10,14 +10,12 @@
namespace ov {
namespace test {
namespace subgraph {
using SplitConcatMemoryParamsTuple = typename std::tuple<
ov::Shape, // input shapes
ov::element::Type, // precision
int, // axis of split
std::string // device name
>;
using SplitConcatMemoryParamsTuple = typename std::tuple<ov::Shape, // input shapes
ov::element::Type, // precision
int, // axis of split
std::string // device name
>;
class SplitConcatMemory : public testing::WithParamInterface<SplitConcatMemoryParamsTuple>,
virtual public ov::test::SubgraphBaseTest {
@ -29,6 +27,5 @@ protected:
int axis;
};
} // namespace subgraph
} // namespace test
} // namespace ov

View File

@ -2,27 +2,27 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "transformations/common_optimizations/conv_mul_fusion.hpp"
#include "shared_test_classes/subgraph/conv_eltwise_fusion.hpp"
#include "openvino/core/node.hpp"
#include "openvino/opsets/opset11.hpp"
#include "openvino/pass/constant_folding.hpp"
#include "shared_test_classes/subgraph/conv_eltwise_fusion.hpp"
#include "ov_models/builders.hpp"
#include "transformations/common_optimizations/conv_mul_fusion.hpp"
using namespace ov;
// #include <legacy/transformations/convert_opset1_to_legacy/conv_bias_fusion.hpp>
// #include <legacy/transformations/convert_opset1_to_legacy/convert_convolutions.hpp>
namespace SubgraphTestsDefinitions {
std::string ConvEltwiseFusion::getTestCaseName(const testing::TestParamInfo<ConvEltwiseFusionParams> &obj) {
std::string ConvEltwiseFusion::getTestCaseName(const testing::TestParamInfo<ConvEltwiseFusionParams>& obj) {
std::tuple<NodeTypeInfo, size_t> conv_params;
NodeTypeInfo conv_type, eltwise_type;
bool negative;
Shape input_shape, weights_shape, const_shape;
element::Type precision;
std::string targetName;
std::tie(conv_params, eltwise_type, negative, input_shape, weights_shape, const_shape, precision, targetName) = obj.param;
std::tie(conv_params, eltwise_type, negative, input_shape, weights_shape, const_shape, precision, targetName) =
obj.param;
size_t num_inputs;
std::tie(conv_type, num_inputs) = conv_params;
std::ostringstream results;
@ -46,7 +46,8 @@ void ConvEltwiseFusion::SetUp() {
Shape input_shape, weights_shape, const_shape;
element::Type precision;
size_t num_inputs;
std::tie(conv_params, eltwise_type, negative, input_shape, weights_shape, const_shape, precision, targetDevice) = this->GetParam();
std::tie(conv_params, eltwise_type, negative, input_shape, weights_shape, const_shape, precision, targetDevice) =
this->GetParam();
std::tie(conv_type, num_inputs) = conv_params;
pass::Manager manager;
@ -56,8 +57,12 @@ void ConvEltwiseFusion::SetUp() {
Shape strides(spatial_dims, 1);
std::vector<ptrdiff_t> pad_begin(spatial_dims, 0), pad_end(spatial_dims, 0);
auto weights = ngraph::builder::makeConstant<float>(precision, weights_shape, std::vector<float>(shape_size(weights_shape), 2));
auto eltwise_const = ngraph::builder::makeConstant<float>(precision, const_shape, std::vector<float>(shape_size(const_shape), 3));
auto weights = ngraph::builder::makeConstant<float>(precision,
weights_shape,
std::vector<float>(shape_size(weights_shape), 2));
auto eltwise_const = ngraph::builder::makeConstant<float>(precision,
const_shape,
std::vector<float>(shape_size(const_shape), 3));
std::shared_ptr<Node> conv;
if (conv_type == opset11::Convolution::get_type_info_static()) {
conv = std::make_shared<opset11::Convolution>(param, weights, strides, pad_begin, pad_end, strides);
@ -65,19 +70,45 @@ void ConvEltwiseFusion::SetUp() {
conv = std::make_shared<opset11::GroupConvolution>(param, weights, strides, pad_begin, pad_end, strides);
} else if (conv_type == opset11::ConvolutionBackpropData::get_type_info_static()) {
if (num_inputs == 3) {
auto output_shape = std::make_shared<opset11::Constant>(element::u64, Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::ConvolutionBackpropData>(param, weights, output_shape, strides, pad_begin, pad_end, strides);
auto output_shape = std::make_shared<opset11::Constant>(
element::u64,
Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::ConvolutionBackpropData>(param,
weights,
output_shape,
strides,
pad_begin,
pad_end,
strides);
} else {
conv = std::make_shared<opset11::ConvolutionBackpropData>(param, weights, strides, pad_begin, pad_end, strides);
conv = std::make_shared<opset11::ConvolutionBackpropData>(param,
weights,
strides,
pad_begin,
pad_end,
strides);
}
} else if (conv_type == opset11::GroupConvolutionBackpropData::get_type_info_static()) {
if (num_inputs == 3) {
auto output_shape = std::make_shared<opset11::Constant>(element::u64, Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param, weights, output_shape, strides, pad_begin, pad_end, strides);
auto output_shape = std::make_shared<opset11::Constant>(
element::u64,
Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param,
weights,
output_shape,
strides,
pad_begin,
pad_end,
strides);
} else {
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param, weights, strides, pad_begin, pad_end, strides);
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param,
weights,
strides,
pad_begin,
pad_end,
strides);
}
} else {
OPENVINO_THROW("Unsupported type");
@ -111,7 +142,9 @@ void ConvEltwiseFusion::SetUp() {
Shape strides(spatial_dims, 1);
std::vector<ptrdiff_t> pad_begin(spatial_dims, 0), pad_end(spatial_dims, 0);
auto weights = ngraph::builder::makeConstant<float>(precision, weights_shape, std::vector<float>(shape_size(weights_shape), 6));
auto weights = ngraph::builder::makeConstant<float>(precision,
weights_shape,
std::vector<float>(shape_size(weights_shape), 6));
std::shared_ptr<Node> conv;
if (conv_type == opset11::Convolution::get_type_info_static()) {
conv = std::make_shared<opset11::Convolution>(param, weights, strides, pad_begin, pad_end, strides);
@ -119,19 +152,45 @@ void ConvEltwiseFusion::SetUp() {
conv = std::make_shared<opset11::GroupConvolution>(param, weights, strides, pad_begin, pad_end, strides);
} else if (conv_type == opset11::ConvolutionBackpropData::get_type_info_static()) {
if (num_inputs == 3) {
auto output_shape = std::make_shared<opset11::Constant>(element::u64, Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::ConvolutionBackpropData>(param, weights, output_shape, strides, pad_begin, pad_end, strides);
auto output_shape = std::make_shared<opset11::Constant>(
element::u64,
Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::ConvolutionBackpropData>(param,
weights,
output_shape,
strides,
pad_begin,
pad_end,
strides);
} else {
conv = std::make_shared<opset11::ConvolutionBackpropData>(param, weights, strides, pad_begin, pad_end, strides);
conv = std::make_shared<opset11::ConvolutionBackpropData>(param,
weights,
strides,
pad_begin,
pad_end,
strides);
}
} else if (conv_type == opset11::GroupConvolutionBackpropData::get_type_info_static()) {
if (num_inputs == 3) {
auto output_shape = std::make_shared<opset11::Constant>(element::u64, Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param, weights, output_shape, strides, pad_begin, pad_end, strides);
auto output_shape = std::make_shared<opset11::Constant>(
element::u64,
Shape{spatial_dims},
std::vector<size_t>(input_shape.begin() + 2, input_shape.end()));
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param,
weights,
output_shape,
strides,
pad_begin,
pad_end,
strides);
} else {
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param, weights, strides, pad_begin, pad_end, strides);
conv = std::make_shared<opset11::GroupConvolutionBackpropData>(param,
weights,
strides,
pad_begin,
pad_end,
strides);
}
}
@ -146,4 +205,4 @@ void ConvEltwiseFusion::SetUp() {
auto res = compare_functions(cloned_function, function_ref);
ASSERT_TRUE(res.first) << res.second;
}
} // namespace SubgraphTestsDefinitions
} // namespace SubgraphTestsDefinitions

View File

@ -4,7 +4,8 @@
#include "shared_test_classes/subgraph/parameter_result.hpp"
namespace SubgraphTestsDefinitions {
namespace ov {
namespace test {
std::string ParameterResultSubgraphTestBase::getTestCaseName(const testing::TestParamInfo<parameterResultParams>& obj) {
ov::test::InputShape inShape;
@ -29,15 +30,6 @@ std::shared_ptr<ov::Model> ParameterResultSubgraphTestBase::createModel(const ov
return model;
}
void ParameterResultSubgraphTestLegacyApi::SetUp() {
ov::test::InputShape inShape;
std::tie(inShape, targetDevice) = this->GetParam();
IE_ASSERT(inShape.first.is_static());
function = createModel(inShape.first);
}
void ParameterResultSubgraphTest::SetUp() {
ov::test::InputShape inShape;
std::tie(inShape, targetDevice) = this->GetParam();
@ -47,4 +39,17 @@ void ParameterResultSubgraphTest::SetUp() {
function = createModel(inShape.first);
}
} // namespace test
} // namespace ov
namespace SubgraphTestsDefinitions {
void ParameterResultSubgraphTestLegacyApi::SetUp() {
ov::test::InputShape inShape;
std::tie(inShape, targetDevice) = this->GetParam();
OPENVINO_ASSERT(inShape.first.is_static());
function = createModel(inShape.first);
}
} // namespace SubgraphTestsDefinitions

View File

@ -3,16 +3,18 @@
//
#include "shared_test_classes/subgraph/preprocess.hpp"
#include "ov_models/preprocess/preprocess_builders.hpp"
#include "openvino/core/preprocess/pre_post_process.hpp"
#include "ov_models/preprocess/preprocess_builders.hpp"
using namespace ov;
using namespace ov::preprocess;
using namespace ov::builder::preprocess;
namespace SubgraphTestsDefinitions {
std::string PrePostProcessTest::getTestCaseName(
const testing::TestParamInfo<preprocessParamsTuple> &obj) {
namespace ov {
namespace test {
std::string PrePostProcessTest::getTestCaseName(const testing::TestParamInfo<preprocessParamsTuple>& obj) {
std::string targetName;
preprocess_func func;
@ -29,7 +31,7 @@ void PrePostProcessTest::SetUp() {
std::tie(func, targetDevice) = GetParam();
function = func.m_function();
rel_threshold = func.m_accuracy;
functionRefs = ngraph::clone_function(*function);
functionRefs = function->clone();
abs_threshold = func.m_accuracy;
if (func.m_shapes.empty()) {
for (const auto& input : function->inputs()) {
@ -43,4 +45,5 @@ TEST_P(PrePostProcessTest, CompareWithRefs) {
run();
}
} // namespace SubgraphTestsDefinitions
} // namespace test
} // namespace ov

View File

@ -3,11 +3,14 @@
//
#include "shared_test_classes/subgraph/simple_if.hpp"
#include "ov_models/builders.hpp"
#include <common_test_utils/ov_tensor_utils.hpp>
namespace SubgraphTestsDefinitions {
std::string SimpleIfTest::getTestCaseName(const testing::TestParamInfo<SimpleIfParamsTuple> &obj) {
#include "common_test_utils/ov_tensor_utils.hpp"
#include "ov_models/builders.hpp"
namespace ov {
namespace test {
std::string SimpleIfTest::getTestCaseName(const testing::TestParamInfo<SimpleIfParamsTuple>& obj) {
std::vector<ov::test::InputShape> shapes;
ov::test::ElementType inType;
bool condition;
@ -19,7 +22,7 @@ std::string SimpleIfTest::getTestCaseName(const testing::TestParamInfo<SimpleIfP
results << "Input" << i << "_";
results << "IS=" << ov::test::utils::partialShape2str({shapes[i].first}) << "_";
results << "TS=";
for (const auto &item : shapes[i].second) {
for (const auto& item : shapes[i].second) {
results << ov::test::utils::vec2str(item) << "_";
}
}
@ -29,11 +32,13 @@ std::string SimpleIfTest::getTestCaseName(const testing::TestParamInfo<SimpleIfP
return results.str();
}
void SimpleIfTest::compare(const std::vector<ov::Tensor> &expected, const std::vector<ov::Tensor> &actual) {
void SimpleIfTest::compare(const std::vector<ov::Tensor>& expected, const std::vector<ov::Tensor>& actual) {
// in bodies there aren't nodes that work with dimension 0. So we shouldn't call SubgraphBaseTest::compare
bool hasZero = false;
for (auto shape : targetStaticShapes[inferNum]) {
hasZero = hasZero || std::any_of(shape.begin(), shape.end(), [](size_t dim) { return dim == 0; });
hasZero = hasZero || std::any_of(shape.begin(), shape.end(), [](size_t dim) {
return dim == 0;
});
}
if (!hasZero) {
SubgraphBaseTest::compare(expected, actual);
@ -112,7 +117,8 @@ void SimpleIf2OutTest::SetUp() {
auto ifRes1 = ifOp->set_output(res1, res3);
auto ifRes2 = ifOp->set_output(res2, res4);
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(ifRes1), std::make_shared<ov::op::v0::Result>(ifRes2)};
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(ifRes1),
std::make_shared<ov::op::v0::Result>(ifRes2)};
function = std::make_shared<ov::Model>(results, params, "simpleIf2Out");
}
@ -122,7 +128,7 @@ void SimpleIfNotConstConditionTest::SetUp() {
std::tie(shapes, inType, condition, targetDevice) = this->GetParam();
init_input_shapes(shapes);
for (auto &target : targetStaticShapes)
for (auto& target : targetStaticShapes)
target.emplace_back(ov::Shape{});
ov::ParameterVector params;
for (auto&& shape : inputDynamicShapes) {
@ -152,11 +158,12 @@ void SimpleIfNotConstConditionTest::SetUp() {
auto ifRes1 = ifOp->set_output(res1, res3);
auto ifRes2 = ifOp->set_output(res2, res4);
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(ifRes1), std::make_shared<ov::op::v0::Result>(ifRes2)};
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(ifRes1),
std::make_shared<ov::op::v0::Result>(ifRes2)};
function = std::make_shared<ov::Model>(results, params, "SimpleIfNotConstConditionTest");
}
void SimpleIfNotConstConditionTest::generate_inputs(const std::vector<ngraph::Shape>& targetInputStaticShapes) {
void SimpleIfNotConstConditionTest::generate_inputs(const std::vector<ov::Shape>& targetInputStaticShapes) {
inputs.clear();
const auto& funcInputs = function->inputs();
for (size_t i = 0; i < funcInputs.size(); ++i) {
@ -165,10 +172,13 @@ void SimpleIfNotConstConditionTest::generate_inputs(const std::vector<ngraph::Sh
if (i + 1 == funcInputs.size()) {
tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]);
auto *dataPtr = tensor.data<bool>();
auto* dataPtr = tensor.data<bool>();
dataPtr[0] = condition;
} else {
tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 10, -5);
tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(),
targetInputStaticShapes[i],
10,
-5);
}
inputs.insert({funcInput.get_node_shared_ptr(), tensor});
@ -181,7 +191,7 @@ void SimpleIfNotConstConditionAndInternalDynamismTest::SetUp() {
std::tie(shapes, inType, condition, targetDevice) = this->GetParam();
init_input_shapes(shapes);
for (auto &target : targetStaticShapes)
for (auto& target : targetStaticShapes)
target.emplace_back(ov::Shape{});
ov::ParameterVector params;
for (auto&& shape : inputDynamicShapes) {
@ -200,7 +210,7 @@ void SimpleIfNotConstConditionAndInternalDynamismTest::SetUp() {
auto thenBody = std::make_shared<ov::Model>(ov::OutputVector{thenRes_0, thenRes_1}, ov::ParameterVector{p1});
// else body
auto add_const = std::make_shared<ov::op::v0::Constant>(inType, ov::Shape{}, std::vector<float>{ 2 });
auto add_const = std::make_shared<ov::op::v0::Constant>(inType, ov::Shape{}, std::vector<float>{2});
auto elseOp_0 = std::make_shared<ov::op::v1::Add>(p2, add_const);
auto elseOp_1 = std::make_shared<ov::op::v3::NonZero>(elseOp_0, ov::element::i32);
auto elseOp_2 = std::make_shared<ov::op::v0::Convert>(elseOp_1, inType);
@ -215,7 +225,8 @@ void SimpleIfNotConstConditionAndInternalDynamismTest::SetUp() {
auto ifRes_0 = ifOp->set_output(thenRes_0, elseRes_0);
auto ifRes_1 = ifOp->set_output(thenRes_1, elseRes_1);
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(ifRes_0), std::make_shared<ov::op::v0::Result>(ifRes_1)};
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(ifRes_0),
std::make_shared<ov::op::v0::Result>(ifRes_1)};
function = std::make_shared<ov::Model>(results, params, "SimpleIfNotConstConditionAndInternalDynamismTest");
}
@ -225,7 +236,7 @@ void SimpleIfNotConstConditionAndDimsIncreaseTest::SetUp() {
std::tie(shapes, inType, condition, targetDevice) = this->GetParam();
init_input_shapes(shapes);
for (auto &target : targetStaticShapes)
for (auto& target : targetStaticShapes)
target.emplace_back(ov::Shape{});
ov::ParameterVector params;
for (auto&& shape : inputDynamicShapes) {
@ -253,12 +264,16 @@ void SimpleIfNotConstConditionAndDimsIncreaseTest::SetUp() {
auto ifRes = ifOp->set_output(thenRes, elseRes);
function = std::make_shared<ov::Model>(ov::ResultVector{std::make_shared<ov::op::v0::Result>(ifOp)},
params, "SimpleIfNotConstConditionAndDimsIncreaseTest");
params,
"SimpleIfNotConstConditionAndDimsIncreaseTest");
}
void SimpleIfNotConstConditionAndDimsIncreaseTest::compare(const std::vector<ov::Tensor> &expected, const std::vector<ov::Tensor> &actual) {
void SimpleIfNotConstConditionAndDimsIncreaseTest::compare(const std::vector<ov::Tensor>& expected,
const std::vector<ov::Tensor>& actual) {
const auto shape = targetStaticShapes[inferNum++].front();
if (!condition && std::any_of(shape.begin(), shape.end(), [](size_t dim) { return dim == 0; })) {
if (!condition && std::any_of(shape.begin(), shape.end(), [](size_t dim) {
return dim == 0;
})) {
return;
}
@ -271,7 +286,7 @@ void SimpleIfNotConstConditionUnusedOutputPortsTest::SetUp() {
std::tie(shapes, inType, condition, targetDevice) = this->GetParam();
init_input_shapes(shapes);
for (auto &target : targetStaticShapes)
for (auto& target : targetStaticShapes)
target.emplace_back(ov::Shape{});
ov::ParameterVector params;
for (auto&& shape : inputDynamicShapes) {
@ -303,4 +318,5 @@ void SimpleIfNotConstConditionUnusedOutputPortsTest::SetUp() {
function = std::make_shared<ov::Model>(results, params, "SimpleIfNotConstConditionUnusedOutputPortsTest");
}
} // namespace SubgraphTestsDefinitions
} // namespace test
} // namespace ov

View File

@ -6,7 +6,6 @@
namespace ov {
namespace test {
namespace subgraph {
std::string SplitConcatMemory::getTestCaseName(const testing::TestParamInfo<ParamType>& obj) {
ov::element::Type netPrecision;
@ -47,46 +46,42 @@ void SplitConcatMemory::SetUp() {
* __|___ __|___
* [_out1_] [_mem2_]
*/
ngraph::Shape ng_share_14(shape_14);
ngraph::Shape ng_share_34(shape_34);
ov::Shape ng_share_14(shape_14);
ov::Shape ng_share_34(shape_34);
auto input = std::make_shared<ov::op::v0::Parameter>(inType, ng_share_14);
input->set_friendly_name("input");
auto& tensor = input->get_output_tensor(0);
tensor.set_names({"input_t"});
//input->output(0).set_names({"input"});
// input->output(0).set_names({"input"});
auto mem_c = std::make_shared<ov::op::v0::Constant>(inType, ng_share_34, 0);
auto mem_r = std::make_shared<ov::op::v3::ReadValue>(mem_c, "id");
auto cnc = std::make_shared<ov::op::v0::Concat>(ngraph::NodeVector{mem_r, input}, axis);
auto cnc = std::make_shared<ov::op::v0::Concat>(ov::NodeVector{mem_r, input}, axis);
std::vector<int64_t> chunks_val {static_cast<int64_t>(ng_share_14[axis]), static_cast<int64_t>(ng_share_34[axis])};
auto chunk_c = std::make_shared<ov::op::v0::Constant>(::ngraph::element::i64, ngraph::Shape{chunks_val.size()}, chunks_val);
auto axis_c = std::make_shared<ov::op::v0::Constant>(::ngraph::element::i64, ngraph::Shape{}, axis);
std::vector<int64_t> chunks_val{static_cast<int64_t>(ng_share_14[axis]), static_cast<int64_t>(ng_share_34[axis])};
auto chunk_c = std::make_shared<ov::op::v0::Constant>(::ov::element::i64, ov::Shape{chunks_val.size()}, chunks_val);
auto axis_c = std::make_shared<ov::op::v0::Constant>(::ov::element::i64, ov::Shape{}, axis);
auto spl = std::make_shared<ov::op::v1::VariadicSplit>(cnc, axis_c, chunk_c);
auto one = std::make_shared<ov::op::v0::Constant>(inType, ngraph::Shape{}, 1);
auto plus = std::make_shared<ov::op::v1::Add>(cnc, one, ngraph::op::AutoBroadcastType::NUMPY);
auto one = std::make_shared<ov::op::v0::Constant>(inType, ov::Shape{}, 1);
auto plus = std::make_shared<ov::op::v1::Add>(cnc, one, ov::op::AutoBroadcastType::NUMPY);
plus->set_friendly_name("plus_one");
auto& o_tensor = plus->get_output_tensor(0);
o_tensor.set_names({"plus_one_t"});
//input->output(0).set_names({"plus_one"});
// input->output(0).set_names({"plus_one"});
auto mem_w = std::make_shared<ov::op::v3::Assign>(spl->output(1), "id");
// WA. Ngraph limitations. Assign should have control dependencies on read.
// WA. OpenVINO limitations. Assign should have control dependencies on read.
// And someone should hold assign node.
mem_w->add_control_dependency(mem_r);
plus->add_control_dependency(mem_w);
function = std::make_shared<ngraph::Function>(
ngraph::NodeVector {plus},
ngraph::ParameterVector {input},
"CyclicBuffer4");
function = std::make_shared<ov::Model>(ov::NodeVector{plus}, ov::ParameterVector{input}, "CyclicBuffer4");
}
} // namespace subgraph
} // namespace test
} // namespace ov