Delete serialization tests from ieFuncTests (#13804)

* Delete serialization tests from ieFuncTests

* Extend visitor tests to improve coverage

Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
This commit is contained in:
Oleg Pipikin 2022-11-17 08:48:45 +01:00 committed by GitHub
parent 7d670c5e5f
commit 7c4b7355e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
83 changed files with 737 additions and 3757 deletions

View File

@ -26,6 +26,35 @@ TEST(attributes, avg_pool_op) {
auto rounding_mode = op::RoundingType::FLOOR;
auto auto_pad = op::PadType::EXPLICIT;
auto avg_pool =
make_shared<opset1::AvgPool>(data, strides, pads_begin, pads_end, kernel, exclude_pad, rounding_mode, auto_pad);
avg_pool->set_pads_begin(pads_begin);
avg_pool->set_pads_end(pads_end);
NodeBuilder builder(avg_pool, {data});
auto g_avg_pool = ov::as_type_ptr<opset1::AvgPool>(builder.create());
EXPECT_EQ(g_avg_pool->get_strides(), avg_pool->get_strides());
EXPECT_EQ(g_avg_pool->get_pads_begin(), avg_pool->get_pads_begin());
EXPECT_EQ(g_avg_pool->get_pads_end(), avg_pool->get_pads_end());
EXPECT_EQ(g_avg_pool->get_kernel(), avg_pool->get_kernel());
EXPECT_EQ(g_avg_pool->get_rounding_type(), avg_pool->get_rounding_type());
EXPECT_EQ(g_avg_pool->get_auto_pad(), avg_pool->get_auto_pad());
}
TEST(attributes, avg_pool_op_valid) {
NodeBuilder::get_ops().register_factory<opset1::AvgPool>();
auto data = make_shared<op::Parameter>(element::f32, Shape{64, 3, 5});
auto strides = Strides{2};
auto pads_begin = Shape{1};
auto pads_end = Shape{1};
auto kernel = Shape{1};
bool exclude_pad = false;
auto rounding_mode = op::RoundingType::FLOOR;
auto auto_pad = op::PadType::VALID;
auto avg_pool =
make_shared<opset1::AvgPool>(data, strides, pads_begin, pads_end, kernel, exclude_pad, rounding_mode, auto_pad);

View File

@ -0,0 +1,27 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"
#include "ngraph/op/util/attr_types.hpp"
#include "ngraph/opsets/opset1.hpp"
#include "util/visitor.hpp"
using namespace std;
using namespace ngraph;
using ngraph::test::NodeBuilder;
using ngraph::test::ValueMap;
TEST(attributes, convert_like_op) {
NodeBuilder::get_ops().register_factory<opset1::ConvertLike>();
auto data = make_shared<op::Parameter>(element::i64, Shape{1, 2, 3});
auto like = make_shared<op::Parameter>(element::i64, Shape{1, 2, 3});
auto convertLike = make_shared<opset1::ConvertLike>(data, like);
NodeBuilder builder(convertLike, {data, like});
auto g_convertLike = ov::as_type_ptr<opset1::Concat>(builder.create());
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}

View File

@ -49,3 +49,42 @@ TEST(attributes, deformable_psroi_pooling_op) {
EXPECT_EQ(g_op->get_trans_std(), op->get_trans_std());
EXPECT_EQ(g_op->get_part_size(), op->get_part_size());
}
TEST(attributes, deformable_psroi_pooling_op2) {
NodeBuilder::get_ops().register_factory<opset1::DeformablePSROIPooling>();
auto input = make_shared<op::Parameter>(element::f32, Shape{2, 16, 67, 32});
auto coords = make_shared<op::Parameter>(element::f32, Shape{300, 5});
auto offset = make_shared<op::Parameter>(element::i64, Shape{300, 2, 2, 2});
const int output_dim = 4;
const float spatial_scale = 0.0625;
const int group_size = 2;
string mode = "bilinear_deformable";
const int spatial_bins_x = 2;
const int spatial_bins_y = 3;
const float trans_std = 0.1;
const int part_size = 3;
auto op = make_shared<opset1::DeformablePSROIPooling>(input,
coords,
offset,
output_dim,
spatial_scale,
group_size,
mode,
spatial_bins_x,
spatial_bins_y,
trans_std,
part_size);
NodeBuilder builder(op, {input, coords, offset});
auto g_op = ov::as_type_ptr<opset1::DeformablePSROIPooling>(builder.create());
EXPECT_EQ(g_op->get_output_dim(), op->get_output_dim());
EXPECT_EQ(g_op->get_spatial_scale(), op->get_spatial_scale());
EXPECT_EQ(g_op->get_group_size(), op->get_group_size());
EXPECT_EQ(g_op->get_mode(), op->get_mode());
EXPECT_EQ(g_op->get_spatial_bins_x(), op->get_spatial_bins_x());
EXPECT_EQ(g_op->get_spatial_bins_y(), op->get_spatial_bins_y());
EXPECT_EQ(g_op->get_trans_std(), op->get_trans_std());
EXPECT_EQ(g_op->get_part_size(), op->get_part_size());
}

View File

@ -35,3 +35,36 @@ TEST(visitor_without_attribute, embedding_segments_sum_op) {
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}
TEST(visitor_without_attribute, embedding_segments_sum_op2) {
NodeBuilder::get_ops().register_factory<opset3::EmbeddingSegmentsSum>();
auto emb_table = make_shared<op::Parameter>(element::f32, Shape{5, 2, 3});
auto indices = make_shared<op::Parameter>(element::i64, Shape{4});
auto segment_ids = make_shared<op::Parameter>(element::i64, Shape{4});
auto num_segments = make_shared<op::Parameter>(element::i64, Shape{});
auto default_index = make_shared<op::Parameter>(element::i64, Shape{});
auto ess = make_shared<opset3::EmbeddingSegmentsSum>(emb_table, indices, segment_ids, num_segments, default_index);
NodeBuilder builder(ess, {emb_table, indices, segment_ids, num_segments, default_index});
EXPECT_NO_THROW(auto g_ess = ov::as_type_ptr<opset3::EmbeddingSegmentsSum>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}
TEST(visitor_without_attribute, embedding_segments_sum_op3) {
NodeBuilder::get_ops().register_factory<opset3::EmbeddingSegmentsSum>();
auto emb_table = make_shared<op::Parameter>(element::f32, Shape{5, 2, 3});
auto indices = make_shared<op::Parameter>(element::i64, Shape{4});
auto segment_ids = make_shared<op::Parameter>(element::i64, Shape{4});
auto num_segments = make_shared<op::Parameter>(element::i64, Shape{});
auto ess = make_shared<opset3::EmbeddingSegmentsSum>(emb_table, indices, segment_ids, num_segments);
NodeBuilder builder(ess, {emb_table, indices, segment_ids, num_segments});
EXPECT_NO_THROW(auto g_ess = ov::as_type_ptr<opset3::EmbeddingSegmentsSum>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}

View File

@ -30,3 +30,34 @@ TEST(visitor_without_attribute, embedding_bag_offsets_sum_op) {
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}
TEST(visitor_without_attribute, embedding_bag_offsets_sum_op2) {
NodeBuilder::get_ops().register_factory<opset3::EmbeddingBagOffsetsSum>();
auto emb_table = make_shared<op::Parameter>(element::f32, Shape{5, 2, 3});
auto indices = make_shared<op::Parameter>(element::i64, Shape{4});
auto offsets = make_shared<op::Parameter>(element::i64, Shape{4});
auto default_index = make_shared<op::Parameter>(element::i64, Shape{});
auto ebos = make_shared<opset3::EmbeddingBagOffsetsSum>(emb_table, indices, offsets, default_index);
NodeBuilder builder(ebos, {emb_table, indices, offsets, default_index});
EXPECT_NO_THROW(auto g_ebos = ov::as_type_ptr<opset3::EmbeddingBagOffsetsSum>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}
TEST(visitor_without_attribute, embedding_bag_offsets_sum_op3) {
NodeBuilder::get_ops().register_factory<opset3::EmbeddingBagOffsetsSum>();
auto emb_table = make_shared<op::Parameter>(element::f32, Shape{5, 2, 3});
auto indices = make_shared<op::Parameter>(element::i64, Shape{4});
auto offsets = make_shared<op::Parameter>(element::i64, Shape{4});
auto ebos = make_shared<opset3::EmbeddingBagOffsetsSum>(emb_table, indices, offsets);
NodeBuilder builder(ebos, {emb_table, indices, offsets});
EXPECT_NO_THROW(auto g_ebos = ov::as_type_ptr<opset3::EmbeddingBagOffsetsSum>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}

View File

@ -26,3 +26,16 @@ TEST(visitor_without_attribute, embedding_bag_packed_sum_op) {
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}
TEST(visitor_without_attribute, embedding_bag_packed_sum_op2) {
NodeBuilder::get_ops().register_factory<opset3::EmbeddingBagOffsetsSum>();
auto emb_table = make_shared<op::Parameter>(element::f32, Shape{5, 2});
auto indices = make_shared<op::Parameter>(element::i64, Shape{3, 4});
auto ebps = make_shared<opset3::EmbeddingBagPackedSum>(emb_table, indices);
NodeBuilder builder(ebps, {emb_table, indices});
EXPECT_NO_THROW(auto g_ebps = ov::as_type_ptr<opset3::EmbeddingBagPackedSum>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}

View File

@ -19,7 +19,6 @@ using ngraph::test::ValueMap;
TEST(attributes, gru_cell_op) {
NodeBuilder::get_ops().register_factory<opset5::GRUCell>();
auto X = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto H = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto W = make_shared<op::Parameter>(element::f32, Shape{9, 3});
auto R = make_shared<op::Parameter>(element::f32, Shape{9, 3});
const auto initial_hidden_state = make_shared<op::Parameter>(element::f32, Shape{2, 3});
@ -49,3 +48,38 @@ TEST(attributes, gru_cell_op) {
EXPECT_EQ(g_gru_cell->get_clip(), gru_cell->get_clip());
EXPECT_EQ(g_gru_cell->get_linear_before_reset(), gru_cell->get_linear_before_reset());
}
TEST(attributes, gru_cell_op2) {
NodeBuilder::get_ops().register_factory<opset5::GRUCell>();
auto X = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto W = make_shared<op::Parameter>(element::f32, Shape{9, 3});
auto R = make_shared<op::Parameter>(element::f32, Shape{9, 3});
const auto initial_hidden_state = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto B = make_shared<op::Parameter>(element::f32, Shape{9});
const auto hidden_size = 3;
const std::vector<std::string> activations = {"tanh", "sigmoid"};
auto activations_alpha = std::vector<float>{1.0, 1.5};
auto activations_beta = std::vector<float>{2.0, 1.0};
const float clip = 0.5f;
const auto gru_cell = make_shared<opset5::GRUCell>(X,
initial_hidden_state,
W,
R,
B,
hidden_size,
activations,
activations_alpha,
activations_beta,
clip,
false);
NodeBuilder builder(gru_cell, {X, initial_hidden_state, W, R, B});
auto g_gru_cell = ov::as_type_ptr<opset5::GRUCell>(builder.create());
EXPECT_EQ(g_gru_cell->get_hidden_size(), gru_cell->get_hidden_size());
EXPECT_EQ(g_gru_cell->get_activations(), gru_cell->get_activations());
EXPECT_EQ(g_gru_cell->get_activations_alpha(), gru_cell->get_activations_alpha());
EXPECT_EQ(g_gru_cell->get_activations_beta(), gru_cell->get_activations_beta());
EXPECT_EQ(g_gru_cell->get_clip(), gru_cell->get_clip());
EXPECT_EQ(g_gru_cell->get_linear_before_reset(), gru_cell->get_linear_before_reset());
}

View File

@ -87,3 +87,39 @@ TEST(attributes, lstm_cell_v4_op) {
EXPECT_EQ(g_lstm_cell->get_activations_beta(), lstm_cell->get_activations_beta());
EXPECT_EQ(g_lstm_cell->get_clip(), lstm_cell->get_clip());
}
TEST(attributes, lstm_cell_v4_op2) {
NodeBuilder::get_ops().register_factory<opset4::LSTMCell>();
auto X = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto H = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto W = make_shared<op::Parameter>(element::f32, Shape{12, 3});
auto R = make_shared<op::Parameter>(element::f32, Shape{12, 3});
const auto initial_hidden_state = make_shared<op::Parameter>(element::f32, Shape{2, 3});
const auto initial_cell_state = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto B = make_shared<op::Parameter>(element::f32, Shape{12});
const auto hidden_size = 3;
const std::vector<std::string> activations = {"tanh", "sigmoid", "tanh"};
auto activations_alpha = std::vector<float>{1.0, 1.5};
auto activations_beta = std::vector<float>{2.0, 1.0};
const float clip = 0.5f;
const auto lstm_cell = make_shared<opset4::LSTMCell>(X,
initial_hidden_state,
initial_cell_state,
W,
R,
B,
hidden_size,
activations,
activations_alpha,
activations_beta,
clip);
NodeBuilder builder(lstm_cell, {X, initial_hidden_state, initial_cell_state, W, R, B});
auto g_lstm_cell = ov::as_type_ptr<opset4::LSTMCell>(builder.create());
EXPECT_EQ(g_lstm_cell->get_hidden_size(), lstm_cell->get_hidden_size());
EXPECT_EQ(g_lstm_cell->get_activations(), lstm_cell->get_activations());
EXPECT_EQ(g_lstm_cell->get_activations_alpha(), lstm_cell->get_activations_alpha());
EXPECT_EQ(g_lstm_cell->get_activations_beta(), lstm_cell->get_activations_beta());
EXPECT_EQ(g_lstm_cell->get_clip(), lstm_cell->get_clip());
}

View File

@ -165,4 +165,30 @@ TEST(attributes, multiclass_nms_v9_op_default_attributes) {
EXPECT_EQ(g_nms_attrs.background_class, nms_attrs.background_class);
EXPECT_EQ(g_nms_attrs.nms_eta, nms_attrs.nms_eta);
EXPECT_EQ(g_nms_attrs.normalized, nms_attrs.normalized);
}
}
TEST(attributes, multiclass_nms_v9_op_default_attributes2) {
NodeBuilder::get_ops().register_factory<opset9::MulticlassNms>();
auto boxes = make_shared<op::Parameter>(element::f32, Shape{3, 2, 4});
auto scores = make_shared<op::Parameter>(element::f32, Shape{3, 3, 2});
auto nms = make_shared<opset9::MulticlassNms>(boxes, scores, opset9::MulticlassNms::Attributes());
NodeBuilder builder(nms, {boxes, scores});
auto g_nms = ov::as_type_ptr<opset9::MulticlassNms>(builder.create());
const auto expected_attr_count = 10;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
auto& g_nms_attrs = g_nms->get_attrs();
auto& nms_attrs = nms->get_attrs();
EXPECT_EQ(g_nms_attrs.sort_result_type, nms_attrs.sort_result_type);
EXPECT_EQ(g_nms_attrs.sort_result_across_batch, nms_attrs.sort_result_across_batch);
EXPECT_EQ(g_nms_attrs.output_type, nms_attrs.output_type);
EXPECT_EQ(g_nms_attrs.nms_top_k, nms_attrs.nms_top_k);
EXPECT_EQ(g_nms_attrs.keep_top_k, nms_attrs.keep_top_k);
EXPECT_EQ(g_nms_attrs.iou_threshold, nms_attrs.iou_threshold);
EXPECT_EQ(g_nms_attrs.score_threshold, nms_attrs.score_threshold);
EXPECT_EQ(g_nms_attrs.background_class, nms_attrs.background_class);
EXPECT_EQ(g_nms_attrs.nms_eta, nms_attrs.nms_eta);
EXPECT_EQ(g_nms_attrs.normalized, nms_attrs.normalized);
}

View File

@ -10,6 +10,7 @@
#include "ngraph/opsets/opset4.hpp"
#include "ngraph/opsets/opset5.hpp"
#include "ngraph/opsets/opset8.hpp"
#include "ngraph_functions/builders.hpp"
#include "util/visitor.hpp"
using namespace std;
@ -147,3 +148,50 @@ TEST(attributes, prior_box_v8_op) {
EXPECT_EQ(g_prior_box_attrs.min_max_aspect_ratios_order, prior_box_attrs.min_max_aspect_ratios_order);
EXPECT_EQ(g_prior_box->has_evaluate(), prior_box->has_evaluate());
}
TEST(attributes, prior_box_v8_op2) {
NodeBuilder::get_ops().register_factory<opset8::PriorBox>();
auto params = ngraph::builder::makeParams(ov::element::Type_t::i32, {{128, 128}, {32, 32}});
auto shape_of_1 = std::make_shared<ngraph::opset3::ShapeOf>(params[0]);
auto shape_of_2 = std::make_shared<ngraph::opset3::ShapeOf>(params[1]);
op::v8::PriorBox::Attributes attrs;
attrs.min_size = vector<float>{16.f, 32.f};
attrs.max_size = vector<float>{256.f, 512.f};
attrs.aspect_ratio = vector<float>{0.66f, 1.56f};
attrs.density = vector<float>{0.55f};
attrs.fixed_ratio = vector<float>{0.88f};
attrs.fixed_size = vector<float>{1.25f};
attrs.clip = true;
attrs.flip = false;
attrs.step = 1.0f;
attrs.offset = 0.0f;
attrs.variance = vector<float>{2.22f, 3.14f};
attrs.scale_all_sizes = true;
attrs.min_max_aspect_ratios_order = false;
auto prior_box = make_shared<opset8::PriorBox>(shape_of_1, shape_of_2, attrs);
NodeBuilder builder(prior_box, {shape_of_1, shape_of_2});
auto g_prior_box = ov::as_type_ptr<opset8::PriorBox>(builder.create());
const auto prior_box_attrs = prior_box->get_attrs();
const auto g_prior_box_attrs = g_prior_box->get_attrs();
const auto expected_attr_count = 13;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
EXPECT_EQ(g_prior_box_attrs.min_size, prior_box_attrs.min_size);
EXPECT_EQ(g_prior_box_attrs.max_size, prior_box_attrs.max_size);
EXPECT_EQ(g_prior_box_attrs.aspect_ratio, prior_box_attrs.aspect_ratio);
EXPECT_EQ(g_prior_box_attrs.density, prior_box_attrs.density);
EXPECT_EQ(g_prior_box_attrs.fixed_ratio, prior_box_attrs.fixed_ratio);
EXPECT_EQ(g_prior_box_attrs.fixed_size, prior_box_attrs.fixed_size);
EXPECT_EQ(g_prior_box_attrs.clip, prior_box_attrs.clip);
EXPECT_EQ(g_prior_box_attrs.flip, prior_box_attrs.flip);
EXPECT_EQ(g_prior_box_attrs.step, prior_box_attrs.step);
EXPECT_EQ(g_prior_box_attrs.offset, prior_box_attrs.offset);
EXPECT_EQ(g_prior_box_attrs.variance, prior_box_attrs.variance);
EXPECT_EQ(g_prior_box_attrs.scale_all_sizes, prior_box_attrs.scale_all_sizes);
EXPECT_EQ(g_prior_box_attrs.min_max_aspect_ratios_order, prior_box_attrs.min_max_aspect_ratios_order);
EXPECT_EQ(g_prior_box->has_evaluate(), prior_box->has_evaluate());
}

View File

@ -62,3 +62,25 @@ TEST(attributes, rnn_cell_op_default_attributes) {
EXPECT_EQ(g_rnn_cell->get_activations_alpha(), rnn_cell->get_activations_alpha());
EXPECT_EQ(g_rnn_cell->get_activations_beta(), rnn_cell->get_activations_beta());
}
TEST(attributes, rnn_cell_op_default_attributes2) {
NodeBuilder::get_ops().register_factory<opset1::RNNCell>();
auto X = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto H = make_shared<op::Parameter>(element::f32, Shape{2, 3});
auto W = make_shared<op::Parameter>(element::f32, Shape{3, 3});
auto R = make_shared<op::Parameter>(element::f32, Shape{3, 3});
auto B = make_shared<op::Parameter>(element::f32, Shape{3});
const size_t hidden_size = 3;
auto rnn_cell = make_shared<opset1::RNNCell>(X, H, W, R, B, hidden_size);
NodeBuilder builder(rnn_cell, {X, H, W, R, B});
auto g_rnn_cell = ov::as_type_ptr<opset1::RNNCell>(builder.create());
EXPECT_EQ(g_rnn_cell->get_hidden_size(), rnn_cell->get_hidden_size());
EXPECT_EQ(g_rnn_cell->get_clip(), rnn_cell->get_clip());
EXPECT_EQ(g_rnn_cell->get_activations(), rnn_cell->get_activations());
EXPECT_EQ(g_rnn_cell->get_activations_alpha(), rnn_cell->get_activations_alpha());
EXPECT_EQ(g_rnn_cell->get_activations_beta(), rnn_cell->get_activations_beta());
}

View File

@ -0,0 +1,28 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"
#include "ngraph/op/util/attr_types.hpp"
#include "ngraph/opsets/opset4.hpp"
#include "util/visitor.hpp"
using namespace ngraph;
using ngraph::test::NodeBuilder;
using ngraph::test::ValueMap;
TEST(attributes, scatter_nd_update) {
NodeBuilder::get_ops().register_factory<opset4::ScatterNDUpdate>();
auto data = std::make_shared<op::Parameter>(element::f32, Shape{1000, 256, 10, 15});
auto indices = std::make_shared<op::Parameter>(element::i32, Shape{25, 125, 3});
auto updates = std::make_shared<op::Parameter>(element::f32, Shape{25, 125, 15});
auto scatter = std::make_shared<opset4::ScatterNDUpdate>(data, indices, updates);
NodeBuilder builder(scatter, {data, indices, updates});
EXPECT_NO_THROW(auto g_scatter = ov::as_type_ptr<opset4::ScatterNDUpdate>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}

View File

@ -30,6 +30,8 @@ TEST(attributes, scatter_update_op) {
auto op = make_shared<ScatterUpdate>(R, I, U, A);
NodeBuilder builder(op, {R, I, U, A});
EXPECT_NO_THROW(auto g_op = ov::as_type_ptr<ScatterUpdate>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);

View File

@ -21,6 +21,7 @@ TEST(attributes, slice_op_no_axes) {
const auto op = make_shared<opset8::Slice>(data, start, stop, step);
NodeBuilder builder(op, {data, start, stop, step});
EXPECT_NO_THROW(auto g_op = ov::as_type_ptr<opset8::Slice>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
@ -36,6 +37,7 @@ TEST(attributes, slice_op_with_axes) {
const auto op = make_shared<opset8::Slice>(data, start, stop, step, axes);
NodeBuilder builder(op, {data, start, stop, step, axes});
EXPECT_NO_THROW(auto g_op = ov::as_type_ptr<opset8::Slice>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);

View File

@ -2,8 +2,35 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "unary_ops.hpp"
#include "gtest/gtest.h"
#include "ngraph/opsets/opset4.hpp"
#include "util/visitor.hpp"
using Type = ::testing::Types<UnaryOperatorType<ngraph::op::v4::Swish, ngraph::element::f32>>;
using namespace std;
using namespace ngraph;
using ngraph::test::NodeBuilder;
INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, Type, UnaryOperatorTypeName);
TEST(attributes, swish_op) {
NodeBuilder::get_ops().register_factory<opset4::Swish>();
const auto data = make_shared<op::Parameter>(element::f32, Shape{1, 2, 3});
const auto op = make_shared<opset4::Swish>(data);
NodeBuilder builder(op, {data});
EXPECT_NO_THROW(auto g_op = ov::as_type_ptr<opset4::Swish>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}
TEST(attributes, swish_op2) {
NodeBuilder::get_ops().register_factory<opset4::Swish>();
const auto data = make_shared<op::Parameter>(element::f32, Shape{1, 2, 3});
const auto beta = make_shared<op::Parameter>(element::f32, Shape{});
const auto op = make_shared<opset4::Swish>(data, beta);
NodeBuilder builder(op, {data, beta});
EXPECT_NO_THROW(auto g_op = ov::as_type_ptr<opset4::Swish>(builder.create()));
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}

View File

@ -1302,3 +1302,88 @@ TEST_F(IRFrontendTests, name_with_comma) {
auto it = names.find(tensor_name);
EXPECT_NE(it, names.end());
}
TEST_F(IRFrontendTests, DetectionOutput) {
std::string testModel = R"V0G0N(
<net name="DetectionOutput" version="11">
<layers>
<layer id="2" name="Parameter_186617" type="Parameter" version="opset1">
<data shape="1,60" element_type="f32" />
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>60</dim>
</port>
</output>
</layer>
<layer id="1" name="Parameter_186618" type="Parameter" version="opset1">
<data shape="1,165" element_type="f32" />
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>165</dim>
</port>
</output>
</layer>
<layer id="0" name="Parameter_186619" type="Parameter" version="opset1">
<data shape="1,1,60" element_type="f32" />
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>60</dim>
</port>
</output>
</layer>
<layer id="3" name="DetectionOutput_186620" type="DetectionOutput" version="opset1">
<data num_classes="11" background_label_id="0" top_k="75" variance_encoded_in_target="true" keep_top_k="50" code_type="caffe.PriorBoxParameter.CORNER" share_location="true" nms_threshold="0.5" confidence_threshold="0.30000001192092896" clip_after_nms="true" clip_before_nms="true" decrease_label_id="true" normalized="true" input_height="1" input_width="1" objectness_score="0.40000000596046448" />
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>60</dim>
</port>
<port id="1" precision="FP32">
<dim>1</dim>
<dim>165</dim>
</port>
<port id="2" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>60</dim>
</port>
</input>
<output>
<port id="3" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>50</dim>
<dim>7</dim>
</port>
</output>
</layer>
<layer id="4" name="Result_186621" type="Result" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>50</dim>
<dim>7</dim>
</port>
</input>
</layer>
</layers>
<edges>
<edge from-layer="0" from-port="0" to-layer="3" to-port="2" />
<edge from-layer="1" from-port="0" to-layer="3" to-port="1" />
<edge from-layer="2" from-port="0" to-layer="3" to-port="0" />
<edge from-layer="3" from-port="3" to-layer="4" to-port="0" />
</edges>
<rt_info />
</net>
)V0G0N";
std::shared_ptr<ov::Model> model;
ASSERT_NO_THROW(model = getWithIRFrontend(testModel));
ASSERT_TRUE(!!model);
}

View File

@ -1444,3 +1444,253 @@ TEST_F(IRFrontendTestsTensorIterator, tensor_iterator_negative_stride_opset4) {
ASSERT_NO_THROW(model = core.read_model(xmlFileName, binFileName));
ASSERT_TRUE(!!model);
}
TEST_F(IRFrontendTestsTensorIterator, test1) {
std::string xmlModel = R"V0G0N(
<?xml version="1.0"?>
<net name="Model169" version="10">
<layers>
<layer id="0" name="Parameter_2683" type="Parameter" version="opset1">
<data shape="1,128" element_type="f32" />
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</output>
</layer>
<layer id="1" name="Parameter_2682" type="Parameter" version="opset1">
<data shape="1,2,10" element_type="f32" />
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>2</dim>
<dim>10</dim>
</port>
</output>
</layer>
<layer id="2" name="TensorIterator_2680" type="TensorIterator" version="opset1">
<port_map>
<input axis="1" external_port_id="0" internal_layer_id="1" start="0" end="-1" stride="1" part_size="1" />
<input external_port_id="1" internal_layer_id="0" />
<output axis="1" external_port_id="2" internal_layer_id="9" start="0" end="-1" stride="1" part_size="1" />
<output external_port_id="3" internal_layer_id="10" />
</port_map>
<back_edges>
<edge from-layer="10" to-layer="0" />
</back_edges>
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>2</dim>
<dim>10</dim>
</port>
<port id="1" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</input>
<output>
<port id="2" precision="FP32">
<dim>1</dim>
<dim>2</dim>
<dim>128</dim>
</port>
<port id="3" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</output>
<body>
<layers>
<layer id="0" name="Parameter_2685" type="Parameter" version="opset1">
<data shape="1,128" element_type="f32" />
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</output>
</layer>
<layer id="1" name="Parameter_2684" type="Parameter" version="opset1">
<data shape="1,1,10" element_type="f32" />
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>10</dim>
</port>
</output>
</layer>
<layer id="2" name="Constant_2681" type="Const" version="opset1">
<data element_type="i64" shape="1" offset="0" size="8" />
<output>
<port id="0" precision="I64">
<dim>1</dim>
</port>
</output>
</layer>
<layer id="3" name="Squeeze_2686" type="Squeeze" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>10</dim>
</port>
<port id="1" precision="I64">
<dim>1</dim>
</port>
</input>
<output>
<port id="2" precision="FP32">
<dim>1</dim>
<dim>10</dim>
</port>
</output>
</layer>
<layer id="4" name="Constant_2687" type="Const" version="opset1">
<data element_type="f32" shape="384, 10" offset="8" size="15360" />
<output>
<port id="0" precision="FP32">
<dim>384</dim>
<dim>10</dim>
</port>
</output>
</layer>
<layer id="5" name="Constant_2688" type="Const" version="opset1">
<data element_type="f32" shape="384, 128" offset="15368" size="196608" />
<output>
<port id="0" precision="FP32">
<dim>384</dim>
<dim>128</dim>
</port>
</output>
</layer>
<layer id="6" name="Constant_2689" type="Const" version="opset1">
<data element_type="f32" shape="384" offset="211976" size="1536" />
<output>
<port id="0" precision="FP32">
<dim>384</dim>
</port>
</output>
</layer>
<layer id="7" name="GRUCell_2690" type="GRUCell" version="opset3">
<data linear_before_reset="false" hidden_size="128" activations="sigmoid, tanh" activations_alpha="" activations_beta="" clip="0" />
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>10</dim>
</port>
<port id="1" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
<port id="2" precision="FP32">
<dim>384</dim>
<dim>10</dim>
</port>
<port id="3" precision="FP32">
<dim>384</dim>
<dim>128</dim>
</port>
<port id="4" precision="FP32">
<dim>384</dim>
</port>
</input>
<output>
<port id="5" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</output>
</layer>
<layer id="8" name="Unsqueeze_2691" type="Unsqueeze" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
<port id="1" precision="I64">
<dim>1</dim>
</port>
</input>
<output>
<port id="2" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>128</dim>
</port>
</output>
</layer>
<layer id="9" name="Result_2693" type="Result" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>1</dim>
<dim>128</dim>
</port>
</input>
</layer>
<layer id="10" name="Result_2692" type="Result" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</input>
</layer>
</layers>
<edges>
<edge from-layer="0" from-port="0" to-layer="7" to-port="1" />
<edge from-layer="1" from-port="0" to-layer="3" to-port="0" />
<edge from-layer="2" from-port="0" to-layer="3" to-port="1" />
<edge from-layer="2" from-port="0" to-layer="8" to-port="1" />
<edge from-layer="3" from-port="2" to-layer="7" to-port="0" />
<edge from-layer="4" from-port="0" to-layer="7" to-port="2" />
<edge from-layer="5" from-port="0" to-layer="7" to-port="3" />
<edge from-layer="6" from-port="0" to-layer="7" to-port="4" />
<edge from-layer="7" from-port="5" to-layer="8" to-port="0" />
<edge from-layer="7" from-port="5" to-layer="10" to-port="0" />
<edge from-layer="8" from-port="2" to-layer="9" to-port="0" />
</edges>
<rt_info />
</body>
</layer>
<layer id="3" name="Result_2695" type="Result" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</input>
</layer>
<layer id="4" name="Result_2694" type="Result" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>2</dim>
<dim>128</dim>
</port>
</input>
</layer>
</layers>
<edges>
<edge from-layer="0" from-port="0" to-layer="2" to-port="1" />
<edge from-layer="1" from-port="0" to-layer="2" to-port="0" />
<edge from-layer="2" from-port="3" to-layer="3" to-port="0" />
<edge from-layer="2" from-port="2" to-layer="4" to-port="0" />
</edges>
<rt_info />
</net>
)V0G0N";
std::vector<unsigned char> buffer(213512, 0);
int64_t* int64Buffer = reinterpret_cast<int64_t*>(buffer.data());
int64Buffer[0] = 1;
createTemporalModelFile(xmlModel, buffer);
std::shared_ptr<ov::Model> model;
ASSERT_NO_THROW(model = core.read_model(xmlFileName, binFileName));
ASSERT_TRUE(!!model);
}

View File

@ -1,8 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "functional_test_utils/core_config.hpp"
void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) {
}

View File

@ -1,112 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/activation.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ngraph::helpers;
namespace {
TEST_P(ActivationLayerTest, Serialize) {
Serialize();
}
// Common params
const std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::FP32
// TODO: Fix Issue-27390
// InferenceEngine::Precision::I16,
// InferenceEngine::Precision::U8
};
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::map<ActivationTypes, std::vector<std::vector<float>>> activationTypes = {
{Sigmoid, {}},
{Tanh, {}},
{Relu, {}},
{Exp, {}},
{Log, {}},
{Sign, {}},
{Abs, {}},
{Clamp, {{-2.0f, 2.0f}}},
{Negative, {}},
{Acos, {}},
{Acosh, {}},
{Asin, {}},
{Asinh, {}},
{Atan, {}},
{Atanh, {}},
{Cos, {}},
{Cosh, {}},
{Floor, {}},
{Sin, {}},
{Sinh, {}},
{Sqrt, {}},
{Tan, {}},
{Elu, {{0.1f}}},
{Erf, {}},
{HardSigmoid, {{0.2f, 0.5f}}},
{Selu, {{1.6732f, 1.0507f}}},
{Ceiling, {}},
{Mish, {}},
{HSwish, {}},
{Swish, {{0.3f}}},
{SoftPlus, {}},
{HSigmoid, {}},
{RoundHalfToEven, {}},
{RoundHalfAwayFromZero, {}},
{GeluErf, {}},
{GeluTanh, {}}
};
const std::map<ActivationTypes, std::vector<std::vector<float>>> activationParamTypes = {
{PReLu, {{-0.01f}}},
{LeakyRelu, {{0.01f}}}
};
std::map<std::vector<size_t>, std::vector<std::vector<size_t>>> basic = {
{{1, 50}, {{}}},
{{1, 128}, {{}}},
};
std::map<std::vector<size_t>, std::vector<std::vector<size_t>>> preluBasic = {
{{1, 50}, {{1}, {50}}},
{{1, 128}, {{1}, {128}}},
};
const auto basicCases = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(activationTypes)),
::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(CommonTestUtils::combineParams(basic)),
::testing::Values(CommonTestUtils::DEVICE_CPU)
);
const auto basicPreluCases = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(activationParamTypes)),
::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(CommonTestUtils::combineParams(preluBasic)),
::testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(smoke_Activation_Basic, ActivationLayerTest, basicCases, ActivationLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Activation_Basic_Prelu, ActivationLayerTest, basicPreluCases, ActivationLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Activation_Basic, ActivationParamLayerTest, basicPreluCases, ActivationLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Activation_Basic, ActivationDynamicLayerTest, basicCases, ActivationLayerTest::getTestCaseName);
} // namespace

View File

@ -1,55 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/batch_norm.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(BatchNormLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<double> epsilon = {
0.0,
1e-6,
1e-5,
1e-4
};
const std::vector<std::vector<size_t>> inputShapes = {
{1, 3},
{2, 5},
{1, 3, 10},
{1, 3, 1, 1},
{2, 5, 4, 4},
};
const auto batchNormParams = testing::Combine(
testing::ValuesIn(epsilon),
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(inputShapes),
testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(
smoke_BatchNorm_Serialization,
BatchNormLayerTest,
batchNormParams,
BatchNormLayerTest::getTestCaseName
);
} // namespace

View File

@ -1,72 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/batch_to_space.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(BatchToSpaceLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16};
const std::vector<std::vector<int64_t>> block_shapes_4D = {
{1, 1, 2, 2},
{1, 1, 4, 2}
};
const std::vector<std::vector<int64_t>> crops_4D = {
{0, 0, 0, 0},
{0, 0, 1, 0},
{0, 0, 0, 1}
};
const auto batch_to_space_4D_params = ::testing::Combine(
::testing::ValuesIn(block_shapes_4D),
::testing::ValuesIn(crops_4D),
::testing::ValuesIn(crops_4D),
::testing::Values(std::vector<size_t>{16, 1, 2, 2}),
::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(CommonTestUtils::DEVICE_CPU));
const std::vector<std::vector<int64_t>> block_shapes_5D = {
{1, 1, 2, 1, 3},
{1, 1, 4, 2, 2}
};
const std::vector<std::vector<int64_t>> crops_5D = {
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 1},
{0, 0, 0, 1, 1}
};
const auto batch_to_space_5D_params = ::testing::Combine(
::testing::ValuesIn(block_shapes_5D),
::testing::ValuesIn(crops_5D),
::testing::ValuesIn(crops_5D),
::testing::Values(std::vector<size_t>{48, 1, 3, 4, 2}),
::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(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(
smoke_BatchToSpace_Serialization_4D, BatchToSpaceLayerTest,
batch_to_space_4D_params,
BatchToSpaceLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_BatchToSpace_Serialization_5D, BatchToSpaceLayerTest,
batch_to_space_5D_params,
BatchToSpaceLayerTest::getTestCaseName);
} // namespace

View File

@ -1,63 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/binary_convolution.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(BinaryConvolutionLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16};
const std::vector<std::vector<size_t>> kernels = {{3, 5}};
const std::vector<std::vector<size_t>> strides = {{1, 3}};
const std::vector<std::vector<ptrdiff_t>> padBegins = {{0, 3}};
const std::vector<std::vector<ptrdiff_t>> padEnds = {{0, 3}};
const std::vector<std::vector<size_t>> dilations = {{3, 1}};
const std::vector<size_t> numOutChannels = {5};
const std::vector<float> pad_values = {0, 1};
const auto binConv2DParams_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::ValuesIn(pad_values));
const auto binConv2DParams_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::ValuesIn(pad_values));
INSTANTIATE_TEST_SUITE_P(
smoke_BinaryConvolution2D_Serialization_ExplicitPadding, BinaryConvolutionLayerTest,
::testing::Combine(
binConv2DParams_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<size_t>({1, 3, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
BinaryConvolutionLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_BinaryConvolution2D__Serialization_AutoPadValid, BinaryConvolutionLayerTest,
::testing::Combine(
binConv2DParams_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<size_t>({1, 3, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
BinaryConvolutionLayerTest::getTestCaseName);
} // namespace

View File

@ -1,33 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/broadcast.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(BroadcastLayerTest, Serialize) { Serialize(); }
const std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::I32,
InferenceEngine::Precision::BOOL};
// NUMPY MODE
std::vector<std::vector<size_t>> inShapesNumpy = {{3, 1}, {1, 4, 1}};
std::vector<std::vector<size_t>> targetShapesNumpy = {{2, 3, 6}, {1, 4, 4}};
const auto numpyBroadcastParams1 = ::testing::Combine(
::testing::Values(targetShapesNumpy[0]),
::testing::Values(ngraph::AxisSet{}), // not used in numpy mode
::testing::Values(ngraph::op::BroadcastType::NUMPY),
::testing::Values(inShapesNumpy[0]), ::testing::ValuesIn(inputPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_Broadcast1Serialization, BroadcastLayerTest,
numpyBroadcastParams1,
BroadcastLayerTest::getTestCaseName);
} // namespace

View File

@ -1,34 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/clamp.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ClampLayerTest, Serialize) {
Serialize();
}
const std::vector<std::vector<size_t>> inShapes = {
{50}, {10, 10}, {1, 20, 20}, {2, 3, 50, 50}};
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::I32};
const std::vector<std::pair<float, float>> intervals = {
{-20.1, -10.5}, {-10.0, 10.0}, {10.3, 20.4}};
INSTANTIATE_TEST_SUITE_P(
smoke_Clamp_Serialization, ClampLayerTest,
::testing::Combine(
::testing::ValuesIn(inShapes),
::testing::ValuesIn(intervals),
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ClampLayerTest::getTestCaseName);
} // namespace

View File

@ -1,16 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/comparison.hpp"
struct ComparisionOpsData {
const std::map<std::vector<size_t>, std::vector<std::vector<size_t>>> inputShapes;
const std::vector<InferenceEngine::Precision> inputsPrecisions;
const std::vector<ngraph::helpers::InputLayerType> secondInputTypes;
const std::map<std::string, std::string> additional_config;
const ngraph::helpers::ComparisonTypes opType;
const InferenceEngine::Precision ieInputPrecision;
const InferenceEngine::Precision ieOutputPrecision;
const std::string deviceName;
};

View File

@ -1,56 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/constant.hpp"
#include <vector>
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ConstantLayerTest, Serialize) {
Serialize();
}
std::vector<std::vector<size_t>> shapes = {
{2, 2, 3},
{3, 4, 1},
{1, 1, 12},
};
std::vector<InferenceEngine::Precision> precisions = {
InferenceEngine::Precision::BIN, InferenceEngine::Precision::BF16,
InferenceEngine::Precision::FP16, InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP64, InferenceEngine::Precision::U4,
InferenceEngine::Precision::U8, InferenceEngine::Precision::U16,
InferenceEngine::Precision::U32, InferenceEngine::Precision::I4,
InferenceEngine::Precision::I8, InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32,
};
std::vector<std::string> data = {"1", "2", "3", "4", "5", "6", "7", "1", "2", "3", "4", "5"};
std::vector<InferenceEngine::Precision> precisionsWithNegativeValues = {
InferenceEngine::Precision::BF16, InferenceEngine::Precision::FP16,
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP64,
InferenceEngine::Precision::I4, InferenceEngine::Precision::I8,
InferenceEngine::Precision::I16, InferenceEngine::Precision::I32,
};
std::vector<std::string> dataWithNegativeValues = {"1", "-2", "3", "-4", "5", "-6",
"7", "-1", "2", "-3", "4", "-5"};
INSTANTIATE_TEST_SUITE_P(smoke_Constant_Serialization, ConstantLayerTest,
::testing::Combine(::testing::ValuesIn(shapes),
::testing::ValuesIn(precisions), ::testing::Values(data),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConstantLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Constant_Serialization_with_negative_values, ConstantLayerTest,
::testing::Combine(::testing::ValuesIn(shapes),
::testing::ValuesIn(precisionsWithNegativeValues),
::testing::Values(dataWithNegativeValues),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConstantLayerTest::getTestCaseName);
} // namespace

View File

@ -1,44 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/conversion.hpp"
#include <vector>
using namespace LayerTestsDefinitions;
namespace {
const std::vector<ngraph::helpers::ConversionTypes> conversionOpTypes = {
ngraph::helpers::ConversionTypes::CONVERT,
ngraph::helpers::ConversionTypes::CONVERT_LIKE,
};
const std::vector<std::vector<size_t>> inShape = {{1, 2, 3, 4}};
const std::vector<InferenceEngine::Precision> precisions = {
InferenceEngine::Precision::BOOL, InferenceEngine::Precision::BIN,
InferenceEngine::Precision::U4, InferenceEngine::Precision::U8,
InferenceEngine::Precision::I4, InferenceEngine::Precision::I8,
InferenceEngine::Precision::U16, InferenceEngine::Precision::I16,
InferenceEngine::Precision::U32, InferenceEngine::Precision::I32,
InferenceEngine::Precision::U64, InferenceEngine::Precision::I64,
InferenceEngine::Precision::BF16, InferenceEngine::Precision::FP16,
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP64};
TEST_P(ConversionLayerTest, Serialize) {
Serialize();
}
INSTANTIATE_TEST_SUITE_P(
smoke_Serialization_ConversionLayerTest, ConversionLayerTest,
::testing::Combine(::testing::ValuesIn(conversionOpTypes),
::testing::Values(inShape),
::testing::ValuesIn(precisions),
::testing::ValuesIn(precisions),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConversionLayerTest::getTestCaseName);
} // namespace

View File

@ -1,33 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/convert_color_i420.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ConvertColorI420LayerTest, Serialize) {
Serialize();
}
const std::vector<ov::Shape> inShapes_nhwc = {
{1, 10, 10, 1}
};
const std::vector<ov::element::Type> inTypes = {
ov::element::u8, ov::element::f32
};
const auto testCase_values = ::testing::Combine(
::testing::ValuesIn(inShapes_nhwc),
::testing::ValuesIn(inTypes),
::testing::Bool(),
::testing::Bool(),
::testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ConvertColorI420LayerTest, testCase_values, ConvertColorI420LayerTest::getTestCaseName);
} // namespace

View File

@ -1,33 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/convert_color_nv12.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ConvertColorNV12LayerTest, Serialize) {
Serialize();
}
const std::vector<ov::Shape> inShapes_nhwc = {
{1, 10, 10, 1}
};
const std::vector<ov::element::Type> inTypes = {
ov::element::u8, ov::element::f32
};
const auto testCase_values = ::testing::Combine(
::testing::ValuesIn(inShapes_nhwc),
::testing::ValuesIn(inTypes),
::testing::Bool(),
::testing::Bool(),
::testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ConvertColorNV12LayerTest, testCase_values, ConvertColorNV12LayerTest::getTestCaseName);
} // namespace

View File

@ -1,62 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/convolution.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ConvolutionLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I16, InferenceEngine::Precision::I32,
InferenceEngine::Precision::I64};
const std::vector<std::vector<size_t>> kernels = {{3, 5}};
const std::vector<std::vector<size_t>> strides = {{1, 3}};
const std::vector<std::vector<ptrdiff_t>> padBegins = {{0, 3}};
const std::vector<std::vector<ptrdiff_t>> padEnds = {{0, 3}};
const std::vector<std::vector<size_t>> dilations = {{3, 1}};
const std::vector<size_t> numOutChannels = {5};
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));
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));
INSTANTIATE_TEST_SUITE_P(
smoke_Convolution2D_Serialization_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<size_t>({1, 3, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConvolutionLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_Convolution2D__Serialization_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<size_t>({1, 3, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConvolutionLayerTest::getTestCaseName);
} // namespace

View File

@ -1,58 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/convolution_backprop_data.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ConvolutionBackpropDataLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> precisions = {
InferenceEngine::Precision::FP64, InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16, InferenceEngine::Precision::BF16,
InferenceEngine::Precision::I8, InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32, InferenceEngine::Precision::I64,
InferenceEngine::Precision::U8, InferenceEngine::Precision::U16,
InferenceEngine::Precision::U32, InferenceEngine::Precision::U64,
};
const std::vector<std::vector<size_t>> kernels = {{3, 3}};
const std::vector<std::vector<size_t>> strides = {{1, 1}};
const std::vector<std::vector<ptrdiff_t>> padBegins = {{0, 0}};
const std::vector<std::vector<ptrdiff_t>> padEnds = {{0, 0}};
const std::vector<std::vector<size_t>> dilations = {{1, 1}};
const std::vector<std::vector<ptrdiff_t>> outPadding = {{}, {1, 1}};
const std::vector<size_t> numOutChannels = {8, 16};
const std::vector<ngraph::op::PadType> pad_types = {
ngraph::op::PadType::EXPLICIT, ngraph::op::PadType::VALID,
ngraph::op::PadType::SAME_LOWER, ngraph::op::PadType::SAME_UPPER};
const auto inputShapes = std::vector<size_t>({1, 16, 20, 20});
const std::vector<std::vector<size_t >> emptyOutputShape = {{}};
const auto convolutionBackpropData2DParams = ::testing::Combine(
::testing::ValuesIn(kernels), ::testing::ValuesIn(strides),
::testing::ValuesIn(padBegins), ::testing::ValuesIn(padEnds),
::testing::ValuesIn(dilations), ::testing::ValuesIn(numOutChannels),
::testing::ValuesIn(pad_types), ::testing::ValuesIn(outPadding));
INSTANTIATE_TEST_SUITE_P(
smoke_convolutionBackpropData2D_Serialization, ConvolutionBackpropDataLayerTest,
::testing::Combine(
convolutionBackpropData2DParams,
::testing::ValuesIn(precisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(inputShapes),
::testing::ValuesIn(emptyOutputShape),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConvolutionBackpropDataLayerTest::getTestCaseName);
} // namespace

View File

@ -1,43 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/ctc_loss.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(CTCLossLayerTest, Serialize) { Serialize(); }
const std::vector<InferenceEngine::Precision> fPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16};
const std::vector<InferenceEngine::Precision> iPrecisions = {
InferenceEngine::Precision::I32,
InferenceEngine::Precision::I64};
const std::vector<bool> preprocessCollapseRepeated = {true, false};
const std::vector<bool> ctcMergeRepeated = {true, false};
const std::vector<bool> unique = {true, false};
const auto ctcLossArgsSubset1 = ::testing::Combine(
::testing::Values(std::vector<size_t>({2, 3, 3})), // logits shape
::testing::ValuesIn(std::vector<std::vector<int>>({{2, 3}, {3, 3}})), // logits length
::testing::ValuesIn(std::vector<std::vector<std::vector<int>>>(
{{{0, 1, 0}, {1, 0, 1}}, {{0, 1, 2}, {1, 1, 1}}})), // labels
::testing::ValuesIn(std::vector<std::vector<int>>({{2, 2}, {2, 1}})), // labels length
::testing::Values(2), // blank index
::testing::ValuesIn(preprocessCollapseRepeated),
::testing::ValuesIn(ctcMergeRepeated),
::testing::ValuesIn(unique));
INSTANTIATE_TEST_SUITE_P(smoke_CTCLossSerialization, CTCLossLayerTest,
::testing::Combine(
ctcLossArgsSubset1,
::testing::ValuesIn(fPrecisions),
::testing::ValuesIn(iPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
CTCLossLayerTest::getTestCaseName);
} // namespace

View File

@ -1,74 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/deformable_convolution.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(DeformableConvolutionLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32, InferenceEngine::Precision::I16};
const std::vector<std::vector<size_t>> offsets = {{1, 18, 26, 26}};
const std::vector<std::vector<size_t>> filters = {{1, 1, 3, 3}};
const std::vector<std::vector<size_t>> strides = {{1, 1}};
const std::vector<std::vector<ptrdiff_t>> padBegins = {{0, 0}};
const std::vector<std::vector<ptrdiff_t>> padEnds ={{0, 0}};
const std::vector<std::vector<size_t>> dilations = {{1, 1}};
const std::vector<size_t> groups = {1};
const std::vector<size_t> defor_groups = {1};
const std::vector<size_t> numOutChannels = {1};
const std::vector<bool> with_bilinear_interpolation_pad = { false, true };
const std::vector<bool> with_modulated_scalar = { false, true };
const auto conv2DParams_ExplicitPadding = ::testing::Combine(
::testing::ValuesIn(offsets), ::testing::ValuesIn(filters),
::testing::ValuesIn(strides), ::testing::ValuesIn(padBegins),
::testing::ValuesIn(padEnds), ::testing::ValuesIn(dilations),
::testing::ValuesIn(groups), ::testing::ValuesIn(defor_groups),
::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::EXPLICIT),
::testing::ValuesIn(with_bilinear_interpolation_pad),
::testing::ValuesIn(with_modulated_scalar));
const auto conv2DParams_AutoPadValid = ::testing::Combine(
::testing::ValuesIn(offsets), ::testing::ValuesIn(filters),
::testing::ValuesIn(strides),
::testing::Values(std::vector<ptrdiff_t>({0, 0})),
::testing::Values(std::vector<ptrdiff_t>({0, 0})),
::testing::ValuesIn(dilations), ::testing::ValuesIn(groups),
::testing::ValuesIn(defor_groups), ::testing::ValuesIn(numOutChannels),
::testing::Values(ngraph::op::PadType::VALID),
::testing::ValuesIn(with_bilinear_interpolation_pad),
::testing::ValuesIn(with_modulated_scalar));
INSTANTIATE_TEST_SUITE_P(
smoke_DeformableConvolution2D_Serialization_ExplicitPadding, DeformableConvolutionLayerTest,
::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<size_t>({1, 1, 28, 28})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
DeformableConvolutionLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_DeformableConvolution2D__Serialization_AutoPadValid, DeformableConvolutionLayerTest,
::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<size_t>({1, 1, 28, 28})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
DeformableConvolutionLayerTest::getTestCaseName);
} // namespace

View File

@ -1,35 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/deformable_psroi_pooling.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(DeformablePSROIPoolingLayerTest, Serialize) {
Serialize();
}
const auto deformablePSROIParams = ::testing::Combine(
::testing::ValuesIn(std::vector<std::vector<size_t>>{{3, 8, 16, 16}, {1, 8, 67, 32}}), // data input shape
::testing::Values(std::vector<size_t>{10, 5}), // rois input shape
// Empty offsets shape means test without optional third input
::testing::ValuesIn(std::vector<std::vector<size_t>>{{}, {10, 2, 2, 2}}), // offsets input shape
::testing::Values(2), // output_dim
::testing::Values(2), // group_size
::testing::ValuesIn(std::vector<float>{1.0, 0.5, 0.0625}), // spatial scale
::testing::ValuesIn(std::vector<std::vector<int64_t>>{{1, 1}, {2, 2}, {3, 3}, {2, 3}}), // spatial_bins_x_y
::testing::ValuesIn(std::vector<float>{0.0, 0.01, 0.5}), // trans_std
::testing::Values(2)); // part_size
const auto deformablePSROICases_test_params = ::testing::Combine(
deformablePSROIParams,
::testing::Values(InferenceEngine::Precision::FP32), // Net precision
::testing::Values(CommonTestUtils::DEVICE_CPU)); // Device name
INSTANTIATE_TEST_SUITE_P(smoke_TestsDeformablePSROIPooling, DeformablePSROIPoolingLayerTest, deformablePSROICases_test_params,
DeformablePSROIPoolingLayerTest::getTestCaseName);
} // namespace

View File

@ -1,40 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/depth_to_space.hpp"
#include <ngraph/opsets/opset3.hpp>
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ngraph::opset3;
namespace {
TEST_P(DepthToSpaceLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
};
const std::vector<DepthToSpace::DepthToSpaceMode> modes = {
DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST,
DepthToSpace::DepthToSpaceMode::DEPTH_FIRST};
const std::vector<std::vector<size_t>> inputShapesBS2 = {
{1, 4, 1, 1}, {1, 4, 2, 2}, {1, 4, 3, 3}, {2, 32, 3, 3},
{2, 16, 5, 4}, {1, 8, 1, 1, 1}, {1, 8, 2, 2, 2}, {1, 8, 3, 3, 3},
{2, 32, 3, 3, 3}, {2, 16, 5, 4, 6}};
INSTANTIATE_TEST_SUITE_P(
smoke_DepthToSpaceSerialization, DepthToSpaceLayerTest,
::testing::Combine(::testing::ValuesIn(inputShapesBS2),
::testing::ValuesIn(inputPrecisions),
::testing::ValuesIn(modes), ::testing::Values(1, 2),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
DepthToSpaceLayerTest::getTestCaseName);
} // namespace

View File

@ -1,74 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/detection_output.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(DetectionOutputLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
/* =============== Detection Output =============== */
const int numClasses = 11;
const int backgroundLabelId = 0;
const std::vector<int> topK = {75};
const std::vector<std::vector<int>> keepTopK = { {50}, {100} };
const std::vector<std::string> codeType = {"caffe.PriorBoxParameter.CORNER", "caffe.PriorBoxParameter.CENTER_SIZE"};
const float nmsThreshold = 0.5f;
const float confidenceThreshold = 0.3f;
const std::vector<bool> clipAfterNms = {true, false};
const std::vector<bool> clipBeforeNms = {true, false};
const std::vector<bool> decreaseLabelId = {true, false};
const std::vector<size_t> numberBatch = {1, 2};
const float objectnessScore = 0.4f;
const auto commonAttributes = ::testing::Combine(
::testing::Values(numClasses),
::testing::Values(backgroundLabelId),
::testing::ValuesIn(topK),
::testing::ValuesIn(keepTopK),
::testing::ValuesIn(codeType),
::testing::Values(nmsThreshold),
::testing::Values(confidenceThreshold),
::testing::ValuesIn(clipAfterNms),
::testing::ValuesIn(clipBeforeNms),
::testing::ValuesIn(decreaseLabelId));
/* =============== 3 inputs cases =============== */
const std::vector<ParamsWhichSizeDepends> specificParams3In = {
ParamsWhichSizeDepends{true, true, true, 1, 1, {1, 60}, {1, 165}, {1, 1, 60}, {}, {}},
ParamsWhichSizeDepends{true, false, true, 1, 1, {1, 660}, {1, 165}, {1, 1, 60}, {}, {}},
ParamsWhichSizeDepends{false, true, true, 1, 1, {1, 60}, {1, 165}, {1, 2, 60}, {}, {}},
ParamsWhichSizeDepends{false, false, true, 1, 1, {1, 660}, {1, 165}, {1, 2, 60}, {}, {}},
ParamsWhichSizeDepends{true, true, false, 10, 10, {1, 60}, {1, 165}, {1, 1, 75}, {}, {}},
ParamsWhichSizeDepends{true, false, false, 10, 10, {1, 660}, {1, 165}, {1, 1, 75}, {}, {}},
ParamsWhichSizeDepends{false, true, false, 10, 10, {1, 60}, {1, 165}, {1, 2, 75}, {}, {}},
ParamsWhichSizeDepends{false, false, false, 10, 10, {1, 660}, {1, 165}, {1, 2, 75}, {}, {}}};
const auto params3Inputs = ::testing::Combine(
commonAttributes,
::testing::ValuesIn(specificParams3In),
::testing::ValuesIn(numberBatch),
::testing::Values(objectnessScore),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(
smoke_DetectionOutput3In,
DetectionOutputLayerTest,
params3Inputs,
DetectionOutputLayerTest::getTestCaseName);
} // namespace

View File

@ -1,85 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/eltwise.hpp"
using namespace ov::test::subgraph;
namespace {
TEST_P(EltwiseLayerTest, Serialize) {
serialize();
}
const std::vector<ov::test::ElementType> inputPrecisions = {
ov::element::f32,
ov::element::f16,
ov::element::i32,
};
std::vector<std::vector<ov::Shape>> inputShapes = {
{{2}},
{{1, 5, 50}},
{{2, 10, 1, 4}, {2, 10, 1, 1}}
};
std::vector<std::vector<ov::test::InputShape>> inShapesDynamic = {
{{{ngraph::Dimension(1, 10), 200}, {{6, 200}, {1, 200}}},
{{ngraph::Dimension(1, 10), 200}, {{2, 200}, {5, 200}}}},
};
std::vector<ngraph::helpers::InputLayerType> secondaryInputTypes = {
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
};
std::vector<CommonTestUtils::OpType> opTypes = {
CommonTestUtils::OpType::SCALAR,
CommonTestUtils::OpType::VECTOR,
};
std::vector<ngraph::helpers::EltwiseTypes> eltwiseOpTypes = {
ngraph::helpers::EltwiseTypes::ADD,
ngraph::helpers::EltwiseTypes::MULTIPLY,
ngraph::helpers::EltwiseTypes::SUBTRACT,
ngraph::helpers::EltwiseTypes::DIVIDE,
ngraph::helpers::EltwiseTypes::FLOOR_MOD,
ngraph::helpers::EltwiseTypes::SQUARED_DIFF,
ngraph::helpers::EltwiseTypes::POWER,
ngraph::helpers::EltwiseTypes::MOD
};
ov::AnyMap additionalConfig = {};
const auto elementiwiseParams = ::testing::Combine(
::testing::ValuesIn(ov::test::static_shapes_to_test_representation(inputShapes)),
::testing::ValuesIn(eltwiseOpTypes),
::testing::ValuesIn(secondaryInputTypes),
::testing::ValuesIn(opTypes),
::testing::ValuesIn(inputPrecisions),
::testing::Values(ov::element::undefined),
::testing::Values(ov::element::undefined),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additionalConfig));
const auto elementiwiseParamsDyn = ::testing::Combine(
::testing::ValuesIn(inShapesDynamic),
::testing::ValuesIn(eltwiseOpTypes),
::testing::ValuesIn(secondaryInputTypes),
::testing::ValuesIn(opTypes),
::testing::ValuesIn(inputPrecisions),
::testing::Values(ov::element::undefined),
::testing::Values(ov::element::undefined),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additionalConfig));
INSTANTIATE_TEST_SUITE_P(smoke_ElementwiseSerialization_static, EltwiseLayerTest,
elementiwiseParams,
EltwiseLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_ElementwiseSerialization_dynamic, EltwiseLayerTest,
elementiwiseParamsDyn,
EltwiseLayerTest::getTestCaseName);
} // namespace

View File

@ -1,48 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/embedding_bag_offsets_sum.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(EmbeddingBagOffsetsSumLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U8};
const std::vector<InferenceEngine::Precision> indPrecisions = {
InferenceEngine::Precision::I64,
InferenceEngine::Precision::I32};
const std::vector<std::vector<size_t>> emb_table_shape = {{5, 6}, {5, 4, 16}};
const std::vector<std::vector<size_t>> indices =
{{0, 1, 2, 2, 3}, {4, 4, 3, 1, 0}, {1, 2, 1, 2, 1, 2, 1, 2, 1, 2}};
const std::vector<std::vector<size_t>> offsets = {{0, 2}, {0, 0, 2, 2}, {2, 4}};
const std::vector<size_t> default_index = {0, 4};
const std::vector<bool> with_weights = {false, true};
const std::vector<bool> with_default_index = {false, true};
const auto EmbeddingBagOffsetsSumParams = ::testing::Combine(
::testing::ValuesIn(emb_table_shape),
::testing::ValuesIn(indices),
::testing::ValuesIn(offsets),
::testing::ValuesIn(default_index),
::testing::ValuesIn(with_weights),
::testing::ValuesIn(with_default_index));
INSTANTIATE_TEST_SUITE_P(
smoke_EmbeddingBagOffsetsSumLayerTest_Serialization, EmbeddingBagOffsetsSumLayerTest,
::testing::Combine(EmbeddingBagOffsetsSumParams,
::testing::ValuesIn(netPrecisions),
::testing::ValuesIn(indPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
EmbeddingBagOffsetsSumLayerTest::getTestCaseName);
} // namespace

View File

@ -1,42 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/embedding_bag_packed_sum.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(EmbeddingBagPackedSumLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U8};
const std::vector<InferenceEngine::Precision> indPrecisions = {
InferenceEngine::Precision::I64,
InferenceEngine::Precision::I32};
const std::vector<std::vector<size_t>> emb_table_shape = {{5, 6}, {10, 35}, {5, 4, 16}};
const std::vector<std::vector<std::vector<size_t>>> indices =
{{{0, 1}, {2, 2}}, {{4, 4, 3}, {1, 0, 2}}, {{1, 2, 1, 2}}};
const std::vector<bool> with_weights = {false, true};
const auto EmbeddingBagPackedSumParams = ::testing::Combine(
::testing::ValuesIn(emb_table_shape),
::testing::ValuesIn(indices),
::testing::ValuesIn(with_weights));
INSTANTIATE_TEST_SUITE_P(
smoke_EmbeddingBagPackedSumLayerTest_Serialization, EmbeddingBagPackedSumLayerTest,
::testing::Combine(EmbeddingBagPackedSumParams,
::testing::ValuesIn(netPrecisions),
::testing::ValuesIn(indPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
EmbeddingBagPackedSumLayerTest::getTestCaseName);
} // namespace

View File

@ -1,50 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/embedding_segments_sum.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(EmbeddingSegmentsSumLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U8};
const std::vector<InferenceEngine::Precision> indPrecisions = {
InferenceEngine::Precision::I64,
InferenceEngine::Precision::I32};
const std::vector<std::vector<size_t>> emb_table_shape = {{5, 6}, {5, 4, 16}};
const std::vector<std::vector<size_t>> indices =
{{0, 1, 2, 2, 3}, {4, 4, 3, 1, 2}};
const std::vector<std::vector<size_t>> segment_ids = {{0, 1, 2, 3, 4}, {0, 0, 2, 2, 4}};
const std::vector<size_t> num_segments = {5, 7};
const std::vector<size_t> default_index = {0, 4};
const std::vector<bool> with_weights = {false, true};
const std::vector<bool> with_default_index = {false, true};
const auto EmbeddingSegmentsSumParams = ::testing::Combine(
::testing::ValuesIn(emb_table_shape),
::testing::ValuesIn(indices),
::testing::ValuesIn(segment_ids),
::testing::ValuesIn(num_segments),
::testing::ValuesIn(default_index),
::testing::ValuesIn(with_weights),
::testing::ValuesIn(with_default_index));
INSTANTIATE_TEST_SUITE_P(
smoke_EmbeddingSegmentsSumLayerTest_Serialization, EmbeddingSegmentsSumLayerTest,
::testing::Combine(EmbeddingSegmentsSumParams,
::testing::ValuesIn(netPrecisions),
::testing::ValuesIn(indPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
EmbeddingSegmentsSumLayerTest::getTestCaseName);
} // namespace

View File

@ -1,63 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "comparison_ops.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::ComparisonParams;
namespace {
TEST_P(ComparisonLayerTest, Serialize) {
Serialize();
}
ComparisionOpsData data = {
// inputsShape
{
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
},
// inputsPrecisions
{
InferenceEngine::Precision::FP64,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32,
InferenceEngine::Precision::BOOL,
},
// secondIinputsType
{
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
},
// additionalConfig
{},
// opType
ngraph::helpers::ComparisonTypes::EQUAL,
// ieInputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// ieOutputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// deviceName
CommonTestUtils::DEVICE_CPU,
};
const auto SerializeEqualTestParams = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)),
::testing::ValuesIn(data.inputsPrecisions),
::testing::Values(data.opType),
::testing::ValuesIn(data.secondInputTypes),
::testing::Values(data.ieInputPrecision),
::testing::Values(data.ieOutputPrecision),
::testing::Values(data.deviceName),
::testing::Values(data.additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeEqualTestParams, ComparisonLayerTest::getTestCaseName);
} // namespace

View File

@ -1,43 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/extract_image_patches.hpp"
using namespace ngraph;
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ExtractImagePatchesTest, Serialize) {
Serialize();
}
const std::vector<std::vector<size_t>> inShapes = {{2, 3, 13, 37}};
const std::vector<std::vector<size_t>> kSizes = {{1, 5}, {3, 4}, {3, 1}};
const std::vector<std::vector<size_t>> strides = {{1, 2}, {2, 2}, {2, 1}};
const std::vector<std::vector<size_t>> rates = {{1, 3}, {3, 3}, {3, 1}};
const std::vector<ngraph::op::PadType> autoPads = {
ngraph::op::PadType::VALID, ngraph::op::PadType::SAME_UPPER,
ngraph::op::PadType::SAME_LOWER
};
const std::vector<InferenceEngine::Precision> netPrecision = {
InferenceEngine::Precision::I8, InferenceEngine::Precision::BF16,
InferenceEngine::Precision::FP32
};
INSTANTIATE_TEST_SUITE_P(smoke_ExtractImagePatchesLayerTest, ExtractImagePatchesTest,
::testing::Combine(::testing::ValuesIn(inShapes),
::testing::ValuesIn(kSizes),
::testing::ValuesIn(strides),
::testing::ValuesIn(rates),
::testing::ValuesIn(autoPads),
::testing::ValuesIn(netPrecision),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ExtractImagePatchesTest::getTestCaseName);
} // namespace

View File

@ -1,41 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/gather_tree.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(GatherTreeLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32
};
const std::vector<std::vector<size_t>> inputShapes = { {5, 1, 10}, {1, 1, 10}, {20, 1, 10}, {20, 20, 10} };
const std::vector<ngraph::helpers::InputLayerType> secondaryInputTypes = {
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER
};
INSTANTIATE_TEST_SUITE_P(smoke_GatherTree_Serialization, GatherTreeLayerTest,
::testing::Combine(
::testing::ValuesIn(inputShapes),
::testing::ValuesIn(secondaryInputTypes),
::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(CommonTestUtils::DEVICE_CPU)),
GatherTreeLayerTest::getTestCaseName);
} // namespace

