Skip to content

Commit

Permalink
ngraph leftovers in CPU shared single_layer and subgraph (#21499)
Browse files Browse the repository at this point in the history
tests
  • Loading branch information
vurusovs authored Dec 7, 2023
1 parent 25e5818 commit 8ef3834
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const auto binConv2DParams_ExplicitPadding = ::testing::Combine(
::testing::ValuesIn(padsEnd),
::testing::ValuesIn(dilations),
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT),
::testing::Values(ov::op::PadType::EXPLICIT),
::testing::ValuesIn(padValues));

const auto binConv2DParams_ValidPadding = ::testing::Combine(
Expand All @@ -46,7 +46,7 @@ const auto binConv2DParams_ValidPadding = ::testing::Combine(
::testing::Values(std::vector<ptrdiff_t>({0, 0})),
::testing::ValuesIn(dilations),
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::VALID),
::testing::Values(ov::op::PadType::VALID),
::testing::ValuesIn(padValues));

INSTANTIATE_TEST_SUITE_P(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ std::vector<ov::element::Type> model_type = {
ov::element::boolean,
};

std::vector<ngraph::helpers::ComparisonTypes> comparisonOpTypes = {
ngraph::helpers::ComparisonTypes::EQUAL,
ngraph::helpers::ComparisonTypes::NOT_EQUAL,
ngraph::helpers::ComparisonTypes::GREATER,
ngraph::helpers::ComparisonTypes::GREATER_EQUAL,
ngraph::helpers::ComparisonTypes::LESS,
ngraph::helpers::ComparisonTypes::LESS_EQUAL,
std::vector<ov::test::utils::ComparisonTypes> comparisonOpTypes = {
ov::test::utils::ComparisonTypes::EQUAL,
ov::test::utils::ComparisonTypes::NOT_EQUAL,
ov::test::utils::ComparisonTypes::GREATER,
ov::test::utils::ComparisonTypes::GREATER_EQUAL,
ov::test::utils::ComparisonTypes::LESS,
ov::test::utils::ComparisonTypes::LESS_EQUAL,
};

std::vector<ngraph::helpers::InputLayerType> secondInputTypes = {
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
std::vector<ov::test::utils::InputLayerType> secondInputTypes = {
ov::test::utils::InputLayerType::CONSTANT,
ov::test::utils::InputLayerType::PARAMETER,
};

std::map<std::string, std::string> additional_config = {};
Expand Down Expand Up @@ -81,15 +81,15 @@ std::vector<std::vector<ov::Shape>> input_shapes_is_ops_static = {
{{2, 17, 3, 4}, {1}}
};

std::vector<ngraph::helpers::ComparisonTypes> comparisonOpTypesIs = {
ngraph::helpers::ComparisonTypes::IS_FINITE,
ngraph::helpers::ComparisonTypes::IS_NAN
std::vector<ov::test::utils::ComparisonTypes> comparisonOpTypesIs = {
ov::test::utils::ComparisonTypes::IS_FINITE,
ov::test::utils::ComparisonTypes::IS_NAN
};

const auto ComparisonTestParamsIs = ::testing::Combine(
::testing::ValuesIn(ov::test::static_shapes_to_test_representation(input_shapes_is_ops_static)),
::testing::ValuesIn(comparisonOpTypesIs),
::testing::Values(ngraph::helpers::InputLayerType::CONSTANT),
::testing::Values(ov::test::utils::InputLayerType::CONSTANT),
::testing::Values(ov::element::f32),
::testing::Values(ov::test::utils::DEVICE_CPU),
::testing::Values(additional_config));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ const auto conv2DParams_ExplicitPadding = ::testing::Combine(
::testing::ValuesIn(kernels), ::testing::ValuesIn(strides),
::testing::ValuesIn(padBegins), ::testing::ValuesIn(padEnds),
::testing::ValuesIn(dilations), ::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT));
::testing::Values(ov::op::PadType::EXPLICIT));
const auto conv2DParams_AutoPadValid = ::testing::Combine(
::testing::ValuesIn(kernels), ::testing::ValuesIn(strides),
::testing::Values(std::vector<ptrdiff_t>({0, 0})),
::testing::Values(std::vector<ptrdiff_t>({0, 0})),
::testing::ValuesIn(dilations), ::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::VALID));
::testing::Values(ov::op::PadType::VALID));