View File

@ -1,63 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "comparison_ops.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::ComparisonParams;
namespace {
TEST_P(ComparisonLayerTest, Serialize) {
Serialize();
}
ComparisionOpsData data = {
// inputsShape
{
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
},
// inputsPrecisions
{
InferenceEngine::Precision::FP64,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32,
InferenceEngine::Precision::BOOL,
},
// secondIinputsType
{
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
},
// additionalConfig
{},
// opType
ngraph::helpers::ComparisonTypes::GREATER,
// ieInputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// ieOutputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// deviceName
CommonTestUtils::DEVICE_CPU,
};
const auto SerializeGreaterTestParams = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)),
::testing::ValuesIn(data.inputsPrecisions),
::testing::Values(data.opType),
::testing::ValuesIn(data.secondInputTypes),
::testing::Values(data.ieInputPrecision),
::testing::Values(data.ieOutputPrecision),
::testing::Values(data.deviceName),
::testing::Values(data.additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeGreaterTestParams, ComparisonLayerTest::getTestCaseName);
} // namespace

View File

@ -1,63 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "comparison_ops.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::ComparisonParams;
namespace {
TEST_P(ComparisonLayerTest, Serialize) {
Serialize();
}
ComparisionOpsData data = {
// inputsShape
{
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
},
// inputsPrecisions
{
InferenceEngine::Precision::FP64,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32,
InferenceEngine::Precision::BOOL,
},
// secondIinputsType
{
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
},
// additionalConfig
{},
// opType
ngraph::helpers::ComparisonTypes::GREATER_EQUAL,
// ieInputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// ieOutputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// deviceName
CommonTestUtils::DEVICE_CPU,
};
const auto SerializeGreaterEqualTestParams = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)),
::testing::ValuesIn(data.inputsPrecisions),
::testing::Values(data.opType),
::testing::ValuesIn(data.secondInputTypes),
::testing::Values(data.ieInputPrecision),
::testing::Values(data.ieOutputPrecision),
::testing::Values(data.deviceName),
::testing::Values(data.additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeGreaterEqualTestParams, ComparisonLayerTest::getTestCaseName);
} // namespace

View File

@ -1,35 +0,0 @@
// Copyright (C) 2020-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/grn.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(GrnLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32
};
const auto basicCases = ::testing::Combine(
::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
// input shapes
::testing::Values(std::vector<size_t>{2, 16, 15, 20}),
// bias
::testing::Values(1e-6f),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_GRN_Serialization, GrnLayerTest,
basicCases,
GrnLayerTest::getTestCaseName);
} // namespace

View File

@ -1,55 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/group_convolution.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(GroupConvolutionLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> precisions = {
InferenceEngine::Precision::FP64, InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16, InferenceEngine::Precision::BF16,
InferenceEngine::Precision::I8, InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32, InferenceEngine::Precision::I64,
InferenceEngine::Precision::U8, InferenceEngine::Precision::U16,
InferenceEngine::Precision::U32, InferenceEngine::Precision::U64,
};
const std::vector<std::vector<size_t>> kernels = {{3, 3}};
const std::vector<std::vector<size_t>> strides = {{1, 1}};
const std::vector<std::vector<ptrdiff_t>> padBegins = {{0, 0}};
const std::vector<std::vector<ptrdiff_t>> padEnds = {{0, 0}};
const std::vector<std::vector<size_t>> dilations = {{1, 1}};
const std::vector<size_t> numOutChannels = {8, 16};
const std::vector<size_t> numGroups = {2, 8};
const std::vector<ngraph::op::PadType> pad_types = {
ngraph::op::PadType::EXPLICIT, ngraph::op::PadType::VALID,
ngraph::op::PadType::SAME_LOWER, ngraph::op::PadType::SAME_UPPER};
const auto inputShapes = std::vector<size_t>({1, 16, 30, 30});
const auto groupConv2DParams = ::testing::Combine(
::testing::ValuesIn(kernels), ::testing::ValuesIn(strides),
::testing::ValuesIn(padBegins), ::testing::ValuesIn(padEnds),
::testing::ValuesIn(dilations), ::testing::ValuesIn(numOutChannels),
::testing::ValuesIn(numGroups), ::testing::ValuesIn(pad_types));
INSTANTIATE_TEST_SUITE_P(
smoke_GroupConvolution2D_Serialization, GroupConvolutionLayerTest,
::testing::Combine(
groupConv2DParams, ::testing::ValuesIn(precisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(inputShapes),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
GroupConvolutionLayerTest::getTestCaseName);
} // namespace

View File

@ -1,60 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/group_convolution_backprop_data.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(GroupConvBackpropLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> precisions = {
InferenceEngine::Precision::FP64, InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16, InferenceEngine::Precision::BF16,
InferenceEngine::Precision::I8, InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32, InferenceEngine::Precision::I64,
InferenceEngine::Precision::U8, InferenceEngine::Precision::U16,
InferenceEngine::Precision::U32, InferenceEngine::Precision::U64,
};
const std::vector<std::vector<size_t>> kernels = {{3, 3}};
const std::vector<std::vector<size_t>> strides = {{1, 1}};
const std::vector<std::vector<ptrdiff_t>> padBegins = {{0, 0}};
const std::vector<std::vector<ptrdiff_t>> padEnds = {{0, 0}};
const std::vector<std::vector<ptrdiff_t>> outputPadding = {{}, {1, 1}};
const std::vector<std::vector<size_t>> dilations = {{1, 1}};
const std::vector<size_t> numOutChannels = {8, 16};
const std::vector<size_t> numGroups = {2, 8};
const std::vector<ngraph::op::PadType> pad_types = {
ngraph::op::PadType::EXPLICIT, ngraph::op::PadType::VALID,
ngraph::op::PadType::SAME_LOWER, ngraph::op::PadType::SAME_UPPER};
const auto inputShapes = std::vector<size_t>({1, 16, 30, 30});
const std::vector<std::vector<size_t >> emptyOutputShape = {{}};
const auto groupConvBackpropData2DParams = ::testing::Combine(
::testing::ValuesIn(kernels), ::testing::ValuesIn(strides),
::testing::ValuesIn(padBegins), ::testing::ValuesIn(padEnds),
::testing::ValuesIn(dilations), ::testing::ValuesIn(numOutChannels),
::testing::ValuesIn(numGroups), ::testing::ValuesIn(pad_types),
::testing::ValuesIn(outputPadding));
INSTANTIATE_TEST_SUITE_P(
smoke_GroupConvBackpropData2D_Serialization, GroupConvBackpropLayerTest,
::testing::Combine(
groupConvBackpropData2DParams,
::testing::ValuesIn(precisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(inputShapes),
::testing::ValuesIn(emptyOutputShape),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
GroupConvBackpropLayerTest::getTestCaseName);
} // namespace

View File

@ -1,63 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "comparison_ops.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::ComparisonParams;
namespace {
TEST_P(ComparisonLayerTest, Serialize) {
Serialize();
}
ComparisionOpsData data = {
// inputsShape
{
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
},
// inputsPrecisions
{
InferenceEngine::Precision::FP64,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32,
InferenceEngine::Precision::BOOL,
},
// secondIinputsType
{
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
},
// additionalConfig
{},
// opType
ngraph::helpers::ComparisonTypes::LESS,
// ieInputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// ieOutputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// deviceName
CommonTestUtils::DEVICE_CPU,
};
const auto SerializeLessTestParams = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)),
::testing::ValuesIn(data.inputsPrecisions),
::testing::Values(data.opType),
::testing::ValuesIn(data.secondInputTypes),
::testing::Values(data.ieInputPrecision),
::testing::Values(data.ieOutputPrecision),
::testing::Values(data.deviceName),
::testing::Values(data.additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeLessTestParams, ComparisonLayerTest::getTestCaseName);
} // namespace

View File

@ -1,63 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "comparison_ops.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::ComparisonParams;
namespace {
TEST_P(ComparisonLayerTest, Serialize) {
Serialize();
}
ComparisionOpsData data = {
// inputsShape
{
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
},
// inputsPrecisions
{
InferenceEngine::Precision::FP64,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32,
InferenceEngine::Precision::BOOL,
},
// secondIinputsType
{
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
},
// additionalConfig
{},
// opType
ngraph::helpers::ComparisonTypes::LESS_EQUAL,
// ieInputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// ieOutputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// deviceName
CommonTestUtils::DEVICE_CPU,
};
const auto SerializeLessEqualTestParams = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)),
::testing::ValuesIn(data.inputsPrecisions),
::testing::Values(data.opType),
::testing::ValuesIn(data.secondInputTypes),
::testing::Values(data.ieInputPrecision),
::testing::Values(data.ieOutputPrecision),
::testing::Values(data.deviceName),
::testing::Values(data.additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeLessEqualTestParams, ComparisonLayerTest::getTestCaseName);
} // namespace