INSTANTIATE_TEST_SUITE_P(
smoke_Convolution2D_ExplicitPadding, ConvolutionLayerTest,
Expand Down Expand Up @@ -103,7 +103,7 @@ const auto conv2DParams_WeightLayout = ::testing::Combine(::testing::Values(kern
::testing::Values(padEnds),
::testing::Values(dilations),
::testing::Values(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT));
::testing::Values(ov::op::PadType::EXPLICIT));

INSTANTIATE_TEST_SUITE_P(smoke_Convolution2D_SpecificWeightLayout, ConvolutionLayerTest,
::testing::Combine(conv2DParams_WeightLayout,
Expand All @@ -124,13 +124,13 @@ const auto conv3DParams_ExplicitPadding = ::testing::Combine(
::testing::ValuesIn(kernels3d), ::testing::ValuesIn(strides3d),
::testing::ValuesIn(paddings3d), ::testing::ValuesIn(paddings3d),
::testing::ValuesIn(dilations3d), ::testing::ValuesIn(numOutChannels3D),
::testing::Values(ngraph::op::PadType::EXPLICIT));
::testing::Values(ov::op::PadType::EXPLICIT));
const auto conv3DParams_AutoPadValid = ::testing::Combine(
::testing::ValuesIn(kernels3d), ::testing::ValuesIn(strides3d),
::testing::Values(std::vector<ptrdiff_t>({0, 0, 0})),
::testing::Values(std::vector<ptrdiff_t>({0, 0, 0})),
::testing::ValuesIn(dilations3d), ::testing::ValuesIn(numOutChannels3D),
::testing::Values(ngraph::op::PadType::VALID));
::testing::Values(ov::op::PadType::VALID));

INSTANTIATE_TEST_SUITE_P(
smoke_Convolution3D_ExplicitPadding, ConvolutionLayerTest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const auto deformableConv2DParams_SingleTestCase = ::testing::Combine(
::testing::ValuesIn(groups),
::testing::ValuesIn(single_deform_groups),
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT),
::testing::Values(ov::op::PadType::EXPLICIT),
::testing::ValuesIn(with_bilinear_interpolation_pad));

INSTANTIATE_TEST_SUITE_P(
Expand Down Expand Up @@ -215,7 +215,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::ValuesIn(std::vector<size_t> {2}), // gr.
::testing::ValuesIn(std::vector<size_t> {2}), // def. gr.
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT),
::testing::Values(ov::op::PadType::EXPLICIT),
::testing::ValuesIn(with_bilinear_interpolation_pad)),
::testing::Values(false),
::testing::ValuesIn(netPrecisions),
Expand All @@ -234,7 +234,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::ValuesIn(std::vector<size_t> {2}), // gr.
::testing::ValuesIn(std::vector<size_t> {2}), // def. gr.
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT),
::testing::Values(ov::op::PadType::EXPLICIT),
::testing::ValuesIn(with_bilinear_interpolation_pad)),
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand Down Expand Up @@ -266,7 +266,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::ValuesIn(std::vector<size_t> {4}), // gr.
::testing::ValuesIn(std::vector<size_t> {1}), // def. gr.
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT),
::testing::Values(ov::op::PadType::EXPLICIT),
::testing::ValuesIn(with_bilinear_interpolation_pad)),
::testing::Values(false),
::testing::ValuesIn(netPrecisions),
Expand All @@ -285,7 +285,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::ValuesIn(std::vector<size_t> {4}), // gr.
::testing::ValuesIn(std::vector<size_t> {1}), // def. gr.
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT),
::testing::Values(ov::op::PadType::EXPLICIT),
::testing::ValuesIn(with_bilinear_interpolation_pad)),
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ std::vector<std::vector<ov::Shape>> in_shapes_static_check_collapse = {
};

std::vector<std::vector<ov::test::InputShape>> in_shapes_dynamic = {
{{{ngraph::Dimension(1, 10), 200}, {{2, 200}, {1, 200}}},
{{ngraph::Dimension(1, 10), 200}, {{2, 200}, {5, 200}}}},
{{{ov::Dimension(1, 10), 200}, {{2, 200}, {1, 200}}},
{{ov::Dimension(1, 10), 200}, {{2, 200}, {5, 200}}}},
};

std::vector<std::vector<ov::test::InputShape>> in_shapes_dynamic_large_upper_bound = {
{{{ngraph::Dimension(1, 1000000000000), 200}, {{2, 200}, {5, 200}}}},
{{{ov::Dimension(1, 1000000000000), 200}, {{2, 200}, {5, 200}}}},
};

std::vector<ov::test::ElementType> model_types = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//

#include <vector>
#include <ngraph/op/util/attr_types.hpp>
#include "single_op_tests/gru_sequence.hpp"
#include "common_test_utils/test_constants.hpp"
#include "common_test_utils/test_enums.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ std::vector<std::vector<ov::test::InputShape>> input_shapes_static = {
};