View File

@ -1,84 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/logical.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::LogicalParams;
namespace {
TEST_P(LogicalLayerTest, Serialize) {
Serialize();
}
std::map<std::vector<size_t>, std::vector<std::vector<size_t >>> inputShapes = {
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
};
std::map<std::vector<size_t>, std::vector<std::vector<size_t >>> inputShapesNot = {
{{1}, {}},
{{5}, {}},
{{2, 200}, {}},
{{1, 3, 20}, {}},
{{2, 17, 3, 4}, {}},
{{2, 1, 1, 3, 1}, {}},
};
std::vector<InferenceEngine::Precision> inputsPrecisions = {
InferenceEngine::Precision::BOOL,
};
std::vector<ngraph::helpers::LogicalTypes> logicalOpTypes = {
ngraph::helpers::LogicalTypes::LOGICAL_AND,
ngraph::helpers::LogicalTypes::LOGICAL_OR,
ngraph::helpers::LogicalTypes::LOGICAL_XOR,
};
std::vector<ngraph::helpers::InputLayerType> secondInputTypes = {
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
};
std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
};
std::map<std::string, std::string> additional_config = {};
const auto LogicalTestParams = ::testing::Combine(
::testing::ValuesIn(LogicalLayerTest::combineShapes(inputShapes)),
::testing::ValuesIn(logicalOpTypes),
::testing::ValuesIn(secondInputTypes),
::testing::ValuesIn(netPrecisions),
::testing::ValuesIn(inputsPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config));
const auto LogicalNotTestParams = ::testing::Combine(
::testing::ValuesIn(LogicalLayerTest::combineShapes(inputShapesNot)),
::testing::Values(ngraph::helpers::LogicalTypes::LOGICAL_NOT),
::testing::Values(ngraph::helpers::InputLayerType::CONSTANT),
::testing::ValuesIn(netPrecisions),
::testing::ValuesIn(inputsPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, LogicalLayerTest, LogicalTestParams, LogicalLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefsNot, LogicalLayerTest, LogicalNotTestParams, LogicalLayerTest::getTestCaseName);
} // namespace

View File

@ -1,69 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/matrix_nms.hpp"
using namespace ngraph;
using namespace ov::test::subgraph;
namespace {
TEST_P(MatrixNmsLayerTest, Serialize) {
serialize();
}
const std::vector<ov::test::ElementType> netPrecisions = {
ov::element::f32,
ov::element::f16
};
const std::vector<std::vector<ov::test::InputShape>> shapeParams = {
// num_batches, num_boxes, 4
{{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), 4},
{{1, 10, 4}, {2, 100, 4}}},
// num_batches, num_classes, num_boxes
{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic()},
{{1, 3, 10}, {2, 5, 100}}}},
// num_batches, num_boxes, 4
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100), 4},
{{1, 10, 4}, {2, 100, 4}}},
// num_batches, num_classes, num_boxes
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100), ngraph::Dimension(1, 100)}},
{{1, 3, 10}, {2, 5, 100}}}}
};
const std::vector<op::v8::MatrixNms::SortResultType> sortResultType = {op::v8::MatrixNms::SortResultType::CLASSID,
op::v8::MatrixNms::SortResultType::SCORE,
op::v8::MatrixNms::SortResultType::NONE};
const std::vector<element::Type> outType = {element::i32, element::i64};
const std::vector<TopKParams> topKParams = {
TopKParams{-1, 5},
TopKParams{100, -1}
};
const std::vector<ThresholdParams> thresholdParams = {
ThresholdParams{0.0f, 2.0f, 0.0f},
ThresholdParams{0.1f, 1.5f, 0.2f}
};
const std::vector<int> nmsTopK = {-1, 100};
const std::vector<int> keepTopK = {-1, 5};
const std::vector<int> backgroudClass = {-1, 0};
const std::vector<bool> normalized = {true, false};
const std::vector<op::v8::MatrixNms::DecayFunction> decayFunction = {op::v8::MatrixNms::DecayFunction::GAUSSIAN,
op::v8::MatrixNms::DecayFunction::LINEAR};
const auto nmsParams = ::testing::Combine(::testing::ValuesIn(shapeParams),
::testing::Combine(::testing::Values(ov::element::f32),
::testing::Values(ov::element::i32),
::testing::Values(ov::element::f32)),
::testing::ValuesIn(sortResultType),
::testing::ValuesIn(outType),
::testing::ValuesIn(topKParams),
::testing::ValuesIn(thresholdParams),
::testing::ValuesIn(backgroudClass),
::testing::ValuesIn(normalized),
::testing::ValuesIn(decayFunction),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_MatrixNmsLayerTest, MatrixNmsLayerTest, nmsParams, MatrixNmsLayerTest::getTestCaseName);
} // namespace

View File

@ -1,52 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/minimum_maximum.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(MaxMinLayerTest, Serialize) { Serialize(); }
const std::vector<std::vector<std::vector<size_t>>> inShapes = {
{{2}, {1}},
{{1, 1, 1, 3}, {1}},
{{1, 2, 4}, {1}},
{{1, 4, 4}, {1}},
{{1, 4, 4, 1}, {1}},
{{256, 56}, {256, 56}},
{{8, 1, 6, 1}, {7, 1, 5}},
};
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
};
const std::vector<ngraph::helpers::MinMaxOpType> opType = {
ngraph::helpers::MinMaxOpType::MINIMUM,
ngraph::helpers::MinMaxOpType::MAXIMUM,
};
const std::vector<ngraph::helpers::InputLayerType> inputType = {
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
};
INSTANTIATE_TEST_SUITE_P(smoke_maximum, MaxMinLayerTest,
::testing::Combine(
::testing::ValuesIn(inShapes),
::testing::ValuesIn(opType),
::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(inputType),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
MaxMinLayerTest::getTestCaseName);
} // namespace

View File

@ -1,120 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/multiclass_nms.hpp"
using namespace ngraph;
using namespace ov::test::subgraph;
namespace {
TEST_P(MulticlassNmsLayerTest, Serialize) {
serialize();
}
/* input format #1 with 2 inputs: bboxes N, M, 4, scores N, C, M */
const std::vector<std::vector<ov::test::InputShape>> shapeParams1 = {
// num_batches, num_boxes, 4
{{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), 4},
{{1, 10, 4}, {2, 100, 4}}},
// num_batches, num_classes, num_boxes
{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic()},
{{1, 3, 10}, {2, 5, 100}}}},
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100), 4},
{{1, 10, 4}, {2, 100, 4}}},
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100), ngraph::Dimension(1, 100)}},
{{1, 3, 10}, {2, 5, 100}}}}
};
/* input format #2 with 3 inputs: bboxes C, M, 4, scores C, M, roisnum N */
const std::vector<std::vector<ov::test::InputShape>> shapeParams2 = {
/*0*/
// bboxes
{{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic(), 4},
{{1, 10, 4}, {2, 100, 4}}},
// scores
{{ngraph::Dimension::dynamic(), ngraph::Dimension::dynamic()},
{{1, 10}, {2, 100}}},
// roisnum
{{ngraph::Dimension::dynamic()},
{{1}, {10}}}},
/*1*/
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100), 4},
{{1, 10, 4}, {2, 100, 4}}},
{{{ngraph::Dimension(1, 10), ngraph::Dimension(1, 100)}},
{{1, 10}, {2, 100}}},
{{ngraph::Dimension::dynamic()},
{{1}, {10}}}},
/*2*/
{{{ngraph::Dimension(3), ngraph::Dimension(2), 4},
{{3, 2, 4}}},
{{{ngraph::Dimension(3), ngraph::Dimension(2)}},
{{3, 2}}},
{{ngraph::Dimension::dynamic()},
{{1}, {2}}}}
};
const std::vector<int32_t> nmsTopK = {-1, 20};
const std::vector<float> iouThreshold = {0.7f};
const std::vector<float> scoreThreshold = {0.7f};
const std::vector<int32_t> backgroundClass = {-1, 0};
const std::vector<int32_t> keepTopK = {-1, 30};
const std::vector<element::Type> outType = {element::i32, element::i64};
const std::vector<ov::op::util::MulticlassNmsBase::SortResultType> sortResultType = {
op::v8::MulticlassNms::SortResultType::SCORE,
op::v8::MulticlassNms::SortResultType::CLASSID,
op::v8::MulticlassNms::SortResultType::NONE};
const std::vector<bool> sortResDesc = {true, false};
const std::vector<float> nmsEta = {0.6f, 1.0f};
const std::vector<bool> normalized = {true, false};
const auto nmsParams1_smoke = ::testing::Combine(
::testing::ValuesIn(shapeParams1),
::testing::Combine(::testing::Values(ov::element::f32),
::testing::Values(ov::element::i32),
::testing::Values(ov::element::i32),
::testing::Values(ov::element::f32)),
::testing::ValuesIn(nmsTopK),
::testing::Combine(::testing::ValuesIn(iouThreshold),
::testing::ValuesIn(scoreThreshold),
::testing::ValuesIn(nmsEta)),
::testing::ValuesIn(backgroundClass),
::testing::ValuesIn(keepTopK),
::testing::ValuesIn(outType),
::testing::ValuesIn(sortResultType),
::testing::Combine(::testing::ValuesIn(sortResDesc),
::testing::ValuesIn(normalized)),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_MulticlassNmsLayerTest1,
MulticlassNmsLayerTest,
nmsParams1_smoke,
MulticlassNmsLayerTest::getTestCaseName);
const auto nmsParams2_smoke = ::testing::Combine(
::testing::ValuesIn(shapeParams2),
::testing::Combine(::testing::Values(ov::element::f32),
::testing::Values(ov::element::i32),
::testing::Values(ov::element::i32),
::testing::Values(ov::element::f32)),
::testing::ValuesIn(nmsTopK),
::testing::Combine(::testing::ValuesIn(iouThreshold),
::testing::ValuesIn(scoreThreshold),
::testing::ValuesIn(nmsEta)),
::testing::ValuesIn(backgroundClass),
::testing::ValuesIn(keepTopK),
::testing::ValuesIn(outType),
::testing::ValuesIn(sortResultType),
::testing::Combine(::testing::ValuesIn(sortResDesc),
::testing::ValuesIn(normalized)),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_MulticlassNmsLayerTest2,
MulticlassNmsLayerTest,
nmsParams2_smoke,
MulticlassNmsLayerTest::getTestCaseName);
} // namespace