std::vector<std::vector<ov::test::InputShape>> input_shapes_dynamic = {
{{{ngraph::Dimension(1, 10), 200}, {{2, 200}, {1, 200}}}}
{{{ov::Dimension(1, 10), 200}, {{2, 200}, {1, 200}}}}
};

std::vector<ov::element::Type> model_types = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const std::vector<std::vector<ov::Shape>> inStaticShapeParams = {

const std::vector<std::vector<ov::test::InputShape>> inDynamicShapeParams = {
// num_batches, num_boxes, 4
{{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), 4},
{{{ov::Dimension::dynamic(), ov::Dimension::dynamic(), 4},
{{1, 10, 4}, {2, 100, 4}}},
// num_batches, num_classes, num_boxes
{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic()},
{{ov::Dimension::dynamic(), ov::Dimension::dynamic(), ov::Dimension::dynamic()},
{{1, 3, 10}, {2, 5, 100}}}},
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100), 4},
{{{ov::Dimension(1, 10), ov::Dimension(1, 100), 4},
{{1, 10, 4}, {2, 100, 4}}},
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100), ngraph::Dimension(1, 100)}},
{{{ov::Dimension(1, 10), ov::Dimension(1, 100), ov::Dimension(1, 100)}},
{{1, 3, 10}, {2, 5, 100}}}}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using ov::test::Mvn1LayerTest;
using ov::test::Mvn6LayerTest;

const std::vector<bool> empty_across_channels = {{}};
const std::vector<ngraph::AxisSet> empty_reduction_axes = {{}};
const std::vector<ov::AxisSet> empty_reduction_axes = {{}};

const std::vector<std::vector<ov::Shape>> input_shapes_static = {
{{8}},
Expand Down Expand Up @@ -69,7 +69,7 @@ const std::vector<std::vector<ov::Shape>> input_shapes_reduction_axes_static = {
const auto MvnReductionAxes = ::testing::Combine(
::testing::ValuesIn(ov::test::static_shapes_to_test_representation(input_shapes_reduction_axes_static)),
::testing::Values(ov::element::f32),
::testing::ValuesIn(std::vector<ngraph::AxisSet>{{1, 2, 3}, {2, 3}}),
::testing::ValuesIn(std::vector<ov::AxisSet>{{1, 2, 3}, {2, 3}}),
::testing::ValuesIn(empty_across_channels),
::testing::ValuesIn(normalize_variance),
::testing::ValuesIn(epsilon),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const std::vector<ov::Shape> inputStaticShape2D = {
};

const std::vector<ov::test::InputShape> inputDynamicShape2D = {
{{ngraph::Dimension::dynamic(), 10}, {{1, 10}, {2, 10}, {10, 10}}},
{{ngraph::Dimension(1, 10), 10}, {{1, 10}, {2, 10}, {10, 10}}},
{{10, ngraph::Dimension::dynamic()}, {{10, 1}, {10, 5}, {10, 10}}},
{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic()}, {{1, 10}, {2, 10}, {10, 10}}}
{{ov::Dimension::dynamic(), 10}, {{1, 10}, {2, 10}, {10, 10}}},
{{ov::Dimension(1, 10), 10}, {{1, 10}, {2, 10}, {10, 10}}},
{{10, ov::Dimension::dynamic()}, {{10, 1}, {10, 5}, {10, 10}}},
{{ov::Dimension::dynamic(), ov::Dimension::dynamic()}, {{1, 10}, {2, 10}, {10, 10}}}
};

const std::vector<int64_t> axis2D = {
Expand Down Expand Up @@ -73,8 +73,8 @@ const std::vector<ov::Shape> inputStaticShape4D = {
};

const std::vector<ov::test::InputShape> inputDynamicShape4D = {
{{ngraph::Dimension::dynamic(), 100, ngraph::Dimension(1, 10), 1}, {{1, 100, 1, 1}, {100, 100, 5, 1}}},
{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic()},
{{ov::Dimension::dynamic(), 100, ov::Dimension(1, 10), 1}, {{1, 100, 1, 1}, {100, 100, 5, 1}}},
{{ov::Dimension::dynamic(), ov::Dimension::dynamic(), ov::Dimension::dynamic(), ov::Dimension::dynamic()},
{{1, 100, 1, 1}, {50, 100, 4, 1}, {2, 100, 10, 1}}},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const auto quantConvBackpropData2DParams = ::testing::Combine(
::testing::ValuesIn(padEnds2D),
::testing::ValuesIn(dilations2D),
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::AUTO),
::testing::Values(ov::op::PadType::AUTO),
::testing::ValuesIn(levels),
::testing::ValuesIn(granularity)
);
Expand Down

0 comments on commit 8ef3834

Please sign in to comment.