View File

@ -1,74 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/mvn.hpp"
using namespace LayerTestsDefinitions;
std::vector<InferenceEngine::Precision> dataPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16};
const std::vector<bool> normalizeVariance = {true, false};
// ------------------- MVN-1 -------------------------------------------------
const std::vector<std::vector<size_t>> inputShapes = {{1, 10, 5, 7, 8},
{1, 3, 8, 9, 49}};
const std::vector<ngraph::AxisSet> axes = {{1, 2, 3}, {2, 3}};
const std::vector<bool> acrossChannels = {true, false};
const std::vector<ngraph::AxisSet> emptyReductionAxes = {{}};
const std::vector<bool> emptyAcrossChannels = {{}};
const std::vector<double> epsilon = {0.000000001};
const auto MvnAcrossChannels = ::testing::Combine(
::testing::ValuesIn(inputShapes), ::testing::ValuesIn(dataPrecisions),
::testing::ValuesIn(emptyReductionAxes), ::testing::ValuesIn(acrossChannels),
::testing::ValuesIn(normalizeVariance), ::testing::ValuesIn(epsilon),
::testing::Values(CommonTestUtils::DEVICE_CPU));
const auto MvnReductionAxes = ::testing::Combine(
::testing::ValuesIn(inputShapes), ::testing::ValuesIn(dataPrecisions),
::testing::ValuesIn(axes), ::testing::ValuesIn(emptyAcrossChannels),
::testing::ValuesIn(normalizeVariance), ::testing::ValuesIn(epsilon),
::testing::Values(CommonTestUtils::DEVICE_CPU));
TEST_P(Mvn1LayerTest, Serialize) {
Serialize();
}
INSTANTIATE_TEST_SUITE_P(smoke_INTEL_CPU_TestsMVN_across_channels, Mvn1LayerTest, MvnAcrossChannels,
Mvn1LayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_INTEL_CPU_TestsMVN_reduction_axes, Mvn1LayerTest, MvnReductionAxes,
Mvn1LayerTest::getTestCaseName);
// ------------------- MVN-6 -------------------------------------------------
std::vector<InferenceEngine::Precision> idxPrecisions = {
InferenceEngine::Precision::I32, InferenceEngine::Precision::I64};
const std::vector<std::string> epsMode = {"inside_sqrt", "outside_sqrt"};
const std::vector<float> epsilonF = {0.0001};
TEST_P(Mvn6LayerTest, Serialize) {
Serialize();
}
INSTANTIATE_TEST_SUITE_P(
smoke_MVN_5D, Mvn6LayerTest,
::testing::Combine(::testing::ValuesIn(std::vector<std::vector<size_t>>{
{1, 10, 5, 7, 8}, {1, 3, 8, 9, 49}}),
::testing::ValuesIn(dataPrecisions),
::testing::ValuesIn(idxPrecisions),
::testing::ValuesIn(std::vector<std::vector<int>>{
{1, 2, 3, 4}, {2, 3, 4}}),
::testing::ValuesIn(normalizeVariance),
::testing::ValuesIn(epsilonF),
::testing::ValuesIn(epsMode),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
Mvn6LayerTest::getTestCaseName);

View File

@ -1,57 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/non_max_suppression.hpp"
using namespace ngraph;
using namespace LayerTestsDefinitions;
namespace {
TEST_P(NmsLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
/* ============= NO MAX SUPPRESSION ============= */
const std::vector<InputShapeParams> inShapeParams = {
InputShapeParams{3, 100, 5},
InputShapeParams{1, 10, 50},
InputShapeParams{2, 50, 50}
};
const std::vector<int32_t> maxOutBoxPerClass = {5, 20};
const std::vector<float> threshold = {0.3f, 0.7f};
const std::vector<float> sigmaThreshold = {0.0f, 0.5f};
const std::vector<ngraph::op::v5::NonMaxSuppression::BoxEncodingType> encodType = {op::v5::NonMaxSuppression::BoxEncodingType::CENTER,
op::v5::NonMaxSuppression::BoxEncodingType::CORNER};
const std::vector<bool> sortResDesc = {true, false};
const std::vector<element::Type> outType = {element::i32, element::i64};
const auto inPrecisions = ::testing::Combine(
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(InferenceEngine::Precision::I32),
::testing::Values(InferenceEngine::Precision::FP32));
const auto nmsParams = ::testing::Combine(
::testing::ValuesIn(inShapeParams),
inPrecisions,
::testing::ValuesIn(maxOutBoxPerClass),
::testing::ValuesIn(threshold), // IOU threshold
::testing::ValuesIn(threshold), // Score threshold
::testing::ValuesIn(sigmaThreshold),
::testing::ValuesIn(encodType),
::testing::ValuesIn(sortResDesc),
::testing::ValuesIn(outType),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_NmsLayerTest, NmsLayerTest, nmsParams, NmsLayerTest::getTestCaseName);
} // namespace

View File

@ -1,34 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/nonzero.hpp"
using namespace ngraph;
using namespace LayerTestsDefinitions;
namespace {
TEST_P(NonZeroLayerTest, Serialize) {
Serialize();
}
std::vector<InferenceEngine::SizeVector> inputDims = {
{7}, {1000}, {3, 5}, {65, 33}, {33, 65},
{1, 1000}, {223, 217, 21}, {3, 4, 5, 1}, {3, 4, 1, 5, 1}};
std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::BOOL, InferenceEngine::Precision::U8,
InferenceEngine::Precision::FP32, InferenceEngine::Precision::I32,
};
ConfigMap config;
INSTANTIATE_TEST_SUITE_P(
smoke_NonZeroLayerTest, NonZeroLayerTest,
::testing::Combine(::testing::ValuesIn(inputDims),
::testing::ValuesIn(inputPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(config)));
} // namespace

View File

@ -1,42 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/normalize_l2.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace InferenceEngine;
using namespace LayerTestsDefinitions;
namespace {
TEST_P(NormalizeL2LayerTest, Serialize) {
Serialize();
}
const std::vector<std::vector<int64_t>> axes = {
{1},
};
const std::vector<float> eps = { 1e-4f };
const std::vector<ngraph::op::EpsMode> epsMode = {
ngraph::op::EpsMode::ADD,
ngraph::op::EpsMode::MAX,
};
const std::vector<Precision> netPrecisions = {
Precision::FP32,
Precision::BF16
};
INSTANTIATE_TEST_SUITE_P(smoke_NormalizeL2Serialization, NormalizeL2LayerTest,
testing::Combine(
testing::ValuesIn(axes),
testing::ValuesIn(eps),
testing::ValuesIn(epsMode),
testing::Values(std::vector<size_t>{1, 32, 17}),
testing::ValuesIn(netPrecisions),
testing::Values(CommonTestUtils::DEVICE_CPU)),
NormalizeL2LayerTest::getTestCaseName);
} // namespace

View File

@ -1,63 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "comparison_ops.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::ComparisonParams;
namespace {
TEST_P(ComparisonLayerTest, Serialize) {
Serialize();
}
ComparisionOpsData data = {
// inputsShape
{
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
},
// inputsPrecisions
{
InferenceEngine::Precision::FP64,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32,
InferenceEngine::Precision::BOOL,
},
// secondIinputsType
{
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
},
// additionalConfig
{},
// opType
ngraph::helpers::ComparisonTypes::NOT_EQUAL,
// ieInputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// ieOutputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// deviceName
CommonTestUtils::DEVICE_CPU,
};
const auto SerializeNotEqualTestParams = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)),
::testing::ValuesIn(data.inputsPrecisions),
::testing::Values(data.opType),
::testing::ValuesIn(data.secondInputTypes),
::testing::Values(data.ieInputPrecision),
::testing::Values(data.ieOutputPrecision),
::testing::Values(data.deviceName),
::testing::Values(data.additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeNotEqualTestParams, ComparisonLayerTest::getTestCaseName);
} // namespace

View File

@ -1,39 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/one_hot.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(OneHotLayerTest, Serialize) { Serialize(); }
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::I32 };
const std::vector<ngraph::element::Type> argDepthType_IC = { ngraph::element::i32 };
const std::vector<int64_t> argDepth_IC = { 5, 1017 };
const std::vector<ngraph::element::Type> argSetType_IC = { ngraph::element::i32, ngraph::element::i64 };
const std::vector<float> argOnValue_IC = { 1, -29 };
const std::vector<float> argOffValue_IC = { -1, 127 };
const std::vector<int64_t> argAxis_IC = {0, 1, -1};
const std::vector<std::vector<size_t>> inputShapes_IC = {{4, 5}, {3, 7}};
const auto oneHotParams = testing::Combine(
testing::ValuesIn(argDepthType_IC),
testing::ValuesIn(argDepth_IC),
testing::ValuesIn(argSetType_IC),
testing::ValuesIn(argOnValue_IC),
testing::ValuesIn(argOffValue_IC),
testing::ValuesIn(argAxis_IC),
testing::ValuesIn(netPrecisions),
testing::ValuesIn(inputShapes_IC),
testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(smoke_OneHotConstSerialization, OneHotLayerTest, oneHotParams,
OneHotLayerTest::getTestCaseName);
} // namespace

View File

@ -1,40 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/pad.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(PadLayerTest, Serialize) { Serialize(); }
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16};
const std::vector<std::vector<int64_t>> padsBegin2D = {
{0, 0}, {1, 1}, {2, 0}, {0, 3}};
const std::vector<std::vector<int64_t>> padsEnd2D = {
{0, 0}, {1, 1}, {0, 1}, {3, 2}};
const std::vector<float> argPadValue = {0.f, 1.f, 2.f, -1.f};
const std::vector<ngraph::helpers::PadMode> padMode = {
ngraph::helpers::PadMode::EDGE, ngraph::helpers::PadMode::REFLECT,
ngraph::helpers::PadMode::SYMMETRIC};
const auto pad2DConstparams = testing::Combine(
testing::ValuesIn(padsBegin2D), testing::ValuesIn(padsEnd2D),
testing::ValuesIn(argPadValue),
testing::Values(ngraph::helpers::PadMode::CONSTANT),
testing::ValuesIn(netPrecisions),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Layout::ANY),
testing::Values(std::vector<size_t>{13, 5}),
testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_Pad2DConstSerialization, PadLayerTest, pad2DConstparams,
PadLayerTest::getTestCaseName);
} // namespace

View File

@ -1,92 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/pooling.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(PoolingLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
/* ============= POOLING ============= */
const std::vector<std::vector<size_t >> kernels = {{3, 3},
{3, 5}};
const std::vector<std::vector<size_t >> strides = {{1, 1},
{1, 2}};
const std::vector<std::vector<size_t >> padBegins = {{0, 0},
{0, 2}};
const std::vector<std::vector<size_t >> padEnds = {{0, 0},
{0, 2}};
const std::vector<ngraph::op::RoundingType> roundingTypes = {
ngraph::op::RoundingType::FLOOR,
ngraph::op::RoundingType::CEIL
};
const std::vector<ngraph::op::PadType> padTypes = {
ngraph::op::PadType::EXPLICIT,
ngraph::op::PadType::SAME_UPPER,
ngraph::op::PadType::VALID
};
const std::vector<size_t> inputShape = {511, 11, 13, 15};
const std::vector<bool> excludePad = {true, false};
/* ============= AVERAGE POOLING ============= */
const auto avgExcludePadParams = ::testing::Combine(
::testing::Values(ngraph::helpers::PoolingTypes::AVG),
::testing::ValuesIn(kernels),
::testing::ValuesIn(strides),
::testing::ValuesIn(padBegins),
::testing::ValuesIn(padEnds),
::testing::ValuesIn(roundingTypes),
::testing::ValuesIn(padTypes),
::testing::Values(excludePad[0]));
INSTANTIATE_TEST_SUITE_P(smoke_AvgPoolExcluePad, PoolingLayerTest,
::testing::Combine(
avgExcludePadParams,
::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(inputShape),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
PoolingLayerTest::getTestCaseName);
const auto avgPadParams = ::testing::Combine(
::testing::Values(ngraph::helpers::PoolingTypes::AVG),
::testing::ValuesIn(kernels),
::testing::ValuesIn(strides),
::testing::ValuesIn(padBegins),
::testing::ValuesIn(padEnds),
::testing::ValuesIn(roundingTypes),
::testing::ValuesIn(padTypes),
::testing::Values(excludePad[1]));
INSTANTIATE_TEST_SUITE_P(smoke_AvgPool, PoolingLayerTest,
::testing::Combine(
avgPadParams,
::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(inputShape),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
PoolingLayerTest::getTestCaseName);
} // namespace

View File

@ -1,43 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/activation.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ngraph::helpers;
namespace {
TEST_P(ActivationLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::map<ActivationTypes, std::vector<std::vector<float>>> activationTypes = {
{ActivationTypes::PReLu, {{-0.01f}}},
};
std::map<std::vector<size_t>, std::vector<std::vector<size_t>>> basic = {
{{1, 50}, {{}}},
{{1, 128}, {{}}},
};
const auto basicCases = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(activationTypes)),
::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(CommonTestUtils::combineParams(basic)),
::testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(smoke_ActivationPreluSerialization,
ActivationLayerTest, basicCases, ActivationLayerTest::getTestCaseName);
} // namespace

View File

@ -1,103 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/prior_box.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(PriorBoxLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U16
};
const std::vector<std::vector<float>> min_sizes = {
{16.f, 32.f}
};
const std::vector<std::vector<float>> max_sizes = {
{256.f, 512.f}
};
const std::vector<std::vector<float>> aspect_ratios = {
{0.66f, 1.56f}
};
const std::vector<std::vector<float>> densities = {
{0.55f}
};
const std::vector<std::vector<float>> fixed_ratios = {
{0.88f}
};
const std::vector<std::vector<float>> fixed_sizes = {
{1.25f}
};
const std::vector<bool> clips = {
true, false
};
const std::vector<bool> flips = {
true, false
};
const std::vector<float> steps = {
1.0f, 2.0f
};
const std::vector<float> offsets = {
0.0f, 0.5f
};
const std::vector<std::vector<float>> variances = {
{2.22f, 3.14f}
};
const std::vector<bool> scale_all_sizes = {
true, false
};
const std::vector<bool> min_max_aspect_ratios_order = {
true, false
};
const std::vector<size_t> inputShape = {128, 128};
const std::vector<size_t> imageShape = {50, 50};
const auto layerSpecificParams = ::testing::Combine(
::testing::ValuesIn(min_sizes),
::testing::ValuesIn(max_sizes),
::testing::ValuesIn(aspect_ratios),
::testing::ValuesIn(densities),
::testing::ValuesIn(fixed_ratios),
::testing::ValuesIn(fixed_sizes),
::testing::ValuesIn(clips),
::testing::ValuesIn(flips),
::testing::ValuesIn(steps),
::testing::ValuesIn(offsets),
::testing::ValuesIn(variances),
::testing::ValuesIn(scale_all_sizes),
::testing::ValuesIn(min_max_aspect_ratios_order));
INSTANTIATE_TEST_SUITE_P(smoke_PriorBox_Basic, PriorBoxLayerTest,
::testing::Combine(
layerSpecificParams,
::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(inputShape),
::testing::Values(imageShape),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
PriorBoxLayerTest::getTestCaseName);
} // namespace

View File

@ -1,82 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/prior_box_clustered.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(PriorBoxClusteredLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
const std::vector<std::vector<float>> widths = {
{ 5.12f, 14.6f, 13.5f },
{ 7.0f, 8.2f, 33.39f }
};
const std::vector<std::vector<float>> heights = {
{ 15.12f, 15.6f, 23.5f },
{ 10.0f, 16.2f, 36.2f }
};
const std::vector<float> step_widths = {
0.0f, 2.0f
};
const std::vector<float> step_heights = {
0.0f, 1.5f
};
const std::vector<float> step = {
0.0f
};
const std::vector<float> offsets = {
0.5f
};
const std::vector<std::vector<float>> variances = {
{ 0.1f, 0.1f, 0.2f, 0.2f }
};
const std::vector<bool> clips = {
true, false
};
const std::vector<size_t> inputShape = {4, 4};
const std::vector<size_t> imageShape = {50, 50};
const auto layerSpeficParams = ::testing::Combine(
::testing::ValuesIn(widths),
::testing::ValuesIn(heights),
::testing::ValuesIn(clips),
::testing::ValuesIn(step_widths),
::testing::ValuesIn(step_heights),
::testing::ValuesIn(step),
::testing::ValuesIn(offsets),
::testing::ValuesIn(variances));
INSTANTIATE_TEST_SUITE_P(smoke_PriorBoxClustered_Basic, PriorBoxClusteredLayerTest,
::testing::Combine(
layerSpeficParams,
::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(inputShape),
::testing::Values(imageShape),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
PriorBoxClusteredLayerTest::getTestCaseName);
} // namespace

View File

@ -1,177 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/reduce_ops.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ReduceOpsLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I8,
};
const std::vector<bool> keepDims = {
true,
false,
};
std::vector<CommonTestUtils::OpType> opTypes = {
CommonTestUtils::OpType::SCALAR,
CommonTestUtils::OpType::VECTOR,
};
const std::vector<ngraph::helpers::ReductionType> reductionTypes = {
ngraph::helpers::ReductionType::Mean,
ngraph::helpers::ReductionType::Min,
ngraph::helpers::ReductionType::Max,
ngraph::helpers::ReductionType::Sum,
ngraph::helpers::ReductionType::Prod,
ngraph::helpers::ReductionType::L1,
ngraph::helpers::ReductionType::L2,
};
const std::vector<ngraph::helpers::ReductionType> reductionLogicalTypes = {
ngraph::helpers::ReductionType::LogicalOr,
ngraph::helpers::ReductionType::LogicalAnd
};
const std::vector<std::vector<size_t>> inputShapesOneAxis = {
std::vector<size_t>{10, 20, 30, 40},
std::vector<size_t>{3, 5, 7, 9},
std::vector<size_t>{10},
};
const std::vector<std::vector<size_t>> inputShapes = {
std::vector<size_t>{10, 20, 30, 40},
std::vector<size_t>{3, 5, 7, 9},
};
const std::vector<std::vector<int>> axes = {
{0},
{1},
{2},
{3},
{0, 1},
{0, 2},
{0, 3},
{1, 2},
{1, 3},
{2, 3},
{0, 1, 2},
{0, 1, 3},
{0, 2, 3},
{1, 2, 3},
{0, 1, 2, 3},
{1, -1}
};
const auto paramsOneAxis = testing::Combine(
testing::Values(std::vector<int>{0}),
testing::ValuesIn(opTypes),
testing::ValuesIn(keepDims),
testing::ValuesIn(reductionTypes),
testing::Values(netPrecisions[0]),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Layout::ANY),
testing::ValuesIn(inputShapesOneAxis),
testing::Values(CommonTestUtils::DEVICE_CPU)
);
const auto paramsOneAxisLogical = testing::Combine(
testing::Values(std::vector<int>{0}),
testing::ValuesIn(opTypes),
testing::ValuesIn(keepDims),
testing::ValuesIn(reductionLogicalTypes),
testing::Values(InferenceEngine::Precision::BOOL),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Layout::ANY),
testing::ValuesIn(inputShapesOneAxis),
testing::Values(CommonTestUtils::DEVICE_CPU)
);
const auto params_Axes = testing::Combine(
testing::ValuesIn(axes),
testing::Values(opTypes[1]),
testing::ValuesIn(keepDims),
testing::Values(reductionTypes[0]),
testing::Values(netPrecisions[0]),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Layout::ANY),
testing::ValuesIn(inputShapes),
testing::Values(CommonTestUtils::DEVICE_CPU)
);
const auto params_ReductionTypes = testing::Combine(
testing::Values(std::vector<int>{0, 1, 3}),
testing::Values(opTypes[1]),
testing::ValuesIn(keepDims),
testing::ValuesIn(reductionTypes),
testing::ValuesIn(netPrecisions),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Layout::ANY),
testing::Values(std::vector<size_t>{2, 9, 2, 9}),
testing::Values(CommonTestUtils::DEVICE_CPU)
);
const auto params_ReductionTypesLogical = testing::Combine(
testing::Values(std::vector<int>{0, 1, 3}),
testing::Values(opTypes[1]),
testing::ValuesIn(keepDims),
testing::ValuesIn(reductionLogicalTypes),
testing::Values(InferenceEngine::Precision::BOOL),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Layout::ANY),
testing::Values(std::vector<size_t>{2, 9, 2, 9}),
testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(
smoke_ReduceOneAxis_Serialization,
ReduceOpsLayerTest,
paramsOneAxis,
ReduceOpsLayerTest::getTestCaseName
);
INSTANTIATE_TEST_SUITE_P(
smoke_ReduceLogicalOneAxis_Serialization,
ReduceOpsLayerTest,
paramsOneAxisLogical,
ReduceOpsLayerTest::getTestCaseName
);
INSTANTIATE_TEST_SUITE_P(
smoke_ReduceAxes_Serialization,
ReduceOpsLayerTest,
params_Axes,
ReduceOpsLayerTest::getTestCaseName
);
INSTANTIATE_TEST_SUITE_P(
smoke_Reduce_ReductionTypes_Serialization,
ReduceOpsLayerTest,
params_ReductionTypes,
ReduceOpsLayerTest::getTestCaseName
);
INSTANTIATE_TEST_SUITE_P(
smoke_ReduceLogical_ReductionTypes_Serialization,
ReduceOpsLayerTest,
params_ReductionTypesLogical,
ReduceOpsLayerTest::getTestCaseName
);
} // namespace

View File

@ -1,49 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/region_yolo.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(RegionYoloLayerTest, Serialize) {
Serialize();
}
const std::vector<ngraph::Shape> inShapes_v3 = {
{1, 255, 52, 52},
{1, 255, 26, 26},
{1, 255, 13, 13}
};
const std::vector<std::vector<int64_t>> masks = {
{0, 1, 2},
{3, 4, 5},
{6, 7, 8}
};
const std::vector<bool> do_softmax = {true, false};
const std::vector<size_t> classes = {80, 20};
const std::vector<size_t> num_regions = {5, 9};
const size_t coords = 4;
const int start_axis = 1;
const int end_axis = 3;
INSTANTIATE_TEST_SUITE_P(smoke_RegionYolov3Serialization, RegionYoloLayerTest,
::testing::Combine(
::testing::ValuesIn(inShapes_v3),
::testing::Values(classes[0]),
::testing::Values(coords),
::testing::Values(num_regions[1]),
::testing::Values(do_softmax[1]),
::testing::Values(masks[2]),
::testing::Values(start_axis),
::testing::Values(end_axis),
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
RegionYoloLayerTest::getTestCaseName);
} // namespace

View File

@ -1,35 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/reshape.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ReshapeLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
INSTANTIATE_TEST_SUITE_P(smoke_ReshapeSerialization, 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::Values(std::vector<size_t>({30, 30, 30, 30})),
::testing::Values(std::vector<int64_t>({30, 30, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>({{CONFIG_KEY(DYN_BATCH_ENABLED), CONFIG_VALUE(YES)}}))),
ReshapeLayerTest::getTestCaseName);
} // namespace

View File

@ -1,34 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/result.hpp"
using namespace ngraph;
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ResultLayerTest, Serialize) {
Serialize();
}
std::vector<InferenceEngine::SizeVector> inputDims = {
{7}, {1000}, {3, 5}, {65, 33}, {33, 65},
{1, 1000}, {223, 217, 21}, {3, 4, 5, 1}, {3, 4, 1, 5, 1}};
std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::U8, InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32,
};
ConfigMap config;
INSTANTIATE_TEST_SUITE_P(
smoke_ResultLayerTest, ResultLayerTest,
::testing::Combine(::testing::ValuesIn(inputDims),
::testing::ValuesIn(inputPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(config)));
} // namespace

View File

@ -1,51 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include <ngraph/opsets/opset3.hpp>
#include "shared_test_classes/single_layer/scatter_elements_update.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ngraph::opset3;
namespace {
TEST_P(ScatterElementsUpdateLayerTest, Serialize) {
Serialize();
}
// map<inputShape, map<indicesShape, axis>>
std::map<std::vector<size_t>, std::map<std::vector<size_t>, std::vector<int>>> axesShapeInShape {
{{10, 12, 15}, {{{1, 2, 4}, {0, 1, 2}}, {{2, 2, 2}, {-1, -2, -3}}}},
{{15, 9, 8, 12}, {{{1, 2, 2, 2}, {0, 1, 2, 3}}, {{1, 2, 1, 4}, {-1, -2, -3, -4}}}},
{{9, 9, 8, 8, 11, 10}, {{{1, 2, 1, 2, 1, 2}, {5, -3}}}},
};
// index value should not be random data
const std::vector<std::vector<size_t>> idxValue = {
{1, 0, 4, 6, 2, 3, 7, 5}
};
const std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
};
const std::vector<InferenceEngine::Precision> idxPrecisions = {
InferenceEngine::Precision::I32,
InferenceEngine::Precision::I64,
};
const auto ScatterEltUpdateCases = ::testing::Combine(
::testing::ValuesIn(ScatterElementsUpdateLayerTest::combineShapes(axesShapeInShape)),
::testing::ValuesIn(idxValue),
::testing::ValuesIn(inputPrecisions),
::testing::ValuesIn(idxPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(smoke_ScatterEltsUpdateSerialization, ScatterElementsUpdateLayerTest,
ScatterEltUpdateCases, ScatterElementsUpdateLayerTest::getTestCaseName);
} // namespace

View File

@ -1,50 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <map>
#include <vector>
#include "shared_test_classes/single_layer/scatter_ND_update.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ScatterNDUpdateLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
};
const std::vector<InferenceEngine::Precision> idxPrecisions = {
InferenceEngine::Precision::I32,
InferenceEngine::Precision::I64,
};
// map<inputShape map<indicesShape, indicesValue>>
// updateShape is gotten from inputShape and indicesShape
std::map<std::vector<size_t>, std::map<std::vector<size_t>, std::vector<size_t>>>
sliceSelectInShape{
{{10, 9, 9, 11},
{{{4, 1}, {1, 3, 5, 7}},
{{1, 2}, {4, 6}},
{{2, 3}, {0, 1, 1, 2, 2, 2}},
{{1, 4}, {5, 5, 4, 9}}}},
{{10, 9, 10, 9, 10}, {{{2, 2, 1}, {5, 6, 2, 8}}, {{2, 3}, {0, 4, 6, 5, 7, 1}}}},
};
const auto ScatterNDUpdateCases = ::testing::Combine(
::testing::ValuesIn(ScatterNDUpdateLayerTest::combineShapes(sliceSelectInShape)),
::testing::ValuesIn(inputPrecisions),
::testing::ValuesIn(idxPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(
smoke_ScatterNDUpdateLayerTestSerialization,
ScatterNDUpdateLayerTest,
ScatterNDUpdateCases,
ScatterNDUpdateLayerTest::getTestCaseName);
} // namespace

View File

@ -1,51 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include <ngraph/opsets/opset8.hpp>
#include "shared_test_classes/single_layer/scatter_update.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ngraph::opset8;
namespace {
TEST_P(ScatterUpdateLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
};
const std::vector<InferenceEngine::Precision> idxPrecisions = {
InferenceEngine::Precision::I32,
InferenceEngine::Precision::I64,
};
// map<inputShape, map<indicesShape, axis>>
std::map<std::vector<size_t>, std::map<std::vector<size_t>, std::vector<int>>> axesShapeInShape {
{{10, 16, 12, 15}, {{{2, 4}, {0, 1, 2, 3}}, {{8}, {-1, -2, -3, -4}}}},
{{10, 9, 10, 9, 10}, {{{8}, {-3, -1, 0, 2, 4}}, {{4, 2}, {-2, 2}}}},
};
//indices should not be random value
const std::vector<std::vector<int64_t>> idxValue = {
{0, 2, 4, 6, 1, 3, 5, 7}
};
const auto ScatterUpdateCase = ::testing::Combine(
::testing::ValuesIn(ScatterUpdateLayerTest::combineShapes(axesShapeInShape)),
::testing::ValuesIn(idxValue),
::testing::ValuesIn(inputPrecisions),
::testing::ValuesIn(idxPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)
);
INSTANTIATE_TEST_SUITE_P(smoke_ScatterUpdate, ScatterUpdateLayerTest, ScatterUpdateCase, ScatterUpdateLayerTest::getTestCaseName);
} // namespace

View File

@ -1,41 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/select.hpp"
#include <vector>
using namespace LayerTestsDefinitions;
const std::vector<InferenceEngine::Precision> inputPrecision = {
InferenceEngine::Precision::I8, InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32, InferenceEngine::Precision::FP16,
InferenceEngine::Precision::FP32};
const std::vector<std::vector<std::vector<size_t>>> noneShapes = {
{{2, 3, 4, 5, 6}, {2, 3, 4, 5, 6}, {2, 3, 4, 5, 6}}};
const auto noneCases = ::testing::Combine(
::testing::ValuesIn(noneShapes), ::testing::ValuesIn(inputPrecision),
::testing::Values(ngraph::op::AutoBroadcastType::NONE),
::testing::Values(CommonTestUtils::DEVICE_CPU));
const std::vector<std::vector<std::vector<size_t>>> numpyShapes = {
{{5, 1, 2, 1}, {8, 1, 9, 1, 1}, {5, 1, 2, 1}}};
const auto numpyCases = ::testing::Combine(
::testing::ValuesIn(numpyShapes), ::testing::ValuesIn(inputPrecision),
::testing::Values(ngraph::op::AutoBroadcastType::NUMPY),
::testing::Values(CommonTestUtils::DEVICE_CPU));
TEST_P(SelectLayerTest, Serialize) {
Serialize();
}
INSTANTIATE_TEST_SUITE_P(smoke_Serialization_SelectLayerTest_none,
SelectLayerTest, noneCases,
SelectLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Serialization_SelectLayerTest_numpy,
SelectLayerTest, numpyCases,
SelectLayerTest::getTestCaseName);

View File

@ -1,49 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/shuffle_channels.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(ShuffleChannelsLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::I8,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::FP32
};
const std::vector<int> axes = {0, 1, 2, 3};
const std::vector<int> negativeAxes = {-4, -3, -2, -1};
const std::vector<int> groups = {1, 2, 3};
const auto shuffleChannelsParams4D = ::testing::Combine(
::testing::ValuesIn(axes),
::testing::ValuesIn(groups)
);
const auto shuffleChannelsParamsNegativeAxis4D = ::testing::Combine(
::testing::ValuesIn(negativeAxes),
::testing::ValuesIn(groups)
);
INSTANTIATE_TEST_SUITE_P(smoke_ShuffleChannelsSerialization, ShuffleChannelsLayerTest,
::testing::Combine(
shuffleChannelsParams4D,
::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<size_t >({6, 6, 6, 6})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
ShuffleChannelsLayerTest::getTestCaseName);
} // namespace

View File

@ -1,131 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/slice.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ov::test;
namespace {
TEST_P(Slice8LayerTest, Serialize) {
serialize();
}
const std::vector<ElementType> inputPrecisions = {
ElementType::f32,
ElementType::bf16,
ElementType::i8
};
const std::vector<ElementType> inputPrecisionsOther = {
ElementType::i64,
ElementType::i32,
ElementType::i16,
ElementType::u8
};
std::vector<Slice8SpecificParams> staticParams = {
Slice8SpecificParams{ {{{}, {{ 16 }}}}, { 4 }, { 12 }, { 1 }, { 0 } },
Slice8SpecificParams{ {{{}, {{ 16 }}}}, { 0 }, { 8 }, { 2 }, { 0 } },
Slice8SpecificParams{ {{{}, {{ 20, 10, 5 }}}}, { 0, 0}, { 10, 20}, { 1, 1 }, { 1, 0 } },
Slice8SpecificParams{ {{{}, {{ 1, 2, 12, 100 }}}}, { 0, 1, 0, 1 }, { 1, 2, 5, 100 }, { 1, 1, 1, 10 }, {} },
Slice8SpecificParams{ {{{}, {{ 1, 12, 100 }}}}, { 0, 9, 0 }, { 1, 11, 1 }, { 1, 1, 1 }, { 0, 1, -1 } },
Slice8SpecificParams{ {{{}, {{ 1, 12, 100 }}}}, { 0, 1, 0 }, { 10, -1, 10 }, { 1, 1, 1 }, { -3, -2, -1} },
Slice8SpecificParams{ {{{}, {{ 2, 12, 100 }}}}, { 1, 12, 100 }, { 0, 7, 0 }, { -1, -1, -1 }, {} },
Slice8SpecificParams{ {{{}, {{ 2, 12, 100 }}}}, { 1, 4, 99 }, { 0, 9, 0 }, { -1, 2, -1 }, {} },
Slice8SpecificParams{ {{{}, {{ 2, 12, 100 }}}}, { -1, -1, -1 }, { 0, 4, 0 }, { -1, -2, -1 }, {} },
Slice8SpecificParams{ {{{}, {{ 2, 12, 100 }}}}, { -1, -1, -1 }, { 0, 0, 4 }, { -1, -1, -1 }, {2, 0, 1} },
Slice8SpecificParams{ {{{}, {{ 2, 12, 100 }}}}, { 0, 0, 4 }, { -5, -1, -1 }, { 1, 2, 1 }, {2, 0, 1} },
Slice8SpecificParams{ {{{}, {{ 2, 2, 2, 2 }}}}, { 0, 0, 0, 0 }, { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 2, 2, 2, 2 }}}}, { 1, 1, 1, 1 }, { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 2, 2, 4, 3 }}}}, { 0, 0, 0, 0 }, { 2, 2, 4, 3 }, { 1, 1, 2, 1 }, { -4, 1, -2, 3 } },
Slice8SpecificParams{ {{{}, {{ 2, 2, 4, 2 }}}}, { 1, 0, 0, 1 }, { 2, 2, 4, 2 }, { 1, 1, 2, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 1, 2, 4, 2 }}}}, { 0, 1, 0, 1 }, { 10, 2, 4, 2 }, { 1, 1, 2, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 1, 2, 4, 2 }}}}, { 1, 0, 1, 0 }, { 2, 4, 2, 10 }, { 1, 2, 1, 1 }, { -1, -2, -3, -4 } },
Slice8SpecificParams{ {{{}, {{ 10, 2, 4, 2 }}}}, { 9, 1, 3, 0 }, { 0, 0, 0, 1 }, { -1, -1, -1, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 10, 2, 4, 2 }}}}, { 19, 1, -1, 0 }, { -10, 0, 0, -1 }, { -1, -1, -1, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 3, 2, 4, 200 }}}}, { 0, 1, -1, -1 }, { 3, 2, 0, 0 }, { 1, 1, -2, -1 }, {} },
Slice8SpecificParams{ {{{}, {{ 2, 4, 5, 5, 68 }}}}, { 0, 1, 0, 0, 0 }, {
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max() }, { 1, 1, 1, 1, 16 }, {} },
Slice8SpecificParams{ {{{}, {{ 10, 12 }}}}, { -1, 1 }, { -9999, 10 }, { -1, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 5, 5, 5, 5 }}}}, { -1, 0, -1, 0 }, { -50, -1, -60, -1 }, { -1, 1, -1, 1 }, {} },
Slice8SpecificParams{ {{{}, {{ 1, 5, 32, 32 }}}}, { 0, 2, 5, 4 }, { 1, 4, 28, 27 }, { 1, 1, 1, 1 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 1, 5, 32, 20 }}}}, { 0, 1, 0, 0 }, { 1, 3, 32, 20 }, { 1, 1, 1, 1 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 2, 5, 32, 20 }}}}, { 0, 0, 10, 0 }, { 1, 3, 20, 20 }, { 1, 1, 1, 1 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 1, 5, 32, 32 }}}}, { 0, 0, 20, 20 }, { 1, 5, 25, 26 }, { 1, 1, 1, 2 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 2, 5, 32, 32 }}}}, { 0, 0, 0, 20 }, { 1, 2, 30, 30 }, { 1, 1, 2, 1 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 1, 5, 32, 20 }}}}, { 0, 0, 2, 10 }, { 1, 3, 32, 20 }, { 1, 1, 1, 1 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 2, 5, 32, 32 }}}}, { 0, 1, 0, 10 }, { 1, 5, 32, 30 }, { 1, 1, 1, 1 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 1, 5, 32, 20 }}}}, { 0, 1, 2, 10 }, { 1, 5, 32, 18 }, { 1, 1, 1, 2 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 2, 8, 32, 20 }}}}, { 0, 0, 2, 10 }, { 1, 8, 32, 18 }, { 1, 2, 1, 2 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{}, {{ 2, 8, 32, 20 }}}}, { 0, -20, -15 }, { 2, -5, 3 }, { 1, 1, 1 }, { 0, 2, 1 } }
};
INSTANTIATE_TEST_SUITE_P(smoke_Slice8Serialization_static, Slice8LayerTest,
::testing::Combine(
::testing::ValuesIn(staticParams),
::testing::ValuesIn(inputPrecisions),
::testing::Values(ElementType::undefined),
::testing::Values(ElementType::undefined),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>())),
Slice8LayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(smoke_Slice8Serialization_PrecisionTransformation, Slice8LayerTest,
::testing::Combine(
::testing::Values(staticParams[0]),
::testing::ValuesIn(inputPrecisionsOther),
::testing::Values(ElementType::undefined),
::testing::Values(ElementType::undefined),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>())),
Slice8LayerTest::getTestCaseName);
std::vector<Slice8SpecificParams> dynamicParams = {
Slice8SpecificParams{ {{{ -1 }, {{ 8 }, { 16 }}}}, { 4 }, { 12 }, { 1 }, { 0 } },
Slice8SpecificParams{ {{{ ov::Dimension(2, 20) }, {{ 5 }, { 15 }}}}, { 0 }, { 8 }, { 2 }, { 0 } },
Slice8SpecificParams{ {{{ -1, -1, -1 }, {{ 20, 10, 5 }, {5, 10, 20}}}}, { 0, 0}, { 10, 20}, { 1, 1 }, { 1, 0 } },
Slice8SpecificParams{ {{{ -1, -1, -1, -1 }, {{ 1, 2, 12, 100 }}}}, { 0, 1, 0, 1 }, { 1, 2, 5, 100 }, { 1, 1, 1, 10 }, {} },
Slice8SpecificParams{ {{{ -1, ov::Dimension(2, 20), -1 }, {{ 1, 12, 100 }, { 2, 12, 100 }}}}, { 0, 9, 0 }, { 1, 11, 1 }, { 1, 1, 1 }, {} },
Slice8SpecificParams{ {{{ ov::Dimension(1, 5), ov::Dimension(1, 5), ov::Dimension(1, 5), ov::Dimension(1, 5) },
{{ 2, 2, 2, 2 }, { 2, 2, 4, 3 }, { 2, 2, 4, 2 }, { 1, 2, 4, 2 }}}},
{ 0, 0, 0, 0 }, { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, {} },
Slice8SpecificParams{ {{{ -1, ov::Dimension(1, 5), ov::Dimension(1, 5), -1 }, {{ 10, 2, 4, 2 }, { 10, 4, 2, 2 }}}},
{ 9, 1, 3, 0 }, { 0, 0, 0, 1 }, { -1, -1, -1, 1 }, {} },
Slice8SpecificParams{ {{{ -1, ov::Dimension(1, 5), -1, -1, ov::Dimension(30, 70) }, {{ 2, 4, 5, 5, 68 }, { 2, 3, 7, 7, 33 }}}},
{ 0, 1, 0, 0, 0 }, {
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max(),
std::numeric_limits<std::int64_t>::max() }, { 1, 1, 1, 1, 16 }, {} },
Slice8SpecificParams{ {{{ov::Dimension(1, 5), ov::Dimension(1, 7), ov::Dimension(1, 35), ov::Dimension(1, 35)},
{{ 1, 5, 32, 32 }, { 2, 5, 32, 20 }, { 2, 5, 32, 32 }}}}, { 0, 2, 5, 4 }, { 1, 4, 28, 27 }, { 1, 1, 1, 1 }, { 0, 1, 2, 3 } },
Slice8SpecificParams{ {{{ov::Dimension(1, 5), ov::Dimension(10, 20), ov::Dimension(20, 30), 16, ov::Dimension(30, 40)},
{{ 4, 15, 30, 16, 39 }}}}, { 0, 2, 10, 0, 35 }, { 1, 8, 25, 16, 40 }, { 1, 1, 1, 1, 1 }, { 0, 1, 2, 3, 4 } }
};
INSTANTIATE_TEST_SUITE_P(smoke_Slice8Serialization_dynamic, Slice8LayerTest,
::testing::Combine(
::testing::ValuesIn(dynamicParams),
::testing::ValuesIn(inputPrecisions),
::testing::Values(ElementType::undefined),
::testing::Values(ElementType::undefined),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>())),
Slice8LayerTest::getTestCaseName);
} // namespace

View File

@ -1,38 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/space_to_batch.hpp"
#include <vector>
using namespace LayerTestsDefinitions;
namespace {
TEST_P(SpaceToBatchLayerTest, Serialize) {
Serialize();
}
const std::vector<std::vector<int64_t>> blockShapes4D{{1, 1, 2, 2}};
const std::vector<std::vector<int64_t>> padsBegins4D{{0, 0, 0, 0},
{0, 0, 0, 2}};
const std::vector<std::vector<int64_t>> padsEnds4D{{0, 0, 0, 0}, {0, 0, 0, 2}};
const std::vector<std::vector<size_t>> dataShapes4D{
{1, 1, 2, 2}, {1, 3, 2, 2}, {1, 1, 4, 4}, {2, 1, 2, 4}};
const auto SpaceToBatch4D = ::testing::Combine(
::testing::ValuesIn(blockShapes4D), ::testing::ValuesIn(padsBegins4D),
::testing::ValuesIn(padsEnds4D), ::testing::ValuesIn(dataShapes4D),
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(InferenceEngine::Precision::FP32),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(smoke_spacetobatch4D_Serialization,
SpaceToBatchLayerTest, SpaceToBatch4D,
SpaceToBatchLayerTest::getTestCaseName);
} // namespace

View File

@ -1,45 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/space_to_depth.hpp"
#include <ngraph/opsets/opset3.hpp>
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ngraph::opset3;
namespace {
TEST_P(SpaceToDepthLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> inputPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::U8,
InferenceEngine::Precision::I16,
};
const std::vector<SpaceToDepth::SpaceToDepthMode> modes = {
SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST,
SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST};
const std::vector<std::vector<size_t>> inputShapesBS2 = {
{1, 1, 2, 2}, {1, 1, 4, 4}, {1, 1, 6, 6}, {2, 8, 6, 6},
{2, 4, 10, 8}, {1, 1, 2, 2, 2}, {1, 1, 4, 4, 4}, {1, 1, 6, 6, 6},
{2, 8, 6, 6, 6}, {2, 4, 10, 8, 12}};
const auto SpaceToDepthBS2 = ::testing::Combine(
::testing::ValuesIn(inputShapesBS2), ::testing::ValuesIn(inputPrecisions),
::testing::ValuesIn(modes), ::testing::Values(1, 2),
::testing::Values(CommonTestUtils::DEVICE_CPU));
INSTANTIATE_TEST_SUITE_P(
smoke_SpaceToDepthSerialization, SpaceToDepthLayerTest,
::testing::Combine(::testing::ValuesIn(inputShapesBS2),
::testing::ValuesIn(inputPrecisions),
::testing::ValuesIn(modes), ::testing::Values(1, 2),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
SpaceToDepthLayerTest::getTestCaseName);
} // namespace

View File

@ -1,39 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/split.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(SplitLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U16,
InferenceEngine::Precision::BOOL};
INSTANTIATE_TEST_SUITE_P(
smoke_Split_Serialization, SplitLayerTest,
::testing::Combine(
::testing::Values(1, 2, 5, 10),
::testing::Values(0, 1, 2, 3),
::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<size_t>{20, 30, 50, 50}),
::testing::Values(std::vector<size_t>({})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
SplitLayerTest::getTestCaseName
);
} // namespace

View File

@ -1,46 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/squeeze_unsqueeze.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(SqueezeUnsqueezeLayerTest, Serialize) {
Serialize();
}
std::map<std::vector<size_t>, std::vector<std::vector<int>>> axesVectors = {
{{1, 1, 1, 1}, {{}, {-1}, {0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {0, 3}, {1, 2}, {2, 3}, {0, 1, 2}, {0, 2, 3}, {1, 2, 3}, {0, 1, 2, 3}}},
{{1, 2, 3, 4}, {{}, {0}}},
{{2, 1, 3, 4}, {{}, {1}}},
{{1}, {{}, {-1}, {0}}},
{{1, 2}, {{}, {0}}},
{{2, 1}, {{}, {1}, {-1}}},
};
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32};
const std::vector<ngraph::helpers::SqueezeOpType> opTypes = {
ngraph::helpers::SqueezeOpType::SQUEEZE};
INSTANTIATE_TEST_SUITE_P(smoke_Squeeze_Basic, SqueezeUnsqueezeLayerTest,
::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(axesVectors)),
::testing::ValuesIn(opTypes),
::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(CommonTestUtils::DEVICE_CPU)),
SqueezeUnsqueezeLayerTest::getTestCaseName);
} // namespace

View File

@ -1,47 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "common_test_utils/test_constants.hpp"
#include "shared_test_classes/single_layer/tensor_iterator.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(TensorIteratorTest, Serialize_IR10) {
Serialize(ov::pass::Serialize::Version::IR_V10);
}
TEST_P(TensorIteratorTest, Serialize_IR11) {
Serialize(ov::pass::Serialize::Version::IR_V11);
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16};
const std::vector<ngraph::helpers::TensorIteratorBody> body = {
ngraph::helpers::TensorIteratorBody::GRU, ngraph::helpers::TensorIteratorBody::LSTM, ngraph::helpers::TensorIteratorBody::RNN};
const std::vector<bool> decompose = {true, false};
const std::vector<size_t> sequenceLength = {2};
const std::vector<size_t> batch = {1, 10};
const std::vector<size_t> hiddenSize = {128};
const std::vector<size_t> sequenceAxis = {1};
const std::vector<float> clip = {0.f};
const std::vector<ngraph::op::RecurrentSequenceDirection> direction = {
ngraph::op::RecurrentSequenceDirection::FORWARD, ngraph::op::RecurrentSequenceDirection::REVERSE};
INSTANTIATE_TEST_SUITE_P(smoke_TensorIterator, TensorIteratorTest,
::testing::Combine(
::testing::ValuesIn(decompose),
::testing::ValuesIn(sequenceLength),
::testing::ValuesIn(batch),
::testing::ValuesIn(hiddenSize),
::testing::ValuesIn(sequenceAxis),
::testing::ValuesIn(clip),
::testing::ValuesIn(body),
::testing::ValuesIn(direction),
::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
TensorIteratorTest::getTestCaseName);
} // namespace

View File

@ -1,71 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/transpose.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(TransposeLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32
};
std::vector<std::vector<size_t>> inputShape2D = {{2, 10}, {10, 2}, {10, 10}};
std::vector<std::vector<size_t>> order2D = {{}, {0, 1}, {1, 0}};
INSTANTIATE_TEST_SUITE_P(smoke_Transpose2D, TransposeLayerTest,
::testing::Combine(
::testing::ValuesIn(order2D),
::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(inputShape2D),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
TransposeLayerTest::getTestCaseName);
std::vector<std::vector<size_t>> inputShape4D = {{2, 2, 2, 2}};
std::vector<std::vector<size_t>> order4D = {
{}, {0, 1, 2, 3}
};
INSTANTIATE_TEST_SUITE_P(smoke_Transpose4D, TransposeLayerTest,
::testing::Combine(
::testing::ValuesIn(order4D),
::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(inputShape4D),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
TransposeLayerTest::getTestCaseName);
std::vector<std::vector<size_t>> inputShape5D = {{2, 3, 4, 5, 6}};
std::vector<std::vector<size_t>> order5D = {
{}, {0, 1, 2, 3, 4}
};
INSTANTIATE_TEST_SUITE_P(smoke_Transpose5D, TransposeLayerTest,
::testing::Combine(
::testing::ValuesIn(order5D),
::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(inputShape5D),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
TransposeLayerTest::getTestCaseName);
} // namespace

View File

@ -1,46 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/squeeze_unsqueeze.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(SqueezeUnsqueezeLayerTest, Serialize) {
Serialize();
}
std::map<std::vector<size_t>, std::vector<std::vector<int>>> axesVectors = {
{{1, 1, 1, 1}, {{-1}, {0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {0, 3}, {1, 2}, {2, 3}, {0, 1, 2}, {0, 2, 3}, {1, 2, 3}, {0, 1, 2, 3}}},
{{1, 2, 3, 4}, {{0}}},
{{2, 1, 3, 4}, {{1}}},
{{1}, {{-1}, {0}}},
{{1, 2}, {{0}}},
{{2, 1}, {{1}, {-1}}},
};
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32};
const std::vector<ngraph::helpers::SqueezeOpType> opTypes = {
ngraph::helpers::SqueezeOpType::UNSQUEEZE};
INSTANTIATE_TEST_SUITE_P(smoke_Squeeze_Basic, SqueezeUnsqueezeLayerTest,
::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(axesVectors)),
::testing::ValuesIn(opTypes),
::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(CommonTestUtils::DEVICE_CPU)),
SqueezeUnsqueezeLayerTest::getTestCaseName);
} // namespace

View File

@ -1,39 +0,0 @@
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "shared_test_classes/single_layer/variadic_split.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
TEST_P(VariadicSplitLayerTest, Serialize) {
Serialize();
}
const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
};
// Sum of elements numSplits = inputShapes[Axis]
const std::vector<std::vector<size_t>> numSplits = {
{1, 16, 5, 8},
};
INSTANTIATE_TEST_SUITE_P(smoke_VariadicSplitSerialization, VariadicSplitLayerTest,
::testing::Combine(
::testing::ValuesIn(numSplits),
::testing::Values(0, 1, 2, 3),
::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<size_t>({30, 30, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
VariadicSplitLayerTest::getTestCaseName);
} // namespace