From 0799163b6189213775bea5a38ab03dfe55431fbd Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Wed, 3 Apr 2024 18:46:41 +0200 Subject: [PATCH] [TEST] Compare whole Tensor in Template Plugin tests (#23408) ### Details: - `ov::test::utils::compare(...)` used for output vs reference values comparison (where possible). - Tests with a need of complex changes were marked with `legacy_compare` flag. These tests still use legacy raw data comparison and theirs transition will be addressed in further PR's. ### Tickets: - CVS-135274, CVS-135275 --------- Co-authored-by: Michal Lukaszewski --- .../op_reference/adaptive_avg_pool.cpp | 4 +- .../op_reference/adaptive_max_pool.cpp | 6 +- .../tests/functional/op_reference/add.cpp | 48 +- .../tests/functional/op_reference/atanh.cpp | 1 + .../functional/op_reference/augru_cell.cpp | 2 +- .../functional/op_reference/avg_pool.cpp | 4 +- .../op_reference/base_reference_test.cpp | 36 +- .../op_reference/base_reference_test.hpp | 6 +- .../functional/op_reference/batch_norm.cpp | 4 +- .../op_reference/batch_to_space.cpp | 2 +- .../op_reference/binary_convolution.cpp | 48 +- .../functional/op_reference/bucketize.cpp | 1 + .../tests/functional/op_reference/clamp.cpp | 1 + .../functional/op_reference/constant.cpp | 22 +- .../functional/op_reference/conversion.hpp | 1 + .../op_reference/convert_color_i420.cpp | 2 +- .../functional/op_reference/convolution.cpp | 204 ++--- .../op_reference/convolution_backprop.cpp | 312 ++++---- .../tests/functional/op_reference/cum_sum.cpp | 1 + .../op_reference/deformable_convolution.cpp | 718 +++++++++--------- .../op_reference/deformable_psroi_pooling.cpp | 1 + .../op_reference/detection_output.cpp | 2 + .../tests/functional/op_reference/dft.cpp | 14 +- .../tests/functional/op_reference/divide.cpp | 70 +- .../tests/functional/op_reference/elu.cpp | 1 + .../op_reference/embedding_segments_sum.cpp | 46 +- .../op_reference/embeddingbag_offsetssum.cpp | 46 +- .../op_reference/embeddingbag_packedsum.cpp | 46 +- .../tests/functional/op_reference/erf.cpp | 20 +- ...xperimental_detectron_detection_output.cpp | 1 + ...imental_detectron_detection_prior_grid.cpp | 1 + ...erimental_detectron_generate_proposals.cpp | 1 + .../tests/functional/op_reference/eye.cpp | 25 +- .../functional/op_reference/fake_quantize.cpp | 4 +- .../functional/op_reference/floor_mod.cpp | 1 + .../op_reference/generate_proposals.cpp | 1 + .../functional/op_reference/grid_sample.cpp | 12 +- .../tests/functional/op_reference/grn.cpp | 1 + .../op_reference/group_convolution.cpp | 60 +- .../group_convolution_backprop.cpp | 116 +-- .../op_reference/group_normalization.cpp | 1 + .../functional/op_reference/hard_sigmoid.cpp | 14 +- .../tests/functional/op_reference/hswish.cpp | 14 +- .../tests/functional/op_reference/idft.cpp | 14 +- .../functional/op_reference/interpolate.cpp | 22 +- .../tests/functional/op_reference/irdft.cpp | 3 +- .../functional/op_reference/log_softmax.cpp | 32 +- .../tests/functional/op_reference/lrn.cpp | 8 +- .../functional/op_reference/lstm_cell.cpp | 4 + .../functional/op_reference/lstm_sequence.cpp | 4 +- .../tests/functional/op_reference/matmul.cpp | 12 +- .../functional/op_reference/matrix_nms.cpp | 1 + .../functional/op_reference/max_pool.cpp | 4 +- .../tests/functional/op_reference/maximum.cpp | 1 + .../tests/functional/op_reference/memory.cpp | 5 +- .../tests/functional/op_reference/mish.cpp | 3 +- .../tests/functional/op_reference/mod.cpp | 58 +- .../functional/op_reference/multiply.cpp | 53 +- .../tests/functional/op_reference/nonzero.cpp | 1 + .../functional/op_reference/normalize_l2.cpp | 8 +- .../op_reference/parameter_as_output.cpp | 4 +- .../tests/functional/op_reference/power.cpp | 39 +- .../tests/functional/op_reference/prelu.cpp | 78 +- .../functional/op_reference/prior_box.cpp | 2 + .../op_reference/prior_box_clustered.cpp | 1 + .../functional/op_reference/proposal.cpp | 2 + .../functional/op_reference/psroi_pooling.cpp | 1 + .../tests/functional/op_reference/range.cpp | 2 + .../tests/functional/op_reference/rdft.cpp | 1 + .../functional/op_reference/region_yolo.cpp | 3 +- .../tests/functional/op_reference/relu.cpp | 18 +- .../functional/op_reference/reorg_yolo.cpp | 17 +- .../tests/functional/op_reference/reshape.cpp | 2 + .../tests/functional/op_reference/result.cpp | 4 +- .../op_reference/reverse_sequence.cpp | 2 +- .../functional/op_reference/rnn_sequence.cpp | 3 +- .../functional/op_reference/roi_pooling.cpp | 1 + .../op_reference/scatter_update.cpp | 2 +- .../tests/functional/op_reference/select.cpp | 1 + .../tests/functional/op_reference/sigmoid.cpp | 22 +- .../tests/functional/op_reference/slice.cpp | 3 +- .../tests/functional/op_reference/softmax.cpp | 22 +- .../op_reference/squared_difference.cpp | 2 + .../tests/functional/op_reference/squeeze.cpp | 8 +- .../functional/op_reference/subtract.cpp | 39 +- .../tests/functional/op_reference/swish.cpp | 16 +- .../tests/functional/op_reference/tan.cpp | 1 + .../op_reference/tensor_iterator.cpp | 2 + .../tests/functional/op_reference/tile.cpp | 4 +- .../functional/op_reference/transpose.cpp | 4 +- .../tests/functional/op_reference/unique.cpp | 1 + .../functional/op_reference/unsqueeze.cpp | 6 +- .../subgraph_reference/preprocess.cpp | 1 + 93 files changed, 1302 insertions(+), 1166 deletions(-) diff --git a/src/plugins/template/tests/functional/op_reference/adaptive_avg_pool.cpp b/src/plugins/template/tests/functional/op_reference/adaptive_avg_pool.cpp index 5dfbb9e4899ae9..48b0b04f94b842 100644 --- a/src/plugins/template/tests/functional/op_reference/adaptive_avg_pool.cpp +++ b/src/plugins/template/tests/functional/op_reference/adaptive_avg_pool.cpp @@ -28,8 +28,8 @@ struct AdaptiveAvgPoolParams { m_output_shape(output_shape), m_input_type(input_type), m_output_type(ouput_type), - m_input_data(CreateTensor(input_type, input_values)), - m_expected_data(CreateTensor(ouput_type, output_values)), + m_input_data(CreateTensor(m_input_shape, input_type, input_values)), + m_expected_data(CreateTensor(m_output_shape, ouput_type, output_values)), m_adaptive_shape(adaptive_shape), m_adaptive_values(adaptive_values) {} Shape m_input_shape; diff --git a/src/plugins/template/tests/functional/op_reference/adaptive_max_pool.cpp b/src/plugins/template/tests/functional/op_reference/adaptive_max_pool.cpp index c3a9513c7dae55..e43f8c5418c62c 100644 --- a/src/plugins/template/tests/functional/op_reference/adaptive_max_pool.cpp +++ b/src/plugins/template/tests/functional/op_reference/adaptive_max_pool.cpp @@ -29,9 +29,9 @@ struct AdaptiveMaxPoolParams { m_output_shape(output_shape), m_input_type(input_type), m_output_type(output_type), - m_input_data(CreateTensor(input_type, input_values)), - m_expected_data(CreateTensor(output_type, output_values)), - m_expected_indices(CreateTensor(element::Type_t::i64, output_indices)), + m_input_data(CreateTensor(input_shape, input_type, input_values)), + m_expected_data(CreateTensor(output_shape, output_type, output_values)), + m_expected_indices(CreateTensor(output_shape, element::Type_t::i64, output_indices)), m_adaptive_shape(adaptive_shape), m_adaptive_values(adaptive_values) {} Shape m_input_shape; diff --git a/src/plugins/template/tests/functional/op_reference/add.cpp b/src/plugins/template/tests/functional/op_reference/add.cpp index 1fe82853f0d267..6bddcc5143fa91 100644 --- a/src/plugins/template/tests/functional/op_reference/add.cpp +++ b/src/plugins/template/tests/functional/op_reference/add.cpp @@ -15,8 +15,9 @@ namespace { struct AddParams { template - AddParams(const PartialShape& shape1, - const PartialShape& shape2, + AddParams(const Shape& shape1, + const Shape& shape2, + const Shape& outshape, const element::Type& iType, const std::vector& iValues1, const std::vector& iValues2, @@ -25,12 +26,12 @@ struct AddParams { pshape2(shape2), inType(iType), outType(iType), - inputData1(CreateTensor(iType, iValues1)), - inputData2(CreateTensor(iType, iValues2)), - refData(CreateTensor(iType, oValues)) {} + inputData1(CreateTensor(shape1, iType, iValues1)), + inputData2(CreateTensor(shape2, iType, iValues2)), + refData(CreateTensor(outshape, iType, oValues)) {} - PartialShape pshape1; - PartialShape pshape2; + Shape pshape1; + Shape pshape2; element::Type inType; element::Type outType; ov::Tensor inputData1; @@ -58,8 +59,8 @@ class ReferenceAddLayerTest : public testing::TestWithParam, public C } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -89,8 +90,8 @@ class ReferenceAddInPlaceLayerTest : public testing::TestWithParam, p } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -116,26 +117,30 @@ std::vector generateParamsForAdd() { using T = typename element_type_traits::value_type; std::vector params{ - AddParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + AddParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{1, 2, 3, 4}, std::vector{5, 6, 7, 8}, std::vector{6, 8, 10, 12}), - AddParams(ov::PartialShape{1, 2}, - ov::PartialShape{3, 2, 2}, + AddParams(ov::Shape{1, 2}, + ov::Shape{3, 2, 2}, + ov::Shape{3, 2, 2}, IN_ET, std::vector{1, 2}, std::vector{5, 6, 7, 8, 2, 3, 1, 5, 6, 7, 1, 3}, std::vector{6, 8, 8, 10, 3, 5, 2, 7, 7, 9, 2, 5}), - AddParams(ov::PartialShape{1}, - ov::PartialShape{1}, + AddParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{2}, std::vector{8}, std::vector{10}), - AddParams(ov::PartialShape{2, 2}, - ov::PartialShape{1}, + AddParams(ov::Shape{2, 2}, + ov::Shape{1}, + ov::Shape{2, 2}, IN_ET, std::vector{2, 4, 7, 8}, std::vector{8}, @@ -148,8 +153,9 @@ template std::vector generateParamsForAddInPlace() { using T = typename element_type_traits::value_type; - std::vector params{AddParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{AddParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{1, 2, 3, 4}, std::vector{5, 6, 7, 8}, diff --git a/src/plugins/template/tests/functional/op_reference/atanh.cpp b/src/plugins/template/tests/functional/op_reference/atanh.cpp index 47832a1a9f35ac..f5641606fa533a 100644 --- a/src/plugins/template/tests/functional/op_reference/atanh.cpp +++ b/src/plugins/template/tests/functional/op_reference/atanh.cpp @@ -29,6 +29,7 @@ struct Builder : ParamsBuilder { class ReferenceAtanhLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.input.shape, params.input.type); inputData = {params.input.data}; diff --git a/src/plugins/template/tests/functional/op_reference/augru_cell.cpp b/src/plugins/template/tests/functional/op_reference/augru_cell.cpp index 31a343ccba07c1..e7212d6be33a38 100644 --- a/src/plugins/template/tests/functional/op_reference/augru_cell.cpp +++ b/src/plugins/template/tests/functional/op_reference/augru_cell.cpp @@ -239,7 +239,7 @@ std::vector generateParams() { 0.07849785f, 0.76568159f}), reference_tests::Tensor(ET, {1, 1}, std::vector{0.3333f}), - reference_tests::Tensor(ET, {2, 2}, std::vector{0.666063f, 0.451451f, 0.792762f, 0.453281f}), + reference_tests::Tensor(ET, {1, 4}, std::vector{0.666063f, 0.451451f, 0.792762f, 0.453281f}), "augru_different_input_and_hidden_size"), }; return params; diff --git a/src/plugins/template/tests/functional/op_reference/avg_pool.cpp b/src/plugins/template/tests/functional/op_reference/avg_pool.cpp index a17c2b85354334..8bfb9699d96874 100644 --- a/src/plugins/template/tests/functional/op_reference/avg_pool.cpp +++ b/src/plugins/template/tests/functional/op_reference/avg_pool.cpp @@ -32,8 +32,8 @@ struct AvgPoolParams { m_output_shape(output_shape), m_input_type(input_type), m_output_type(ouput_type), - m_input_data(CreateTensor(input_type, input_values)), - m_expected_data(CreateTensor(ouput_type, output_values)), + m_input_data(CreateTensor(input_shape, input_type, input_values)), + m_expected_data(CreateTensor(output_shape, ouput_type, output_values)), m_strides(strides), m_pads_begin(pads_begin), m_pads_end(pads_end), diff --git a/src/plugins/template/tests/functional/op_reference/base_reference_test.cpp b/src/plugins/template/tests/functional/op_reference/base_reference_test.cpp index 715ab1fb8f4d92..72c8634260f66b 100644 --- a/src/plugins/template/tests/functional/op_reference/base_reference_test.cpp +++ b/src/plugins/template/tests/functional/op_reference/base_reference_test.cpp @@ -76,7 +76,13 @@ void CommonReferenceTest::Validate() { ASSERT_EQ(refOutData.size(), actualOutData.size()); for (size_t i = 0; i < refOutData.size(); i++) { - ValidateBlobs(refOutData[i], actualOutData[i], i, threshold, abs_threshold, actual_comparision_size); + ValidateBlobs(refOutData[i], + actualOutData[i], + i, + threshold, + abs_threshold, + legacy_compare, + actual_comparision_size); } } @@ -85,6 +91,7 @@ void CommonReferenceTest::ValidateBlobs(const ov::Tensor& refBlob, const size_t blob_idx, float threshold, float abs_threshold, + bool legacy_compare, size_t actual_comparision_size) { ASSERT_EQ(refBlob.get_element_type(), outBlob.get_element_type()) << "Incompatible element type for blob with index " << blob_idx; @@ -95,6 +102,33 @@ void CommonReferenceTest::ValidateBlobs(const ov::Tensor& refBlob, actual_comparision_size = refBlob.get_size(); const auto& element_type = refBlob.get_element_type(); + if (!legacy_compare) { + double abs_threshold_{abs_threshold}; + if (abs_threshold_ < 0.) + abs_threshold_ = std::numeric_limits::max(); + + switch (element_type) { + case ov::element::boolean: + case ov::element::bf16: + case ov::element::f16: + case ov::element::f32: + case ov::element::f64: + case ov::element::i8: + case ov::element::i16: + case ov::element::i32: + case ov::element::i64: + case ov::element::u8: + case ov::element::u16: + case ov::element::u32: + case ov::element::u64: + ov::test::utils::compare(refBlob, + outBlob, + // actual_comparision_size, + abs_threshold_, + threshold); + return; + } + } switch (element_type) { case ov::element::bf16: ov::test::utils::compare_raw_data(refBlob.data(), diff --git a/src/plugins/template/tests/functional/op_reference/base_reference_test.hpp b/src/plugins/template/tests/functional/op_reference/base_reference_test.hpp index 2d9de35fe942f7..94923ca58cb8ef 100644 --- a/src/plugins/template/tests/functional/op_reference/base_reference_test.hpp +++ b/src/plugins/template/tests/functional/op_reference/base_reference_test.hpp @@ -28,9 +28,11 @@ class CommonReferenceTest { const size_t blob_idx, float threshold, float abs_threshold, - size_t actual_comparision_size = 0); + bool legacy_compare, + size_t actual_comparision_size); protected: + bool legacy_compare = false; const std::string targetDevice; std::shared_ptr core; std::shared_ptr function; @@ -82,7 +84,7 @@ struct Tensor { template Tensor(const ov::Shape& shape, ov::element::Type type, const std::vector& data_elements) - : Tensor{shape, type, CreateTensor(type, data_elements)} {} + : Tensor{shape, type, CreateTensor(shape, type, data_elements)} {} // Temporary constructor to create blob with passed input shape (not 1-dimensional) template diff --git a/src/plugins/template/tests/functional/op_reference/batch_norm.cpp b/src/plugins/template/tests/functional/op_reference/batch_norm.cpp index ea2fec916493c1..860828a10d87bd 100644 --- a/src/plugins/template/tests/functional/op_reference/batch_norm.cpp +++ b/src/plugins/template/tests/functional/op_reference/batch_norm.cpp @@ -31,8 +31,8 @@ struct BatchNormParams { m_expected_shape(expected_shape), m_input_type(input_type), m_expected_type(expected_type), - m_input_value(CreateTensor(input_type, input_value)), - m_expected_value(CreateTensor(expected_type, expected_value)), + m_input_value(CreateTensor(input_shape, input_type, input_value)), + m_expected_value(CreateTensor(expected_shape, expected_type, expected_value)), m_gamma(CreateTensor(Shape{input_shape.at(1)}, input_type, gamma)), m_beta(CreateTensor(Shape{input_shape.at(1)}, input_type, beta)), m_mean(CreateTensor(Shape{input_shape.at(1)}, input_type, mean)), diff --git a/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp b/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp index 39fd9c8ef4c794..01f2a5ecf5d811 100644 --- a/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp +++ b/src/plugins/template/tests/functional/op_reference/batch_to_space.cpp @@ -128,7 +128,7 @@ std::vector generateBatchToSpaceParams() { reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - reference_tests::Tensor({2, 1, 1, 6}, IN_ET, std::vector{1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12}), + reference_tests::Tensor({1, 1, 2, 6}, IN_ET, std::vector{1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12}), "input_with_shape_4x1x1x3_2"), // input_with_shape_4x1x2x3 diff --git a/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp b/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp index 15331dc4183c26..195863690dd2d9 100644 --- a/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp +++ b/src/plugins/template/tests/functional/op_reference/binary_convolution.cpp @@ -15,9 +15,9 @@ using namespace ov; namespace { struct BinaryConvolutionParams { template - BinaryConvolutionParams(const PartialShape& inputShape, + BinaryConvolutionParams(const Shape& inputShape, const Shape& filterShape, - const PartialShape& outputShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -33,18 +33,18 @@ struct BinaryConvolutionParams { outputShape(outputShape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), + inputData(CreateTensor(inputShape, iType, iValues)), filterData(filterValues), - refData(CreateTensor(iType, oValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), dialations(dialations), padValue(padValue) {} - PartialShape inputShape; + Shape inputShape; Shape filterShape; - PartialShape outputShape; + Shape outputShape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -119,9 +119,9 @@ std::vector generateBinaryConvolutionParams() { std::vector binaryConvolutionParams{ // --------------------- 2D BinaryConvolution ------------------------------------------ - BinaryConvolutionParams(PartialShape{1, 1, 4, 4}, + BinaryConvolutionParams(Shape{1, 1, 4, 4}, Shape{1, 1, 3, 3}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1}, std::vector{0xAA, 0x80}, // 10101010 10000000 @@ -130,9 +130,9 @@ std::vector generateBinaryConvolutionParams() { {0, 0}, {0, 0}, {1, 1}), - BinaryConvolutionParams(PartialShape{1, 1, 4, 4}, + BinaryConvolutionParams(Shape{1, 1, 4, 4}, Shape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1}, std::vector{0xAA, 0x80}, // 10101010 10000000 @@ -141,9 +141,9 @@ std::vector generateBinaryConvolutionParams() { {1, 1}, {1, 1}, {1, 1}), - BinaryConvolutionParams(PartialShape{1, 1, 4, 4}, + BinaryConvolutionParams(Shape{1, 1, 4, 4}, Shape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1}, std::vector{0xAA, 0x80}, // 10101010 10000000 @@ -154,9 +154,9 @@ std::vector generateBinaryConvolutionParams() { {1, 1}, 1.0f), BinaryConvolutionParams( - PartialShape{1, 1, 5, 5}, + Shape{1, 1, 5, 5}, Shape{1, 1, 3, 3}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1}, std::vector{0x2E, 0x00}, // 10101010 10000000 @@ -166,9 +166,9 @@ std::vector generateBinaryConvolutionParams() { {0, 0}, {1, 1}), BinaryConvolutionParams( - PartialShape{1, 1, 7, 7}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, Shape{1, 1, 3, 3}, - PartialShape{1, 1, 3, 3}, IN_ET, std::vector{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0}, @@ -179,9 +179,9 @@ std::vector generateBinaryConvolutionParams() { {0, 0}, {2, 2}), BinaryConvolutionParams( - PartialShape{1, 1, 7, 7}, + Shape{1, 1, 7, 7}, Shape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0}, @@ -192,9 +192,9 @@ std::vector generateBinaryConvolutionParams() { {2, 2}, {2, 2}), BinaryConvolutionParams( - PartialShape{1, 1, 7, 7}, + Shape{1, 1, 7, 7}, Shape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0}, @@ -205,9 +205,9 @@ std::vector generateBinaryConvolutionParams() { {2, 2}, {2, 2}, 1.0f), - BinaryConvolutionParams(PartialShape{1, 2, 4, 4}, + BinaryConvolutionParams(Shape{1, 2, 4, 4}, Shape{1, 2, 3, 3}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{// channel 1 1, @@ -249,9 +249,9 @@ std::vector generateBinaryConvolutionParams() { {0, 0}, {0, 0}, {1, 1}), - BinaryConvolutionParams(PartialShape{2, 1, 4, 4}, + BinaryConvolutionParams(Shape{2, 1, 4, 4}, Shape{1, 1, 3, 3}, - PartialShape{2, 1, 2, 2}, + Shape{2, 1, 2, 2}, IN_ET, std::vector{// batch 1 1, diff --git a/src/plugins/template/tests/functional/op_reference/bucketize.cpp b/src/plugins/template/tests/functional/op_reference/bucketize.cpp index 644fd0ecbeeba2..487e20fa286b32 100644 --- a/src/plugins/template/tests/functional/op_reference/bucketize.cpp +++ b/src/plugins/template/tests/functional/op_reference/bucketize.cpp @@ -46,6 +46,7 @@ struct BucketizeParams { class ReferenceBucketizeLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.input_type, params.input_pshape, diff --git a/src/plugins/template/tests/functional/op_reference/clamp.cpp b/src/plugins/template/tests/functional/op_reference/clamp.cpp index cc69fe932db916..732f54e2284f44 100644 --- a/src/plugins/template/tests/functional/op_reference/clamp.cpp +++ b/src/plugins/template/tests/functional/op_reference/clamp.cpp @@ -41,6 +41,7 @@ struct ClampParams { class ReferenceClampLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.pshape, params.inType, params.outType, params.min, params.max); inputData = {params.inputData}; diff --git a/src/plugins/template/tests/functional/op_reference/constant.cpp b/src/plugins/template/tests/functional/op_reference/constant.cpp index 3d88723842b88d..203d1badb34a03 100644 --- a/src/plugins/template/tests/functional/op_reference/constant.cpp +++ b/src/plugins/template/tests/functional/op_reference/constant.cpp @@ -19,7 +19,7 @@ using namespace ov; namespace { struct ConstantParams { template - ConstantParams(const PartialShape& inputShape, + ConstantParams(const Shape& inputShape, const element::Type& inType, const element::Type& refType, const std::vector& inputData, @@ -28,11 +28,11 @@ struct ConstantParams { : inputShape(inputShape), inType(inType), refType(refType), - inputData(CreateTensor(inType, inputData)), - refData(CreateTensor(refType, refData)), + inputData(CreateTensor(inputShape, inType, inputData)), + refData(CreateTensor(inputShape, refType, refData)), testcaseName(test_name) {} - PartialShape inputShape; + Shape inputShape; element::Type inType; element::Type refType; ov::Tensor inputData; @@ -64,7 +64,7 @@ class ReferenceConstantLayerTest : public testing::TestWithParam private: static std::shared_ptr CreateFunction(const ParamType& params) { - auto A = op::v0::Constant::create(params.inType, params.inputShape.to_shape(), params.inputData.data()); + auto A = op::v0::Constant::create(params.inType, params.inputShape, params.inputData.data()); return std::make_shared(A, ParameterVector{}); } }; @@ -79,8 +79,8 @@ class ReferenceConstantLayerTest_2Constant : public ReferenceConstantLayerTest { private: static std::shared_ptr CreateFunction(const ParamType& params) { - auto A = op::v0::Constant::create(params.inType, params.inputShape.to_shape(), params.inputData.data()); - auto B = op::v0::Constant::create(params.inType, params.inputShape.to_shape(), params.inputData.data()); + auto A = op::v0::Constant::create(params.inType, params.inputShape, params.inputData.data()); + auto B = op::v0::Constant::create(params.inType, params.inputShape, params.inputData.data()); return std::make_shared(NodeVector{A, B}, ParameterVector{}); } }; @@ -95,7 +95,7 @@ class ReferenceConstantLayerTest_WithOp : public ReferenceConstantLayerTest { private: static std::shared_ptr CreateFunction(const ParamType& params) { - auto A = op::v0::Constant::create(params.inType, params.inputShape.to_shape(), params.inputData.data()); + auto A = op::v0::Constant::create(params.inType, params.inputShape, params.inputData.data()); return std::make_shared(std::make_shared(A), ParameterVector{}); } }; @@ -112,7 +112,7 @@ class ReferenceConstantLayerTest_MultiUse : public ReferenceConstantLayerTest { static std::shared_ptr CreateFunction(const ParamType& params) { const auto A = std::make_shared( params.inType, - params.inputShape.to_shape(), + params.inputShape, std::vector{std::to_string(*reinterpret_cast(params.inputData.data()))}); return std::make_shared(A, ParameterVector{}); } @@ -128,8 +128,8 @@ class ReferenceConstantLayerTest_EqualityBool : public ReferenceConstantLayerTes protected: static std::shared_ptr CreateFunction(const ParamType& params) { - auto A = op::v0::Constant::create(params.inType, params.inputShape.to_shape(), params.inputData.data()); - auto B = op::v0::Constant::create(params.inType, params.inputShape.to_shape(), {true, true, true, true}); + auto A = op::v0::Constant::create(params.inType, params.inputShape, params.inputData.data()); + auto B = op::v0::Constant::create(params.inType, params.inputShape, {true, true, true, true}); return std::make_shared(std::make_shared(A, B), ParameterVector{}); } }; diff --git a/src/plugins/template/tests/functional/op_reference/conversion.hpp b/src/plugins/template/tests/functional/op_reference/conversion.hpp index 1822bc8429e1ec..afe549b471ae79 100644 --- a/src/plugins/template/tests/functional/op_reference/conversion.hpp +++ b/src/plugins/template/tests/functional/op_reference/conversion.hpp @@ -47,6 +47,7 @@ struct ConvertParams { class ReferenceConversionLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; const auto& params = GetParam(); function = CreateFunction(params.pshape, params.inType, params.outType, params.conversionType); inputData = {params.inputData}; diff --git a/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp b/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp index a89053ed5caaa5..ee391e39377fa7 100644 --- a/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp +++ b/src/plugins/template/tests/functional/op_reference/convert_color_i420.cpp @@ -136,7 +136,7 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_color4x4_f32 auto exp_out = std::vector{165, 37, 37, 255, 216, 217, 165, 37, 37, 255, 216, 217, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255}; - auto out_shape = Shape{1, 2, 2, 3}; + auto out_shape = Shape{1, 8, 2, 3}; reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y); reference_tests::Tensor inp_tensor_u(input_shape_u, element::f32, input_u); diff --git a/src/plugins/template/tests/functional/op_reference/convolution.cpp b/src/plugins/template/tests/functional/op_reference/convolution.cpp index 26fd0c1b8d4335..1464fb5017a5a1 100644 --- a/src/plugins/template/tests/functional/op_reference/convolution.cpp +++ b/src/plugins/template/tests/functional/op_reference/convolution.cpp @@ -14,9 +14,9 @@ using namespace ov; namespace { struct ConvolutionParams { template - ConvolutionParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& outputShape, + ConvolutionParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -31,18 +31,18 @@ struct ConvolutionParams { inType(iType), filterType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), dialations(dialations) {} template - ConvolutionParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& outputShape, + ConvolutionParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -58,18 +58,18 @@ struct ConvolutionParams { inType(iType), filterType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), dialations(dialations), convolutionOutlining(convolutionOutlining) {} - PartialShape inputShape; - PartialShape filterShape; - PartialShape outputShape; + Shape inputShape; + Shape filterShape; + Shape outputShape; ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; @@ -148,9 +148,9 @@ std::vector generateConvolutionI8Params() { std::vector convolutionParams{ // --------------------- 1D convolution ------------------------------------------ // clang-format off - ConvolutionParams(PartialShape {1, 1, 6}, - PartialShape {1, 1, 3}, - PartialShape {1, 1, 4}, + ConvolutionParams(Shape{1, 1, 6}, + Shape{1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2}, std::vector{2, 0, 1}, @@ -159,9 +159,9 @@ std::vector generateConvolutionI8Params() { {0}, {0}, {1}), - ConvolutionParams(PartialShape {1, 1, 4, 4}, - PartialShape {1, 1, 3, 3}, - PartialShape {1, 1, 2, 2}, + ConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 7, 5, 3, 1, @@ -176,9 +176,9 @@ std::vector generateConvolutionI8Params() { {0, 0}, {0, 0}, {1, 1}), - ConvolutionParams(PartialShape {1, 1, 4, 4, 4}, - PartialShape {1, 1, 3, 3, 3}, - PartialShape {1, 1, 2, 2, 2}, + ConvolutionParams(Shape{1, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 2, 2, 2}, IN_ET, std::vector{ // depth: 1 @@ -235,9 +235,9 @@ std::vector generateConvolutionFloatParams() { std::vector convolutionParams { // --------------------- 1D convolution ------------------------------------------ - ConvolutionParams(PartialShape {1, 1, 6}, - PartialShape {1, 1, 3}, - PartialShape {1, 1, 4}, + ConvolutionParams(Shape{1, 1, 6}, + Shape{1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2}, std::vector{2, 0, 1}, @@ -246,9 +246,9 @@ std::vector generateConvolutionFloatParams() { {0}, {0}, {1}), - ConvolutionParams(PartialShape {1, 1, 4}, - PartialShape {1, 1, 3}, - PartialShape {1, 1, 4}, + ConvolutionParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{1, 3, 3, 0}, std::vector{2, 0, 1}, @@ -257,9 +257,9 @@ std::vector generateConvolutionFloatParams() { {1}, {1}, {1}), - ConvolutionParams(PartialShape {1, 1, 5}, - PartialShape {1, 1, 3}, - PartialShape {1, 1, 2}, + ConvolutionParams(Shape{1, 1, 5}, + Shape{1, 1, 3}, + Shape{1, 1, 2}, IN_ET, std::vector{1, 3, 3, 0, 1}, std::vector{2, 0, 1}, @@ -268,9 +268,9 @@ std::vector generateConvolutionFloatParams() { {0}, {0}, {1}), - ConvolutionParams(PartialShape {1, 1, 7}, - PartialShape {1, 1, 3}, - PartialShape {1, 1, 3}, + ConvolutionParams(Shape{1, 1, 7}, + Shape{1, 1, 3}, + Shape{1, 1, 3}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, 3}, std::vector{2, 0, 1}, @@ -279,9 +279,9 @@ std::vector generateConvolutionFloatParams() { {0}, {0}, {2}), - ConvolutionParams(PartialShape {1, 1, 7}, - PartialShape {1, 1, 3}, - PartialShape {1, 1, 4}, + ConvolutionParams(Shape{1, 1, 7}, + Shape{1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, 3}, std::vector{2, 0, 1}, @@ -290,9 +290,9 @@ std::vector generateConvolutionFloatParams() { {2}, {2}, {2}), - ConvolutionParams(PartialShape {1, 2, 4}, - PartialShape {1, 2, 3}, - PartialShape {1, 1, 2}, + ConvolutionParams(Shape{1, 2, 4}, + Shape{1, 2, 3}, + Shape{1, 1, 2}, IN_ET, std::vector{ // channel 1 @@ -309,9 +309,9 @@ std::vector generateConvolutionFloatParams() { {0}, {0}, {1}), - ConvolutionParams(PartialShape {1, 1, 4}, - PartialShape {2, 1, 3}, - PartialShape {1, 2, 2}, + ConvolutionParams(Shape{1, 1, 4}, + Shape{2, 1, 3}, + Shape{1, 2, 2}, IN_ET, std::vector{1, 3, 2, 1}, std::vector{ @@ -328,9 +328,9 @@ std::vector generateConvolutionFloatParams() { {0}, {0}, {1}), - ConvolutionParams(PartialShape {2, 1, 4}, - PartialShape {1, 1, 3}, - PartialShape {2, 1, 2}, + ConvolutionParams(Shape{2, 1, 4}, + Shape{1, 1, 3}, + Shape{2, 1, 2}, IN_ET, std::vector{ // batch 1 @@ -348,9 +348,9 @@ std::vector generateConvolutionFloatParams() { {0}, {1}), // --------------------- 2D convolution ------------------------------------------ - ConvolutionParams(PartialShape {1, 1, 4, 4}, - PartialShape {1, 1, 3, 3}, - PartialShape {1, 1, 2, 2}, + ConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 7, 5, 3, 1, @@ -365,9 +365,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {0, 0}, {1, 1}), - ConvolutionParams(PartialShape {1, 1, 4, 4}, - PartialShape {1, 1, 3, 3}, - PartialShape {1, 1, 4, 4}, + ConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 7, 5, 3, 1, @@ -384,9 +384,9 @@ std::vector generateConvolutionFloatParams() { {1, 1}, {1, 1}, {1, 1}), - ConvolutionParams(PartialShape {1, 1, 5, 5}, - PartialShape {1, 1, 3, 3}, - PartialShape {1, 1, 2, 2}, + ConvolutionParams(Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 9, 7, 5, 3, 1, 0, @@ -402,9 +402,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {0, 0}, {1, 1}), - ConvolutionParams(PartialShape {1, 1, 7, 7}, - PartialShape {1, 1, 3, 3}, - PartialShape {1, 1, 3, 3}, + ConvolutionParams(Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 3, 5, 7, 9, 11, 13, 7, 5, 3, 1, -1, -3, -5, @@ -423,9 +423,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {0, 0}, {2, 2}), - ConvolutionParams(PartialShape {1, 1, 7, 7}, - PartialShape {1, 1, 3, 3}, - PartialShape {1, 1, 4, 4}, + ConvolutionParams(Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 9, 11, 13, 7, 5, 3, 1, -1, -3, -5, @@ -445,9 +445,9 @@ std::vector generateConvolutionFloatParams() { {2, 2}, {2, 2}, {2, 2}), - ConvolutionParams(PartialShape {1, 2, 4, 4}, - PartialShape {1, 2, 3, 3}, - PartialShape {1, 1, 2, 2}, + ConvolutionParams(Shape{1, 2, 4, 4}, + Shape{1, 2, 3, 3}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{ // channel 1 @@ -475,9 +475,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {0, 0}, {1, 1}), - ConvolutionParams(PartialShape {1, 1, 4, 4}, - PartialShape {2, 1, 3, 3}, - PartialShape {1, 2, 2, 2}, + ConvolutionParams(Shape{1, 1, 4, 4}, + Shape{2, 1, 3, 3}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 7, 5, 3, 1, @@ -503,9 +503,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {0, 0}, {1, 1}), - ConvolutionParams(PartialShape {2, 1, 4, 4}, - PartialShape {1, 1, 3, 3}, - PartialShape {2, 1, 2, 2}, + ConvolutionParams(Shape{2, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{2, 1, 2, 2}, IN_ET, std::vector{ // batch 1 @@ -533,9 +533,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {1, 1}), // --------------------- 3D convolution ------------------------------------------ - ConvolutionParams(PartialShape {1, 1, 4, 4, 4}, - PartialShape {1, 1, 3, 3, 3}, - PartialShape {1, 1, 2, 2, 2}, + ConvolutionParams(Shape{1, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 2, 2, 2}, IN_ET, std::vector{ // depth: 1 @@ -582,9 +582,9 @@ std::vector generateConvolutionFloatParams() { {0, 0, 0}, {0, 0, 0}, {1, 1, 1}), - ConvolutionParams(PartialShape {1, 1, 4, 4, 4}, - PartialShape {1, 1, 3, 3, 3}, - PartialShape {1, 1, 4, 4, 4}, + ConvolutionParams(Shape{1, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 4, 4, 4}, IN_ET, std::vector{ // depth: 1 @@ -645,9 +645,9 @@ std::vector generateConvolutionFloatParams() { {1, 1, 1}, {1, 1, 1}, {1, 1, 1}), - ConvolutionParams(PartialShape {1, 1, 5, 5, 5}, - PartialShape {1, 1, 3, 3, 3}, - PartialShape {1, 1, 2, 2, 2}, + ConvolutionParams(Shape{1, 1, 5, 5, 5}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 2, 2, 2}, IN_ET, std::vector{ // depth: 1 @@ -704,9 +704,9 @@ std::vector generateConvolutionFloatParams() { {0, 0, 0}, {0, 0, 0}, {1, 1, 1}), - ConvolutionParams(PartialShape {1, 1, 7, 7, 7}, - PartialShape {1, 1, 3, 3, 3}, - PartialShape {1, 1, 4, 4, 4}, + ConvolutionParams(Shape{1, 1, 7, 7, 7}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 4, 4, 4}, IN_ET, std::vector{ // depth: 1 @@ -803,9 +803,9 @@ std::vector generateConvolutionFloatParams() { {2, 2, 2}, {2, 2, 2}, {2, 2, 2}), - ConvolutionParams(PartialShape {1, 2, 4, 4, 4}, - PartialShape {1, 2, 3, 3, 3}, - PartialShape {1, 1, 2, 2, 2}, + ConvolutionParams(Shape{1, 2, 4, 4, 4}, + Shape{1, 2, 3, 3, 3}, + Shape{1, 1, 2, 2, 2}, IN_ET, std::vector{ // -- channel 1 -- @@ -888,9 +888,9 @@ std::vector generateConvolutionFloatParams() { {0, 0, 0}, {0, 0, 0}, {1, 1, 1}), - ConvolutionParams(PartialShape {1, 1, 4, 4, 4}, - PartialShape {2, 1, 3, 3, 3}, - PartialShape {1, 2, 2, 2, 2}, + ConvolutionParams(Shape{1, 1, 4, 4, 4}, + Shape{2, 1, 3, 3, 3}, + Shape{1, 2, 2, 2, 2}, IN_ET, std::vector{ // depth: 1 @@ -959,9 +959,9 @@ std::vector generateConvolutionFloatParams() { {0, 0, 0}, {0, 0, 0}, {1, 1, 1}), - ConvolutionParams(PartialShape {2, 1, 4, 4, 4}, - PartialShape {1, 1, 3, 3, 3}, - PartialShape {2, 1, 2, 2, 2}, + ConvolutionParams(Shape{2, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{2, 1, 2, 2, 2}, IN_ET, std::vector{ // -- batch 1 -- @@ -1039,9 +1039,9 @@ std::vector generateConvolutionFloatParams() { {0, 0, 0}, {1, 1, 1}), // ---------------------- other tests ------------------------------------------ - ConvolutionParams(PartialShape {1, 2, 2, 2}, - PartialShape {2, 2, 1, 1}, - PartialShape {1, 2, 2, 2}, + ConvolutionParams(Shape{1, 2, 2, 2}, + Shape{2, 2, 1, 1}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1, 1, 1, 1, 1, 1, 1, 1}, std::vector{1, 1, 1, 1}, @@ -1051,9 +1051,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {1, 1}, true), - ConvolutionParams(PartialShape {1, 2, 2, 2}, - PartialShape {2, 2, 1, 1}, - PartialShape {1, 2, 2, 2}, + ConvolutionParams(Shape{1, 2, 2, 2}, + Shape{2, 2, 1, 1}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}, std::vector{3, 3, 3, 3}, @@ -1062,9 +1062,9 @@ std::vector generateConvolutionFloatParams() { {0, 0}, {0, 0}, {1, 1}), - ConvolutionParams(PartialShape {1, 1, 2, 2}, - PartialShape {1, 1, 1, 1}, - PartialShape {1, 1, 5, 5}, + ConvolutionParams(Shape{1, 1, 2, 2}, + Shape{1, 1, 1, 1}, + Shape{1, 1, 5, 5}, IN_ET, std::vector{1, 2, 3, 4}, std::vector{2}, diff --git a/src/plugins/template/tests/functional/op_reference/convolution_backprop.cpp b/src/plugins/template/tests/functional/op_reference/convolution_backprop.cpp index ca36bca6686601..3aec05345e3019 100644 --- a/src/plugins/template/tests/functional/op_reference/convolution_backprop.cpp +++ b/src/plugins/template/tests/functional/op_reference/convolution_backprop.cpp @@ -13,9 +13,9 @@ using namespace ov; namespace { struct ConvolutionBackpropParams { template - ConvolutionBackpropParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& outputShape, + ConvolutionBackpropParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -30,18 +30,18 @@ struct ConvolutionBackpropParams { inType(iType), filterType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), dialations(dialations) {} template - ConvolutionBackpropParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& outputShape, + ConvolutionBackpropParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -57,18 +57,18 @@ struct ConvolutionBackpropParams { inType(iType), filterType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), dialations(dialations), outPadding(outPadding) {} - PartialShape inputShape; - PartialShape filterShape; - PartialShape outputShape; + Shape inputShape; + Shape filterShape; + Shape outputShape; ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; @@ -136,9 +136,9 @@ std::vector generateConvolutionBackpropFloatParams() std::vector convolutionBackpropParams{ // --------------------- 1D ConvolutionBackprop ------------------------------------------ - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 6}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 6}, IN_ET, std::vector{5, 6, 7, 2}, std::vector{2, 0, 1}, @@ -148,9 +148,9 @@ std::vector generateConvolutionBackpropFloatParams() {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 4}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{5, 6, 7, 2}, std::vector{2, 0, 1}, @@ -160,9 +160,9 @@ std::vector generateConvolutionBackpropFloatParams() {1}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 5}, + ConvolutionBackpropParams(Shape{1, 1, 2}, + Shape{1, 1, 3}, + Shape{1, 1, 5}, IN_ET, std::vector{5, 7}, std::vector{2, 0, 1}, @@ -172,9 +172,9 @@ std::vector generateConvolutionBackpropFloatParams() {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 5}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 5}, IN_ET, std::vector{5, 6, 7, 2}, std::vector{2, 0, 1}, @@ -184,9 +184,9 @@ std::vector generateConvolutionBackpropFloatParams() {1}, {1}, {1}), - ConvolutionBackpropParams(PartialShape{1, 1, 3}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 7}, + ConvolutionBackpropParams(Shape{1, 1, 3}, + Shape{1, 1, 3}, + Shape{1, 1, 7}, IN_ET, std::vector{8, 5, 1}, std::vector{2, 0, 1}, @@ -196,9 +196,9 @@ std::vector generateConvolutionBackpropFloatParams() {0}, {2}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 7}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 7}, IN_ET, std::vector{3, 9, 1, 2}, std::vector{2, 0, 1}, @@ -208,9 +208,9 @@ std::vector generateConvolutionBackpropFloatParams() {2}, {2}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2}, - PartialShape{1, 2, 3}, - PartialShape{1, 2, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2}, + Shape{1, 2, 3}, + Shape{1, 2, 4}, IN_ET, std::vector{10, 3}, std::vector{// channel 1 @@ -236,9 +236,9 @@ std::vector generateConvolutionBackpropFloatParams() {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 2, 2}, - PartialShape{2, 1, 3}, - PartialShape{1, 1, 4}, + ConvolutionBackpropParams(Shape{1, 2, 2}, + Shape{2, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{// channel 1 4, @@ -260,9 +260,9 @@ std::vector generateConvolutionBackpropFloatParams() {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{2, 1, 2}, - PartialShape{1, 1, 3}, - PartialShape{2, 1, 4}, + ConvolutionBackpropParams(Shape{2, 1, 2}, + Shape{1, 1, 3}, + Shape{2, 1, 4}, IN_ET, std::vector{// batch 1 1, @@ -287,9 +287,9 @@ std::vector generateConvolutionBackpropFloatParams() {1}, {0}), // --------------------- 2D ConvolutionBackprop ------------------------------------------ - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 7, 5}, std::vector{1, 2, 3, 0, 1, 0, 3, 2, 1}, @@ -299,9 +299,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0}, {1, 1}, {0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 3, 3}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 3, 7, 5}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -311,9 +311,9 @@ std::vector generateConvolutionBackpropFloatParams() {1, 1}, {1, 1}, {1, 1}), - ConvolutionBackpropParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 7, 5, 3, 1, 2, 4, 6, 8, 8, 6, 4, 2}, std::vector{1, 2, 3, 0, 1, 0, 2, 1, 2}, @@ -324,9 +324,9 @@ std::vector generateConvolutionBackpropFloatParams() {1, 1}, {0, 0}), ConvolutionBackpropParams( - PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 5, 5}, + Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 5, 5}, IN_ET, std::vector{2, 5, 4, 3}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -336,9 +336,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0}, {1, 1}, {0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 6, 6}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 6, 6}, IN_ET, std::vector{2, 3, 4, 3}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -350,9 +350,9 @@ std::vector generateConvolutionBackpropFloatParams() {2, 2}, {0, 0}), ConvolutionBackpropParams( - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 5, 5}, IN_ET, std::vector{1, 3, 5, 7, 5, 3, 2, 4, 6}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -362,9 +362,9 @@ std::vector generateConvolutionBackpropFloatParams() {2, 2}, {2, 2}, {0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2}, - PartialShape{1, 2, 3, 3}, - PartialShape{1, 2, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2}, + Shape{1, 2, 3, 3}, + Shape{1, 2, 4, 4}, IN_ET, std::vector{1, 3, 7, 5}, std::vector{// channel 1 @@ -426,9 +426,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0}, {1, 1}, {0, 0}), - ConvolutionBackpropParams(PartialShape{1, 2, 2, 2}, - PartialShape{2, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + ConvolutionBackpropParams(Shape{1, 2, 2, 2}, + Shape{2, 1, 3, 3}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{// channel 1 1, @@ -466,9 +466,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0}, {1, 1}, {0, 0}), - ConvolutionBackpropParams(PartialShape{1, 2, 1, 1}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 2, 2, 2}, + ConvolutionBackpropParams(Shape{1, 2, 1, 1}, + Shape{2, 2, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{// channel 1 2, @@ -502,9 +502,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0}, {1, 1}, {0, 0}), - ConvolutionBackpropParams(PartialShape{2, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{2, 1, 4, 4}, + ConvolutionBackpropParams(Shape{2, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{2, 1, 4, 4}, IN_ET, std::vector{// batch 1 1, @@ -557,9 +557,9 @@ std::vector generateConvolutionBackpropFloatParams() {1, 1}, {0, 0}), // --------------------- 3D convolution ------------------------------------------ - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2, 2}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{1, 1, 4, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2, 2}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 4, 4, 4}, IN_ET, std::vector{// depth: 1 15, @@ -674,9 +674,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0, 0}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2, 2}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{1, 1, 3, 3, 3}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2, 2}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 3, 3, 3}, IN_ET, std::vector{// depth: 1 15, @@ -753,9 +753,9 @@ std::vector generateConvolutionBackpropFloatParams() {1, 1, 1}, {1, 1, 1}, {1, 1, 1}), - ConvolutionBackpropParams(PartialShape{1, 1, 4, 4, 4}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{1, 1, 4, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 4, 4, 4}, IN_ET, std::vector{// depth: 1 1, @@ -928,9 +928,9 @@ std::vector generateConvolutionBackpropFloatParams() {1, 1, 1}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2, 2}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{1, 1, 5, 5, 5}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2, 2}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 5, 5, 5}, IN_ET, std::vector{// depth: 1 15, @@ -1107,9 +1107,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0, 0}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4, 4, 4}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{1, 1, 7, 7, 7}, + ConvolutionBackpropParams(Shape{1, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 7, 7, 7}, IN_ET, std::vector{// depth: 1 1, @@ -1564,9 +1564,9 @@ std::vector generateConvolutionBackpropFloatParams() {2, 2, 2}, {2, 2, 2}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2, 2}, - PartialShape{1, 2, 3, 3, 3}, - PartialShape{1, 2, 4, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2, 2}, + Shape{1, 2, 3, 3, 3}, + Shape{1, 2, 4, 4, 4}, IN_ET, std::vector{// depth: 1 1, @@ -1783,9 +1783,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0, 0}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 2, 2, 2, 2}, - PartialShape{2, 1, 3, 3, 3}, - PartialShape{1, 1, 4, 4, 4}, + ConvolutionBackpropParams(Shape{1, 2, 2, 2, 2}, + Shape{2, 1, 3, 3, 3}, + Shape{1, 1, 4, 4, 4}, IN_ET, std::vector{// -- in 1 -- // depth: 1 @@ -1944,9 +1944,9 @@ std::vector generateConvolutionBackpropFloatParams() {0, 0, 0}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{2, 1, 2, 2, 2}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{2, 1, 4, 4, 4}, + ConvolutionBackpropParams(Shape{2, 1, 2, 2, 2}, + Shape{1, 1, 3, 3, 3}, + Shape{2, 1, 4, 4, 4}, IN_ET, std::vector{// -- batch 1 -- // depth: 1 @@ -2152,9 +2152,9 @@ std::vector generateConvolutionBackpropUintParams() { std::vector convolutionBackpropParams{ // --------------------- 1D ConvolutionBackprop ------------------------------------------ - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 6}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 6}, IN_ET, std::vector{5, 6, 7, 2}, std::vector{2, 0, 1}, @@ -2164,9 +2164,9 @@ std::vector generateConvolutionBackpropUintParams() { {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 4}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{5, 6, 7, 2}, std::vector{2, 0, 1}, @@ -2176,9 +2176,9 @@ std::vector generateConvolutionBackpropUintParams() { {1}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 5}, + ConvolutionBackpropParams(Shape{1, 1, 2}, + Shape{1, 1, 3}, + Shape{1, 1, 5}, IN_ET, std::vector{5, 7}, std::vector{2, 0, 1}, @@ -2188,9 +2188,9 @@ std::vector generateConvolutionBackpropUintParams() { {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 5}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 5}, IN_ET, std::vector{5, 6, 7, 2}, std::vector{2, 0, 1}, @@ -2200,9 +2200,9 @@ std::vector generateConvolutionBackpropUintParams() { {1}, {1}, {1}), - ConvolutionBackpropParams(PartialShape{1, 1, 3}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 7}, + ConvolutionBackpropParams(Shape{1, 1, 3}, + Shape{1, 1, 3}, + Shape{1, 1, 7}, IN_ET, std::vector{8, 5, 1}, std::vector{2, 0, 1}, @@ -2212,9 +2212,9 @@ std::vector generateConvolutionBackpropUintParams() { {0}, {2}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 3}, - PartialShape{1, 1, 7}, + ConvolutionBackpropParams(Shape{1, 1, 4}, + Shape{1, 1, 3}, + Shape{1, 1, 7}, IN_ET, std::vector{3, 9, 1, 2}, std::vector{2, 0, 1}, @@ -2224,9 +2224,9 @@ std::vector generateConvolutionBackpropUintParams() { {2}, {2}, {0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2}, - PartialShape{1, 2, 3}, - PartialShape{1, 2, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2}, + Shape{1, 2, 3}, + Shape{1, 2, 4}, IN_ET, std::vector{10, 3}, std::vector{// channel 1 @@ -2252,9 +2252,9 @@ std::vector generateConvolutionBackpropUintParams() { {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{1, 2, 2}, - PartialShape{2, 1, 3}, - PartialShape{1, 1, 4}, + ConvolutionBackpropParams(Shape{1, 2, 2}, + Shape{2, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{// channel 1 4, @@ -2276,9 +2276,9 @@ std::vector generateConvolutionBackpropUintParams() { {0}, {1}, {0}), - ConvolutionBackpropParams(PartialShape{2, 1, 2}, - PartialShape{1, 1, 3}, - PartialShape{2, 1, 4}, + ConvolutionBackpropParams(Shape{2, 1, 2}, + Shape{1, 1, 3}, + Shape{2, 1, 4}, IN_ET, std::vector{// batch 1 1, @@ -2303,9 +2303,9 @@ std::vector generateConvolutionBackpropUintParams() { {1}, {0}), // --------------------- 2D ConvolutionBackprop ------------------------------------------ - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 7, 5}, std::vector{1, 2, 3, 0, 1, 0, 3, 2, 1}, @@ -2315,9 +2315,9 @@ std::vector generateConvolutionBackpropUintParams() { {0, 0}, {1, 1}, {0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 3, 3}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 3, 7, 5}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -2327,9 +2327,9 @@ std::vector generateConvolutionBackpropUintParams() { {1, 1}, {1, 1}, {1, 1}), - ConvolutionBackpropParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 7, 5, 3, 1, 2, 4, 6, 8, 8, 6, 4, 2}, std::vector{1, 2, 3, 0, 1, 0, 2, 1, 2}, @@ -2340,9 +2340,9 @@ std::vector generateConvolutionBackpropUintParams() { {1, 1}, {0, 0}), ConvolutionBackpropParams( - PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 5, 5}, + Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 5, 5}, IN_ET, std::vector{2, 5, 4, 3}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -2352,9 +2352,9 @@ std::vector generateConvolutionBackpropUintParams() { {0, 0}, {1, 1}, {0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 6, 6}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 6, 6}, IN_ET, std::vector{2, 3, 4, 3}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -2366,9 +2366,9 @@ std::vector generateConvolutionBackpropUintParams() { {2, 2}, {0, 0}), ConvolutionBackpropParams( - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 5, 5}, IN_ET, std::vector{1, 3, 5, 7, 5, 3, 2, 4, 6}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -2379,9 +2379,9 @@ std::vector generateConvolutionBackpropUintParams() { {2, 2}, {0, 0}), // --------------------- 3D convolution ------------------------------------------ - ConvolutionBackpropParams(PartialShape{1, 1, 4, 4, 4}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{1, 1, 4, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 4, 4, 4}, IN_ET, std::vector{// depth: 1 1, @@ -2554,9 +2554,9 @@ std::vector generateConvolutionBackpropUintParams() { {1, 1, 1}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 4, 4, 4}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{1, 1, 7, 7, 7}, + ConvolutionBackpropParams(Shape{1, 1, 4, 4, 4}, + Shape{1, 1, 3, 3, 3}, + Shape{1, 1, 7, 7, 7}, IN_ET, std::vector{// depth: 1 1, @@ -3011,9 +3011,9 @@ std::vector generateConvolutionBackpropUintParams() { {2, 2, 2}, {2, 2, 2}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 1, 2, 2, 2}, - PartialShape{1, 2, 3, 3, 3}, - PartialShape{1, 2, 4, 4, 4}, + ConvolutionBackpropParams(Shape{1, 1, 2, 2, 2}, + Shape{1, 2, 3, 3, 3}, + Shape{1, 2, 4, 4, 4}, IN_ET, std::vector{// depth: 1 1, @@ -3230,9 +3230,9 @@ std::vector generateConvolutionBackpropUintParams() { {0, 0, 0}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{1, 2, 2, 2, 2}, - PartialShape{2, 1, 3, 3, 3}, - PartialShape{1, 1, 4, 4, 4}, + ConvolutionBackpropParams(Shape{1, 2, 2, 2, 2}, + Shape{2, 1, 3, 3, 3}, + Shape{1, 1, 4, 4, 4}, IN_ET, std::vector{// -- in 1 -- // depth: 1 @@ -3391,9 +3391,9 @@ std::vector generateConvolutionBackpropUintParams() { {0, 0, 0}, {1, 1, 1}, {0, 0, 0}), - ConvolutionBackpropParams(PartialShape{2, 1, 2, 2, 2}, - PartialShape{1, 1, 3, 3, 3}, - PartialShape{2, 1, 4, 4, 4}, + ConvolutionBackpropParams(Shape{2, 1, 2, 2, 2}, + Shape{1, 1, 3, 3, 3}, + Shape{2, 1, 4, 4, 4}, IN_ET, std::vector{// -- batch 1 -- // depth: 1 diff --git a/src/plugins/template/tests/functional/op_reference/cum_sum.cpp b/src/plugins/template/tests/functional/op_reference/cum_sum.cpp index 187b37901ca3df..dbb6b9e1dad0ef 100644 --- a/src/plugins/template/tests/functional/op_reference/cum_sum.cpp +++ b/src/plugins/template/tests/functional/op_reference/cum_sum.cpp @@ -70,6 +70,7 @@ struct CumSumParams { class ReferenceCumSumLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); if (params.testDefaults) { function = CreateFunction(params.inShape, params.inType); diff --git a/src/plugins/template/tests/functional/op_reference/deformable_convolution.cpp b/src/plugins/template/tests/functional/op_reference/deformable_convolution.cpp index 616656c815a6ee..3a3a72e421950c 100644 --- a/src/plugins/template/tests/functional/op_reference/deformable_convolution.cpp +++ b/src/plugins/template/tests/functional/op_reference/deformable_convolution.cpp @@ -14,10 +14,10 @@ using namespace ov; namespace { struct DeformableConvolutionParams { template - DeformableConvolutionParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& offsetShape, - const PartialShape& outputShape, + DeformableConvolutionParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& offsetShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -39,10 +39,10 @@ struct DeformableConvolutionParams { filterType(iType), offsetType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - offsetData(CreateTensor(iType, offsetValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + offsetData(CreateTensor(offsetShape, iType, offsetValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), @@ -53,11 +53,11 @@ struct DeformableConvolutionParams { use_bilinear_interpolation_padding(use_bilinear_interpolation_padding) {} template - DeformableConvolutionParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& offsetShape, - const PartialShape& outputShape, - const PartialShape& maskShape, + DeformableConvolutionParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& offsetShape, + const Shape& outputShape, + const Shape& maskShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -82,11 +82,11 @@ struct DeformableConvolutionParams { offsetType(iType), outType(iType), maskType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - offsetData(CreateTensor(iType, offsetValues)), - refData(CreateTensor(iType, oValues)), - maskData(CreateTensor(iType, maskValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + offsetData(CreateTensor(offsetShape, iType, offsetValues)), + refData(CreateTensor(outputShape, iType, oValues)), + maskData(CreateTensor(maskShape, iType, maskValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), @@ -96,11 +96,11 @@ struct DeformableConvolutionParams { testcaseName(test_name), use_bilinear_interpolation_padding(use_bilinear_interpolation_padding) {} - PartialShape inputShape; - PartialShape filterShape; - PartialShape offsetShape; - PartialShape outputShape; - PartialShape maskShape{}; + Shape inputShape; + Shape filterShape; + Shape offsetShape; + Shape outputShape; + Shape maskShape{}; ov::element::Type inType; ov::element::Type filterType; ov::element::Type offsetType; @@ -269,10 +269,10 @@ std::vector generateDeformableConvolutionFloatParam std::vector deformableConvolutionParams{ // --------------------- 2D DeformableConvolution ------------------------------------------ DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1.0f, 2.0f, @@ -300,10 +300,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 5.0f, 3.0f, 1.0f, 3.0f, 5.0f}, std::vector{1.0f, 2.0f, 0.0f, 1.0f}, @@ -333,10 +333,10 @@ std::vector generateDeformableConvolutionFloatParam {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 7.0f, 5.0f, 3.0f, 1.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f}, @@ -350,10 +350,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 7.0f, 5.0f, 3.0f, 1.0f, -1.0f, -3.0f, -5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, @@ -372,10 +372,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {2, 2}), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 7.0f, 5.0f, 3.0f, 1.0f, -1.0f, -3.0f, -5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, @@ -413,10 +413,10 @@ std::vector generateDeformableConvolutionFloatParam {2, 2}, {2, 2}), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -481,10 +481,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{2, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 2, 2, 2}, + Shape{1, 1, 4, 4}, + Shape{2, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector< T>{1.0f, 3.0f, 5.0f, 7.0f, 7.0f, 5.0f, 3.0f, 1.0f, 2.0f, 4.0f, 6.0f, 8.0f, 8.0f, 6.0f, 4.0f, 2.0f}, @@ -526,10 +526,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{2, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{2, 18, 2, 2}, - PartialShape{2, 1, 2, 2}, + Shape{2, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{2, 18, 2, 2}, + Shape{2, 1, 2, 2}, IN_ET, std::vector{// batch 1 1.0f, @@ -585,10 +585,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {0, 0}, {1, 1}), - DeformableConvolutionParams(PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 2, 2, 2}, + DeformableConvolutionParams(Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -667,10 +667,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {1, 1}, 2), - DeformableConvolutionParams(PartialShape{1, 8, 3, 3}, - PartialShape{4, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 4, 2, 2}, + DeformableConvolutionParams(Shape{1, 8, 3, 3}, + Shape{4, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 4, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -820,10 +820,10 @@ std::vector generateDeformableConvolutionFloatParam {1, 1}, 4), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{// channel 1 1.0f, @@ -878,10 +878,10 @@ std::vector generateDeformableConvolutionFloatParam {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, + Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f, @@ -912,10 +912,10 @@ std::vector generateDeformableConvolutionFloatParam {1, 1}, 2, 2), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1.0f, 2.0f, @@ -1023,10 +1023,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "integral_offsets_1"), DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector< T>{1.0f, 3.0f, 7.0f, 7.0f, 7.0f, 6.0f, 3.0f, 1.0f, 4.0f, 4.0f, 2.0f, 8.0f, 1.0f, 1.0f, 1.0f, 2.0f}, @@ -1088,10 +1088,10 @@ std::vector generateDeformableConvolutionFloatParam {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 7.0f, 5.0f, 3.0f, 1.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f}, @@ -1110,10 +1110,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "integral_offsets_stride"), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 7.0f, 5.0f, 3.0f, 1.0f, -1.0f, -3.0f, -5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, @@ -1140,10 +1140,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "integral_offset_dialation"), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 7.0f, 5.0f, 3.0f, 1.0f, -1.0f, -3.0f, -5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, @@ -1210,10 +1210,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "integral_offset_padding_stride_dialation"), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -1282,10 +1282,10 @@ std::vector generateDeformableConvolutionFloatParam 1, 1, "integral_offset_input_channels"), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{2, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{2, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{1.0f, 2.0f, @@ -1420,10 +1420,10 @@ std::vector generateDeformableConvolutionFloatParam 1, 1, "integral_offset_output_channels"), - DeformableConvolutionParams(PartialShape{2, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{2, 8, 3, 3}, - PartialShape{2, 1, 3, 3}, + DeformableConvolutionParams(Shape{2, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{2, 8, 3, 3}, + Shape{2, 1, 3, 3}, IN_ET, std::vector{// batch 1 1.0f, @@ -1647,10 +1647,10 @@ std::vector generateDeformableConvolutionFloatParam 1, 1, "integral_offset_batch"), - DeformableConvolutionParams(PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 2, 2, 2}, + DeformableConvolutionParams(Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -1769,10 +1769,10 @@ std::vector generateDeformableConvolutionFloatParam 2, 1, "integral_offset_groups_basic"), - DeformableConvolutionParams(PartialShape{1, 8, 3, 3}, - PartialShape{4, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 4, 2, 2}, + DeformableConvolutionParams(Shape{1, 8, 3, 3}, + Shape{4, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 4, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -1924,10 +1924,10 @@ std::vector generateDeformableConvolutionFloatParam 4, 1, "integral_offset_groups_complex"), - DeformableConvolutionParams(PartialShape{1, 2, 4, 4}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 2, 4, 4}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1.0f, @@ -2170,10 +2170,10 @@ std::vector generateDeformableConvolutionFloatParam 1, 2, "integral_offset_deforgroup_basic"), - DeformableConvolutionParams(PartialShape{1, 4, 4, 4}, - PartialShape{2, 4, 2, 2}, - PartialShape{1, 32, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 4, 4, 4}, + Shape{2, 4, 2, 2}, + Shape{1, 32, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1.0f, @@ -2631,10 +2631,10 @@ std::vector generateDeformableConvolutionFloatParam 1, 4, "integral_offset_deforgroup_complex1"), - DeformableConvolutionParams(PartialShape{1, 4, 4, 4}, - PartialShape{2, 4, 2, 2}, - PartialShape{1, 16, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 4, 4, 4}, + Shape{2, 4, 2, 2}, + Shape{1, 16, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1.0f, @@ -2932,10 +2932,10 @@ std::vector generateDeformableConvolutionFloatParam 2, "integral_offset_deforgroup_complex2"), DeformableConvolutionParams( - PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, + Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f, @@ -3031,10 +3031,10 @@ std::vector generateDeformableConvolutionFloatParam 2, "integral_offset_groups_and_deforgroups"), DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1.0f, 2.0f, @@ -3075,10 +3075,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "real_offset_default"), DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector< T>{1.0f, 3.0f, 7.0f, 7.0f, 7.0f, 6.0f, 3.0f, 1.0f, 4.0f, 4.0f, 2.0f, 8.0f, 1.0f, 1.0f, 1.0f, 2.0f}, @@ -3125,10 +3125,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "real_offset_padding"), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 7.0f, 5.0f, 3.0f, 1.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f}, @@ -3147,10 +3147,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "real_offset_stride"), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 7.0f, 5.0f, 3.0f, 1.0f, -1.0f, -3.0f, -5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 8.0f, 6.0f, 4.0f, 2.0f, 0.0f, @@ -3199,10 +3199,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "real_offset_padding_stride_dialation"), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -3272,10 +3272,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "real_offset_input_channels"), DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{2, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 2, 3, 3}, + Shape{1, 1, 4, 4}, + Shape{2, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{1.0f, 2.0f, @@ -3336,10 +3336,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "real_offset_output_channels"), DeformableConvolutionParams( - PartialShape{2, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{2, 8, 3, 3}, - PartialShape{2, 2, 3, 3}, + Shape{2, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{2, 8, 3, 3}, + Shape{2, 1, 3, 3}, IN_ET, std::vector{// batch 1 1.0f, @@ -3413,10 +3413,10 @@ std::vector generateDeformableConvolutionFloatParam 1, 1, "real_offset_batch"), - DeformableConvolutionParams(PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 2, 2, 2}, + DeformableConvolutionParams(Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -3498,10 +3498,10 @@ std::vector generateDeformableConvolutionFloatParam 2, 1, "real_offset_group_basic"), - DeformableConvolutionParams(PartialShape{1, 8, 3, 3}, - PartialShape{4, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 4, 2, 2}, + DeformableConvolutionParams(Shape{1, 8, 3, 3}, + Shape{4, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 4, 2, 2}, IN_ET, std::vector{// channel 1 1.0f, @@ -3654,10 +3654,10 @@ std::vector generateDeformableConvolutionFloatParam 1, "real_offset_groups_complex"), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 3, 3}, - PartialShape{1, 2, 3, 3}, + Shape{1, 2, 4, 4}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1.0f, @@ -3751,10 +3751,10 @@ std::vector generateDeformableConvolutionFloatParam 2, "real_offset_deforgroup_basic"), DeformableConvolutionParams( - PartialShape{1, 4, 4, 4}, - PartialShape{2, 4, 2, 2}, - PartialShape{1, 32, 3, 3}, - PartialShape{1, 2, 3, 3}, + Shape{1, 4, 4, 4}, + Shape{2, 4, 2, 2}, + Shape{1, 32, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1.0f, @@ -3910,10 +3910,10 @@ std::vector generateDeformableConvolutionFloatParam 4, "real_offset_deforgroup_complex1"), DeformableConvolutionParams( - PartialShape{1, 4, 4, 4}, - PartialShape{2, 4, 2, 2}, - PartialShape{1, 16, 3, 3}, - PartialShape{1, 2, 3, 3}, + Shape{1, 4, 4, 4}, + Shape{2, 4, 2, 2}, + Shape{1, 16, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1.0f, @@ -4061,10 +4061,10 @@ std::vector generateDeformableConvolutionFloatParam 2, "real_offset_deforgroup_complex2"), DeformableConvolutionParams( - PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, + Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f, @@ -4116,10 +4116,10 @@ std::vector generateDeformableConvolutionIntParams( std::vector deformableConvolutionParams{ // --------------------- 2D DeformableConvolution ------------------------------------------ DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, std::vector{1, 2, -1, -2}, @@ -4132,10 +4132,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 5, 3, 1, 3, 5}, std::vector{1, 2, 0, 1}, @@ -4150,10 +4150,10 @@ std::vector generateDeformableConvolutionIntParams( {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -4166,10 +4166,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 3, 5, 7, 9, 11, 13, 7, 5, 3, 1, -1, -3, -5, 2, 4, 6, 8, 10, 12, 14, 8, 6, 4, 2, 0, -2, -4, 2, 4, 6, 8, 10, 12, 14, 7, 5, 3, 1, -1, -3, -5, 8, 6, 4, 2, 0, -2, -4}, @@ -4186,10 +4186,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {2, 2}), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 9, 11, 13, 7, 5, 3, 1, -1, -3, -5, 2, 4, 6, 8, 10, 12, 14, 8, 6, 4, 2, 0, -2, -4, 2, 4, 6, 8, 10, 12, 14, 7, 5, 3, 1, -1, -3, -5, 8, 6, 4, 2, 0, -2, -4}, @@ -4210,10 +4210,10 @@ std::vector generateDeformableConvolutionIntParams( {2, 2}, {2, 2}), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{// channel 1 1, @@ -4278,10 +4278,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{2, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 2, 2, 2}, + Shape{1, 1, 4, 4}, + Shape{2, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 7, 5, 3, 1, 2, 4, 6, 8, 8, 6, 4, 2}, std::vector{// channel 1 @@ -4322,10 +4322,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{2, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{2, 18, 2, 2}, - PartialShape{2, 1, 2, 2}, + Shape{2, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{2, 18, 2, 2}, + Shape{2, 1, 2, 2}, IN_ET, std::vector{// batch 1 1, @@ -4381,10 +4381,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {0, 0}, {1, 1}), - DeformableConvolutionParams(PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 2, 2, 2}, + DeformableConvolutionParams(Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{// channel 1 1, @@ -4463,10 +4463,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {1, 1}, 2), - DeformableConvolutionParams(PartialShape{1, 8, 3, 3}, - PartialShape{4, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 4, 2, 2}, + DeformableConvolutionParams(Shape{1, 8, 3, 3}, + Shape{4, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 4, 2, 2}, IN_ET, std::vector{// channel 1 1, @@ -4616,10 +4616,10 @@ std::vector generateDeformableConvolutionIntParams( {1, 1}, 4), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{// channel 1 1, @@ -4674,10 +4674,10 @@ std::vector generateDeformableConvolutionIntParams( {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, + Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}, @@ -4692,10 +4692,10 @@ std::vector generateDeformableConvolutionIntParams( {1, 1}, 2, 2), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, std::vector{1, 2, -1, -2}, @@ -4787,10 +4787,10 @@ std::vector generateDeformableConvolutionIntParams( 1, 1, "integral_offsets_1"), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 7, 7, 7, 6, 3, 1, 4, 4, 2, 8, 1, 1, 1, 2}, std::vector{1, 2, 3, 0, 1, 0, 3, 2, 1}, @@ -4835,10 +4835,10 @@ std::vector generateDeformableConvolutionIntParams( {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -4854,10 +4854,10 @@ std::vector generateDeformableConvolutionIntParams( 1, "integral_offsets_stride"), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 3, 5, 7, 9, 11, 13, 7, 5, 3, 1, -1, -3, -5, 2, 4, 6, 8, 10, 12, 14, 8, 6, 4, 2, 0, -2, -4, 2, 4, 6, 8, 10, 12, 14, 7, 5, 3, 1, -1, -3, -5, 8, 6, 4, 2, 0, -2, -4}, @@ -4877,10 +4877,10 @@ std::vector generateDeformableConvolutionIntParams( 1, "integral_offset_dialation"), DeformableConvolutionParams( - PartialShape{1, 1, 7, 7}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 7, 7}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 9, 11, 13, 7, 5, 3, 1, -1, -3, -5, 2, 4, 6, 8, 10, 12, 14, 8, 6, 4, 2, 0, -2, -4, 2, 4, 6, 8, 10, 12, 14, 7, 5, 3, 1, -1, -3, -5, 8, 6, 4, 2, 0, -2, -4}, @@ -4929,10 +4929,10 @@ std::vector generateDeformableConvolutionIntParams( 1, "integral_offset_padding_stride_dialation"), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{// channel 1 1, @@ -4999,10 +4999,10 @@ std::vector generateDeformableConvolutionIntParams( 1, 1, "integral_offset_input_channels"), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{2, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{2, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, std::vector{// filter 1 @@ -5122,10 +5122,10 @@ std::vector generateDeformableConvolutionIntParams( 1, 1, "integral_offset_output_channels"), - DeformableConvolutionParams(PartialShape{2, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{2, 8, 3, 3}, - PartialShape{2, 1, 3, 3}, + DeformableConvolutionParams(Shape{2, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{2, 8, 3, 3}, + Shape{2, 1, 3, 3}, IN_ET, std::vector{// batch 1 1, @@ -5349,10 +5349,10 @@ std::vector generateDeformableConvolutionIntParams( 1, 1, "integral_offset_batch"), - DeformableConvolutionParams(PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 2, 2, 2}, + DeformableConvolutionParams(Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{// channel 1 1, @@ -5471,10 +5471,10 @@ std::vector generateDeformableConvolutionIntParams( 2, 1, "integral_offset_groups_basic"), - DeformableConvolutionParams(PartialShape{1, 8, 3, 3}, - PartialShape{4, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, - PartialShape{1, 4, 2, 2}, + DeformableConvolutionParams(Shape{1, 8, 3, 3}, + Shape{4, 2, 2, 2}, + Shape{1, 8, 2, 2}, + Shape{1, 4, 2, 2}, IN_ET, std::vector{// channel 1 1, @@ -5625,10 +5625,10 @@ std::vector generateDeformableConvolutionIntParams( 4, 1, "integral_offset_groups_complex"), - DeformableConvolutionParams(PartialShape{1, 2, 4, 4}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 2, 4, 4}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1, @@ -5871,10 +5871,10 @@ std::vector generateDeformableConvolutionIntParams( 1, 2, "integral_offset_deforgroup_basic"), - DeformableConvolutionParams(PartialShape{1, 4, 4, 4}, - PartialShape{2, 4, 2, 2}, - PartialShape{1, 32, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 4, 4, 4}, + Shape{2, 4, 2, 2}, + Shape{1, 32, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1, @@ -6332,10 +6332,10 @@ std::vector generateDeformableConvolutionIntParams( 1, 4, "integral_offset_deforgroup_complex1"), - DeformableConvolutionParams(PartialShape{1, 4, 4, 4}, - PartialShape{2, 4, 2, 2}, - PartialShape{1, 16, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 4, 4, 4}, + Shape{2, 4, 2, 2}, + Shape{1, 16, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{// channel 1 1, @@ -6633,10 +6633,10 @@ std::vector generateDeformableConvolutionIntParams( 2, "integral_offset_deforgroup_complex2"), DeformableConvolutionParams( - PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, + Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}, @@ -6726,10 +6726,10 @@ std::vector generateDeformableConvolutionInt8Params std::vector deformableConvolutionParams{ // --------------------- 2D DeformableConvolution ------------------------------------------ DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, std::vector{1, 2, -1, -2}, @@ -6742,10 +6742,10 @@ std::vector generateDeformableConvolutionInt8Params {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 5, 3, 1, 3, 5}, std::vector{1, 2, 0, 1}, @@ -6760,10 +6760,10 @@ std::vector generateDeformableConvolutionInt8Params {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -6776,10 +6776,10 @@ std::vector generateDeformableConvolutionInt8Params {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{2, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{2, 18, 2, 2}, - PartialShape{2, 1, 2, 2}, + Shape{2, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{2, 18, 2, 2}, + Shape{2, 1, 2, 2}, IN_ET, std::vector{// batch 1 1, @@ -6836,10 +6836,10 @@ std::vector generateDeformableConvolutionInt8Params {0, 0}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 2, 4, 4}, - PartialShape{1, 2, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + Shape{1, 2, 4, 4}, + Shape{1, 2, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{// channel 1 1, @@ -6893,10 +6893,10 @@ std::vector generateDeformableConvolutionInt8Params {0, 0}, {0, 0}, {1, 1}), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, std::vector{1, 2, -1, -2}, @@ -6988,10 +6988,10 @@ std::vector generateDeformableConvolutionInt8Params 1, 1, "integral_offsets_1"), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 7, 7, 7, 6, 3, 1, 4, 4, 2, 8, 1, 1, 1, 2}, std::vector{1, 2, 3, 0, 1, 0, 3, 2, 1}, @@ -7036,10 +7036,10 @@ std::vector generateDeformableConvolutionInt8Params {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -7054,10 +7054,10 @@ std::vector generateDeformableConvolutionInt8Params 1, 1, "integral_offsets_stride"), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{2, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 2, 3, 3}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{2, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 2, 3, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, std::vector{// filter 1 @@ -7177,10 +7177,10 @@ std::vector generateDeformableConvolutionInt8Params 1, 1, "integral_offset_output_channels"), - DeformableConvolutionParams(PartialShape{2, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{2, 8, 3, 3}, - PartialShape{2, 1, 3, 3}, + DeformableConvolutionParams(Shape{2, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{2, 8, 3, 3}, + Shape{2, 1, 3, 3}, IN_ET, std::vector{// batch 1 1, @@ -7415,10 +7415,10 @@ std::vector generateDeformableConvolutionUintParams std::vector deformableConvolutionParams{ // --------------------- 2D DeformableConvolution ------------------------------------------ DeformableConvolutionParams( - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 4, 4}, - PartialShape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 5, 7, 5, 3, 1, 3, 5}, std::vector{1, 2, 0, 1}, @@ -7433,10 +7433,10 @@ std::vector generateDeformableConvolutionUintParams {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -7448,10 +7448,10 @@ std::vector generateDeformableConvolutionUintParams {0, 0}, {0, 0}, {1, 1}), - DeformableConvolutionParams(PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 4, 4}, - PartialShape{1, 1, 4, 4}, + DeformableConvolutionParams(Shape{1, 1, 4, 4}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 4, 4}, + Shape{1, 1, 4, 4}, IN_ET, std::vector{1, 3, 7, 7, 7, 6, 3, 1, 4, 4, 2, 8, 1, 1, 1, 2}, std::vector{1, 2, 3, 0, 1, 0, 3, 2, 1}, @@ -7496,10 +7496,10 @@ std::vector generateDeformableConvolutionUintParams {1, 1}, {1, 1}), DeformableConvolutionParams( - PartialShape{1, 1, 5, 5}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 18, 2, 2}, - PartialShape{1, 1, 2, 2}, + Shape{1, 1, 5, 5}, + Shape{1, 1, 3, 3}, + Shape{1, 18, 2, 2}, + Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10}, std::vector{1, 2, 3, 1, 1, 1, 3, 2, 1}, @@ -7524,11 +7524,11 @@ std::vector generateDeformableConvolutionV8MaskPara std::vector deformableConvolutionParams{ DeformableConvolutionParams( - PartialShape{1, 1, 4, 4}, - PartialShape{1, 1, 2, 2}, - PartialShape{1, 8, 3, 3}, - PartialShape{1, 1, 3, 3}, - PartialShape{1, 4, 3, 3}, + Shape{1, 1, 4, 4}, + Shape{1, 1, 2, 2}, + Shape{1, 8, 3, 3}, + Shape{1, 1, 3, 3}, + Shape{1, 4, 3, 3}, IN_ET, std::vector{1.0f, 2.0f, @@ -7565,11 +7565,11 @@ std::vector generateDeformableConvolutionV8MaskPara "v8_zeroed_offset_default_mask", true), DeformableConvolutionParams( - PartialShape{1, 4, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, + Shape{1, 4, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, + Shape{1, 8, 2, 2}, IN_ET, std::vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f, @@ -7609,11 +7609,11 @@ std::vector generateDeformableConvolutionV8MaskPara "v8_real_offset_groups_deforgroups_mask", true), DeformableConvolutionParams( - PartialShape{1, 2, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, + Shape{1, 2, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, + Shape{1, 8, 2, 2}, IN_ET, std::vector{1.0f, 2.0f, @@ -7667,11 +7667,11 @@ std::vector generateDeformableConvolutionV8MaskPara "v8_real_offset_groups_deforgroups_mask_2", true), DeformableConvolutionParams( - PartialShape{1, 2, 3, 3}, - PartialShape{2, 2, 2, 2}, - PartialShape{1, 16, 2, 2}, - PartialShape{1, 2, 2, 2}, - PartialShape{1, 8, 2, 2}, + Shape{1, 2, 3, 3}, + Shape{2, 2, 2, 2}, + Shape{1, 16, 2, 2}, + Shape{1, 2, 2, 2}, + Shape{1, 8, 2, 2}, IN_ET, std::vector{1.0f, 2.0f, diff --git a/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp b/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp index 1ee42000a12e49..bf680e71a3f715 100644 --- a/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp +++ b/src/plugins/template/tests/functional/op_reference/deformable_psroi_pooling.cpp @@ -155,6 +155,7 @@ class ReferenceDeformablePSROIPoolingLayerTest : public testing::TestWithParam generateParamsForDFT() { NULL), // dft1d_signal_size_eval DFTParams(Shape{2, 10, 10, 2}, - Shape{2, 10, 10, 2}, + Shape{2, 20, 10, 2}, ET, ET, input_data, @@ -1256,7 +1256,7 @@ std::vector generateParamsForDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{1}, {20})), // dft2d_signal_size_eval_1 DFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{5, 6, 9, 2}, ET, ET, input_data_1, @@ -1274,7 +1274,7 @@ std::vector generateParamsForDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{2}, {4, 6})), // dft2d_signal_size_eval_3 DFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{3, 6, 4, 2}, ET, ET, input_data_1, @@ -1292,7 +1292,7 @@ std::vector generateParamsForDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{2}, {4, 8})), // dft2d_signal_size_eval_5 DFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{5, 6, 4, 2}, ET, ET, input_data_1, @@ -1301,7 +1301,7 @@ std::vector generateParamsForDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{2}, {5, 4})), // dft3d_signal_size_eval DFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{3, 7, 5, 2}, ET, ET, input_data_1, diff --git a/src/plugins/template/tests/functional/op_reference/divide.cpp b/src/plugins/template/tests/functional/op_reference/divide.cpp index 85c19a19703aaa..4a3b4d26a588d3 100644 --- a/src/plugins/template/tests/functional/op_reference/divide.cpp +++ b/src/plugins/template/tests/functional/op_reference/divide.cpp @@ -15,8 +15,9 @@ namespace { struct DivideParams { template - DivideParams(const PartialShape& iShape1, - const PartialShape& iShape2, + DivideParams(const Shape& iShape1, + const Shape& iShape2, + const Shape& oShape, const element::Type& iType, const std::vector& iValues1, const std::vector& iValues2, @@ -25,12 +26,12 @@ struct DivideParams { pshape2(iShape2), inType(iType), outType(iType), - inputData1(CreateTensor(iType, iValues1)), - inputData2(CreateTensor(iType, iValues2)), - refData(CreateTensor(iType, oValues)) {} + inputData1(CreateTensor(iShape1, iType, iValues1)), + inputData2(CreateTensor(iShape2, iType, iValues2)), + refData(CreateTensor(oShape, iType, oValues)) {} - PartialShape pshape1; - PartialShape pshape2; + Shape pshape1; + Shape pshape2; element::Type inType; element::Type outType; ov::Tensor inputData1; @@ -40,14 +41,15 @@ struct DivideParams { struct DivideRoundingParams : public DivideParams { template - DivideRoundingParams(const PartialShape& iShape1, - const PartialShape& iShape2, + DivideRoundingParams(const Shape& iShape1, + const Shape& iShape2, + const Shape& oShape, const element::Type& iType, const std::vector& iValues1, const std::vector& iValues2, const std::vector& oValues, const bool pythondiv) - : DivideParams(iShape1, iShape2, iType, iValues1, iValues2, oValues), + : DivideParams(iShape1, iShape2, oShape, iType, iValues1, iValues2, oValues), pythonDivision(pythondiv) {} bool pythonDivision; @@ -73,8 +75,8 @@ class ReferenceDivideLayerTest : public testing::TestWithParam, pu } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -105,8 +107,8 @@ class ReferenceDivideRoundingLayerTest : public testing::TestWithParam CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type, const bool pythondiv) { @@ -129,8 +131,9 @@ template std::vector generateParamsForDivide() { using T = typename element_type_traits::value_type; - std::vector params{DivideParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{DivideParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{2, 4, 8, 16}, std::vector{1, 2, 4, 8}, @@ -142,14 +145,16 @@ template std::vector generateParamsForDivideFloat32() { using T = typename element_type_traits::value_type; - std::vector params{DivideParams(ov::PartialShape{1}, - ov::PartialShape{1}, + std::vector params{DivideParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{18}, std::vector{8}, std::vector{2.25}), - DivideParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + DivideParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{2, 4, 8, 16}, std::vector{0, 0, 0, 0}, @@ -164,14 +169,16 @@ template std::vector generateParamsForDivideInt32() { using T = typename element_type_traits::value_type; - std::vector params{DivideParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{DivideParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{0x40000140, 0x40000001, 8, 16}, std::vector{2, 5, 4, 8}, std::vector{536871072, 214748365, 2, 2}), - DivideParams(ov::PartialShape{1}, - ov::PartialShape{1}, + DivideParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{18}, std::vector{8}, @@ -184,8 +191,9 @@ std::vector generateParamsForDivideBroadcast() { using T = typename element_type_traits::value_type; std::vector params{ - DivideParams(ov::PartialShape{3, 2, 1}, - ov::PartialShape{1, 6}, + DivideParams(ov::Shape{3, 2, 1}, + ov::Shape{1, 6}, + ov::Shape{3, 2, 6}, IN_ET, std::vector{12, 24, 36, 48, 60, 72}, std::vector{1, 2, 3, 4, 6, 1}, @@ -198,8 +206,9 @@ template std::vector generateParamsForDividePythonRoundingInt32() { using T = typename element_type_traits::value_type; - std::vector params{DivideParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{DivideParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{-10, -10, 10, 10}, std::vector{-3, 3, -3, 3}, @@ -211,8 +220,9 @@ template std::vector generateParamsForDivideCppRoundingInt32() { using T = typename element_type_traits::value_type; - std::vector params{DivideRoundingParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{DivideRoundingParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{-10, -10, 10, 10}, std::vector{-3, 3, -3, 3}, diff --git a/src/plugins/template/tests/functional/op_reference/elu.cpp b/src/plugins/template/tests/functional/op_reference/elu.cpp index 4a406499d37f3b..aebdf47f685e06 100644 --- a/src/plugins/template/tests/functional/op_reference/elu.cpp +++ b/src/plugins/template/tests/functional/op_reference/elu.cpp @@ -38,6 +38,7 @@ struct EluParams { class ReferenceEluLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.pshape, params.inType, params.outType, params.alpha); inputData = {params.inputData}; diff --git a/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp b/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp index c690cf95401843..ee9ca56efc364e 100644 --- a/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embedding_segments_sum.cpp @@ -14,10 +14,10 @@ using namespace ov; struct EmbeddingSegmentsSumParams { template - EmbeddingSegmentsSumParams(const ov::PartialShape& iShape, + EmbeddingSegmentsSumParams(const ov::Shape& iShape, const ov::element::Type& iType, const std::vector& iValues, - const ov::PartialShape& oShape, + const ov::Shape& oShape, const ov::element::Type& oType, const std::vector& oValues, const std::shared_ptr& indices, @@ -27,10 +27,10 @@ struct EmbeddingSegmentsSumParams { const std::shared_ptr& per_sample_weights = nullptr) : _iShape(iShape), _iType(iType), - _iData(CreateTensor(iType, iValues)), + _iData(CreateTensor(iShape, iType, iValues)), _refShape(oShape), _refType(oType), - _refData(CreateTensor(oType, oValues)) { + _refData(CreateTensor(oShape, oType, oValues)) { _segmentIds = segment_ids; _indices = indices; _numSegments = num_segments; @@ -38,11 +38,11 @@ struct EmbeddingSegmentsSumParams { _perSampleWeights = per_sample_weights; } - ov::PartialShape _iShape; + ov::Shape _iShape; ov::element::Type _iType; ov::Tensor _iData; - ov::PartialShape _refShape; + ov::Shape _refShape; ov::element::Type _refType; ov::Tensor _refData; @@ -79,7 +79,7 @@ class ReferenceEmbeddingSegmentsSumLayerTest : public testing::TestWithParam CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const std::shared_ptr indices, const std::shared_ptr segment_ids, @@ -121,10 +121,10 @@ INSTANTIATE_TEST_SUITE_P( ReferenceEmbeddingSegmentsSumLayerTest, ::testing::Values( EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::f32, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f32, {-1.05f, -1.2f, -0.2f, -0.6f, -0.1f, 0.4f}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), @@ -135,10 +135,10 @@ INSTANTIATE_TEST_SUITE_P( ov::Shape({4}), std::vector{0.5, 0.5, 0.5, 0.5})), EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::f64, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f64, std::vector{-2.1, -2.4, -0.2, -0.6, -0.2, 0.8}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), @@ -146,20 +146,20 @@ INSTANTIATE_TEST_SUITE_P( std::make_shared(element::i32, ov::Shape(), std::vector{3}), std::make_shared(element::i32, ov::Shape(), std::vector{0})), EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::i32, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i32, std::vector{-6, -4, 0, 0, 2, 18}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 0, 2, 2}), std::make_shared(element::i32, ov::Shape(), std::vector{3})), EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::u32, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::u32, std::vector{6, 8, 3, 4, 16, 18}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), @@ -167,20 +167,20 @@ INSTANTIATE_TEST_SUITE_P( std::make_shared(element::i32, ov::Shape(), std::vector{3}), std::make_shared(element::i32, ov::Shape(), std::vector{1})), EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::f16, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f16, std::vector{-2.1, -2.4, 0, 0, -0.2, 0.8}, std::make_shared(element::i64, ov::Shape({4}), std::vector{0, 2, 3, 4}), std::make_shared(element::i64, ov::Shape({4}), std::vector{0, 0, 2, 2}), std::make_shared(element::i64, ov::Shape(), std::vector{3})), EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::i64, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i64, std::vector{-6, -4, -1, 2, 2, 18}, std::make_shared(element::i64, ov::Shape({4}), std::vector{0, 2, 3, 4}), @@ -188,10 +188,10 @@ INSTANTIATE_TEST_SUITE_P( std::make_shared(element::i64, ov::Shape(), std::vector{3}), std::make_shared(element::i64, ov::Shape(), std::vector{0})), EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::i8, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i8, std::vector{-12, -8, -1, 2, 4, 36}, std::make_shared(element::i64, ov::Shape({4}), std::vector{0, 2, 3, 4}), @@ -200,10 +200,10 @@ INSTANTIATE_TEST_SUITE_P( std::make_shared(element::i64, ov::Shape(), std::vector{0}), std::make_shared(element::i8, ov::Shape({4}), std::vector{2, 2, 2, 2})), EmbeddingSegmentsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::u8, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::u8, std::vector{6, 8, 1, 2, 16, 18}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), diff --git a/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp b/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp index 3daaa361568a31..eba3c5dd82e093 100644 --- a/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embeddingbag_offsetssum.cpp @@ -13,10 +13,10 @@ using namespace ov; struct EmbeddingBagOffsetsSumParams { template - EmbeddingBagOffsetsSumParams(const ov::PartialShape& iShape, + EmbeddingBagOffsetsSumParams(const ov::Shape& iShape, const ov::element::Type& iType, const std::vector& iValues, - const ov::PartialShape& oShape, + const ov::Shape& oShape, const ov::element::Type& oType, const std::vector& oValues, const std::shared_ptr& indices, @@ -25,20 +25,20 @@ struct EmbeddingBagOffsetsSumParams { const std::shared_ptr& per_sample_weights = nullptr) : _iShape(iShape), _iType(iType), - _iData(CreateTensor(iType, iValues)), + _iData(CreateTensor(iShape, iType, iValues)), _refShape(oShape), _refType(oType), - _refData(CreateTensor(oType, oValues)) { + _refData(CreateTensor(oShape, oType, oValues)) { _indices = indices; _offsets = offsets; _defaultIndex = default_index; _perSampleWeights = per_sample_weights; } - ov::PartialShape _iShape; + ov::Shape _iShape; ov::element::Type _iType; ov::Tensor _iData; - ov::PartialShape _refShape; + ov::Shape _refShape; ov::element::Type _refType; ov::Tensor _refData; @@ -73,7 +73,7 @@ class ReferenceEmbeddingBagOffsetsSumLayerTest : public testing::TestWithParam CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const std::shared_ptr indices, const std::shared_ptr offsets, @@ -109,10 +109,10 @@ INSTANTIATE_TEST_SUITE_P( ReferenceEmbeddingBagOffsetsSumLayerTest, ::testing::Values( EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::f32, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f32, {-1.05f, -1.2f, -0.2f, -0.6f, -0.1f, 0.4f}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), @@ -122,58 +122,58 @@ INSTANTIATE_TEST_SUITE_P( ov::Shape({4}), std::vector{0.5, 0.5, 0.5, 0.5})), EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::f64, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f64, std::vector{-2.1, -2.4, -0.2, -0.6, -0.2, 0.8}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), std::make_shared(element::i32, ov::Shape({3}), std::vector{0, 2, 2}), std::make_shared(element::i32, ov::Shape(), std::vector{0})), EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::i32, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i32, std::vector{-6, -4, 0, 0, 2, 18}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), std::make_shared(element::i32, ov::Shape({3}), std::vector{0, 2, 2})), EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::u32, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::u32, std::vector{6, 8, 3, 4, 16, 18}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), std::make_shared(element::i32, ov::Shape({3}), std::vector{0, 2, 2}), std::make_shared(element::i32, ov::Shape(), std::vector{1})), EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::f16, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f16, std::vector{-2.1, -2.4, 0, 0, -0.2, 0.8}, std::make_shared(element::i64, ov::Shape({4}), std::vector{0, 2, 3, 4}), std::make_shared(element::i64, ov::Shape({3}), std::vector{0, 2, 2})), EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::i64, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i64, std::vector{-6, -4, -1, 2, 2, 18}, std::make_shared(element::i64, ov::Shape({4}), std::vector{0, 2, 3, 4}), std::make_shared(element::i64, ov::Shape({3}), std::vector{0, 2, 2}), std::make_shared(element::i64, ov::Shape(), std::vector{0})), EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::i8, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i8, std::vector{-12, -8, -1, 2, 4, 36}, std::make_shared(element::i64, ov::Shape({4}), std::vector{0, 2, 3, 4}), @@ -181,10 +181,10 @@ INSTANTIATE_TEST_SUITE_P( std::make_shared(element::i64, ov::Shape(), std::vector{0}), std::make_shared(element::i8, ov::Shape({4}), std::vector{2, 2, 2, 2})), EmbeddingBagOffsetsSumParams( - ov::PartialShape{5, 2}, + ov::Shape{5, 2}, ov::element::u8, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::u8, std::vector{6, 8, 1, 2, 16, 18}, std::make_shared(element::i32, ov::Shape({4}), std::vector{0, 2, 3, 4}), diff --git a/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp b/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp index 32c18442fe01f9..9734e7dd4fdba4 100644 --- a/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp +++ b/src/plugins/template/tests/functional/op_reference/embeddingbag_packedsum.cpp @@ -14,28 +14,28 @@ using namespace ov; struct EmbeddingBagPackedSumParams { template - EmbeddingBagPackedSumParams(const ov::PartialShape& iShape, + EmbeddingBagPackedSumParams(const ov::Shape& iShape, const ov::element::Type& iType, const std::vector& iValues, - const ov::PartialShape& oShape, + const ov::Shape& oShape, const ov::element::Type& oType, const std::vector& oValues, const std::shared_ptr& indices, const std::shared_ptr& per_sample_weights = nullptr) : _iShape(iShape), _iType(iType), - _iData(CreateTensor(iType, iValues)), + _iData(CreateTensor(iShape, iType, iValues)), _refShape(oShape), _refType(oType), - _refData(CreateTensor(oType, oValues)) { + _refData(CreateTensor(oShape, oType, oValues)) { _indices = indices; _perSampleWeights = per_sample_weights; } - ov::PartialShape _iShape; + ov::Shape _iShape; ov::element::Type _iType; ov::Tensor _iData; - ov::PartialShape _refShape; + ov::Shape _refShape; ov::element::Type _refType; ov::Tensor _refData; @@ -63,7 +63,7 @@ class ReferenceEmbeddingBagPackedSumLayerTest : public testing::TestWithParam CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const std::shared_ptr indices, const std::shared_ptr per_sample_weights) { @@ -108,61 +108,61 @@ INSTANTIATE_TEST_SUITE_P( smoke_EmbeddingBagPackedSum_With_Hardcoded_Refs, ReferenceEmbeddingBagPackedSumLayerTest, ::testing::Values( - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::f32, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f32, std::vector{-1.05f, -1.2f, -1.f, -1.1f, -0.1f, 0.4f}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i32), CreateConstant({{0.5, 0.5}, {0.5, 0.5}, {0.5, 0.5}}, element::f32)), - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::f64, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f64, std::vector{-2.1, -2.4, -2.0, -2.2, -0.2, 0.8}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i32)), - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::i32, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i32, std::vector{-6, -4, -2, -2, 2, 18}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i32)), - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::u32, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::u32, std::vector{6, 8, 8, 10, 16, 18}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i32)), - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::f16, std::vector{-0.2, -0.6, -0.1, -0.4, -1.9, -1.8, -1., 1.5, 0.8, -0.7}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::f16, std::vector{-2.1, -2.4, -2.0, -2.2, -0.2, 0.8}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i64)), - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::i64, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i64, std::vector{-6, -4, -2, -2, 2, 18}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i64)), - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::i8, std::vector{-1, 2, 3, 4, -5, -6, -7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::i8, std::vector{-12, -8, -4, -4, 4, 36}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i64), CreateConstant({{2, 2}, {2, 2}, {2, 2}}, element::i8)), - EmbeddingBagPackedSumParams(ov::PartialShape{5, 2}, + EmbeddingBagPackedSumParams(ov::Shape{5, 2}, ov::element::u8, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - ov::PartialShape{3, 2}, + ov::Shape{3, 2}, ov::element::u8, std::vector{6, 8, 8, 10, 16, 18}, CreateConstant({{0, 2}, {1, 2}, {3, 4}}, element::i64))), diff --git a/src/plugins/template/tests/functional/op_reference/erf.cpp b/src/plugins/template/tests/functional/op_reference/erf.cpp index 064779bd516a90..c99312afe0b4d8 100644 --- a/src/plugins/template/tests/functional/op_reference/erf.cpp +++ b/src/plugins/template/tests/functional/op_reference/erf.cpp @@ -14,7 +14,7 @@ using namespace ov; struct ErfParams { template - ErfParams(const ov::PartialShape& shape, const ov::element::Type& iType, const std::vector& iValues) + ErfParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues) : pshape(shape), inType(iType), outType(iType), @@ -36,9 +36,9 @@ struct ErfParams { for (auto element : output) oValues.push_back(static_cast(element)); - refData = CreateTensor(outType, oValues); + refData = CreateTensor(pshape, outType, oValues); } - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -64,7 +64,7 @@ class ReferenceErfLayerTest : public testing::TestWithParam, public C } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& expected_output_type) { const auto in = std::make_shared(input_type, input_shape); @@ -81,17 +81,17 @@ INSTANTIATE_TEST_SUITE_P( smoke_Erf_With_Hardcoded_Refs, ReferenceErfLayerTest, ::testing::Values( - ErfParams(ov::PartialShape{2, 5}, + ErfParams(ov::Shape{2, 5}, ov::element::f32, std::vector{-INFINITY, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f, 3.0f, INFINITY}), - ErfParams(ov::PartialShape{2, 5}, + ErfParams(ov::Shape{2, 5}, ov::element::f16, std::vector{-INFINITY, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f, 3.0f, INFINITY}), - ErfParams(ov::PartialShape{2, 3}, + ErfParams(ov::Shape{2, 3}, ov::element::i32, std::vector< int32_t>{std::numeric_limits::min(), -2, -1, 1, 2, std::numeric_limits::max()}), - ErfParams(ov::PartialShape{2, 3}, + ErfParams(ov::Shape{2, 3}, ov::element::u32, std::vector{std::numeric_limits::min(), 0, @@ -99,11 +99,11 @@ INSTANTIATE_TEST_SUITE_P( 2, 3, std::numeric_limits::max()}), - ErfParams(ov::PartialShape{2, 3}, + ErfParams(ov::Shape{2, 3}, ov::element::i64, std::vector< int64_t>{std::numeric_limits::min(), -2, -1, 1, 2, std::numeric_limits::max()}), - ErfParams(ov::PartialShape{2, 3}, + ErfParams(ov::Shape{2, 3}, ov::element::u64, std::vector{std::numeric_limits::min(), 0, diff --git a/src/plugins/template/tests/functional/op_reference/experimental_detectron_detection_output.cpp b/src/plugins/template/tests/functional/op_reference/experimental_detectron_detection_output.cpp index 25a9ec6669ab2b..29bac1c4af004e 100644 --- a/src/plugins/template/tests/functional/op_reference/experimental_detectron_detection_output.cpp +++ b/src/plugins/template/tests/functional/op_reference/experimental_detectron_detection_output.cpp @@ -65,6 +65,7 @@ class ReferenceExperimentalDOLayerTest : public testing::TestWithParam generateEyeBatchShapeParams(bool is_dyn_shape_t reference_tests::Tensor{{1}, element::i32, std::vector{0}}, reference_tests::Tensor{{1}, element::i32, std::vector{2}}, element::Type_t::f32, - reference_tests::Tensor{{2, 3, 3}, element::f32, std::vector{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, + reference_tests::Tensor{{2, 4, 4}, element::f32, std::vector{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}}, "f32_2x4x4_diag0", @@ -325,20 +325,21 @@ std::vector generateEyeBatchShapeParams(bool is_dyn_shape_t reference_tests::Tensor{{1}, element::i32, std::vector{2}}, reference_tests::Tensor{{2}, element::i32, std::vector{2, 2}}, element::Type_t::i64, - reference_tests::Tensor{{2, 2, 4, 2}, element::i64, std::vector{0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, + reference_tests::Tensor{{2, 2, 2, 4}, element::i64, std::vector{0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1}}, - "int64_2x2x3x3", + "int64_2x2x2x4", is_dyn_shape_test), - EyeBatchShapeParams( - reference_tests::Tensor{{1}, element::i32, std::vector{2}}, - reference_tests::Tensor{{1}, element::i32, std::vector{2}}, - reference_tests::Tensor{{1}, element::i32, std::vector{3}}, - reference_tests::Tensor{{2}, element::i32, std::vector{1, 3}}, - element::Type_t::u8, - reference_tests::Tensor{{2, 3, 3}, element::u8, std::vector{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, - "uint8_1x3x2x2", - is_dyn_shape_test)}; + EyeBatchShapeParams(reference_tests::Tensor{{1}, element::i32, std::vector{2}}, + reference_tests::Tensor{{1}, element::i32, std::vector{2}}, + reference_tests::Tensor{{1}, element::i32, std::vector{3}}, + reference_tests::Tensor{{2}, element::i32, std::vector{1, 3}}, + element::Type_t::u8, + reference_tests::Tensor{{1, 3, 2, 2}, + element::u8, + std::vector{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + "uint8_1x3x2x2", + is_dyn_shape_test)}; return test_params; } diff --git a/src/plugins/template/tests/functional/op_reference/fake_quantize.cpp b/src/plugins/template/tests/functional/op_reference/fake_quantize.cpp index 08a243bb2716df..3166f8880fcfe6 100644 --- a/src/plugins/template/tests/functional/op_reference/fake_quantize.cpp +++ b/src/plugins/template/tests/functional/op_reference/fake_quantize.cpp @@ -32,8 +32,8 @@ struct FakeQuantizeParams { m_expected_shape(expected_shape), m_input_type(input_type), m_expected_type(expected_type), - m_input_data(CreateTensor(input_type, input_data)), - m_expected_data(CreateTensor(expected_type, expected_data)), + m_input_data(CreateTensor(input_shape, input_type, input_data)), + m_expected_data(CreateTensor(expected_shape, expected_type, expected_data)), m_input_low(input_low), m_input_high(input_high), m_output_low(output_low), diff --git a/src/plugins/template/tests/functional/op_reference/floor_mod.cpp b/src/plugins/template/tests/functional/op_reference/floor_mod.cpp index 81fffed599d348..33b06550000d8b 100644 --- a/src/plugins/template/tests/functional/op_reference/floor_mod.cpp +++ b/src/plugins/template/tests/functional/op_reference/floor_mod.cpp @@ -41,6 +41,7 @@ struct FloorModParams { class ReferenceFloorModLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.pshape1, params.pshape2, params.inType, params.outType); inputData = {params.inputData1, params.inputData2}; diff --git a/src/plugins/template/tests/functional/op_reference/generate_proposals.cpp b/src/plugins/template/tests/functional/op_reference/generate_proposals.cpp index f91565a6f3d4a7..61e32387b8bf7a 100644 --- a/src/plugins/template/tests/functional/op_reference/generate_proposals.cpp +++ b/src/plugins/template/tests/functional/op_reference/generate_proposals.cpp @@ -70,6 +70,7 @@ struct GPParams { class ReferenceGPLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.imageSizeInfoData, params.anchorsData, params.deltasData, params.scoresData}; diff --git a/src/plugins/template/tests/functional/op_reference/grid_sample.cpp b/src/plugins/template/tests/functional/op_reference/grid_sample.cpp index df4f7e5a34845b..e818d176dbe0b4 100644 --- a/src/plugins/template/tests/functional/op_reference/grid_sample.cpp +++ b/src/plugins/template/tests/functional/op_reference/grid_sample.cpp @@ -344,40 +344,40 @@ std::vector generateBilinearParamsEvenDimensions() { data_even_dims, grid_inner, op::v9::GridSample::Attributes{false, GS_BILINEAR, GS_ZEROS}, - reference_tests::Tensor{{1, 1, 1, 7}, DATA_ET, std::vector
{5, 17, 8, 20, 4.75, 1.5, 11, 14}}, + reference_tests::Tensor{{1, 1, 1, 8}, DATA_ET, std::vector
{5, 17, 8, 20, 4.75, 1.5, 11, 14}}, "bilinear_zeros_noalign_even_dims_inner" + types_str); params.emplace_back( data_even_dims, grid_inner, op::v9::GridSample::Attributes{true, GS_BILINEAR, GS_ZEROS}, - reference_tests::Tensor{{1, 1, 1, 7}, DATA_ET, std::vector
{6.75, 15.75, 9.25, 18.25, 19, 6, 11.35, 13.65}}, + reference_tests::Tensor{{1, 1, 1, 8}, DATA_ET, std::vector
{6.75, 15.75, 9.25, 18.25, 19, 6, 11.35, 13.65}}, "bilinear_zeros_align_even_dims_inner" + types_str); params.emplace_back(data_even_dims, grid_inner, op::v9::GridSample::Attributes{false, GS_BILINEAR, GS_BORDER}, - reference_tests::Tensor{{1, 1, 1, 7}, DATA_ET, std::vector
{5, 17, 8, 20, 19, 6, 11, 14}}, + reference_tests::Tensor{{1, 1, 1, 8}, DATA_ET, std::vector
{5, 17, 8, 20, 19, 6, 11, 14}}, "bilinear_border_noalign_even_dims_inner" + types_str); params.emplace_back( data_even_dims, grid_inner, op::v9::GridSample::Attributes{true, GS_BILINEAR, GS_BORDER}, - reference_tests::Tensor{{1, 1, 1, 7}, DATA_ET, std::vector
{6.75, 15.75, 9.25, 18.25, 19, 6, 11.35, 13.65}}, + reference_tests::Tensor{{1, 1, 1, 8}, DATA_ET, std::vector
{6.75, 15.75, 9.25, 18.25, 19, 6, 11.35, 13.65}}, "bilinear_border_align_even_dims_inner" + types_str); params.emplace_back(data_even_dims, grid_inner, op::v9::GridSample::Attributes{false, GS_BILINEAR, GS_REFLECTION}, - reference_tests::Tensor{{1, 1, 1, 7}, DATA_ET, std::vector
{5, 17, 8, 20, 19, 6, 11, 14}}, + reference_tests::Tensor{{1, 1, 1, 8}, DATA_ET, std::vector
{5, 17, 8, 20, 19, 6, 11, 14}}, "bilinear_reflection_noalign_even_dims_inner" + types_str); params.emplace_back( data_even_dims, grid_inner, op::v9::GridSample::Attributes{true, GS_BILINEAR, GS_REFLECTION}, - reference_tests::Tensor{{1, 1, 1, 7}, DATA_ET, std::vector
{6.75, 15.75, 9.25, 18.25, 19, 6, 11.35, 13.65}}, + reference_tests::Tensor{{1, 1, 1, 8}, DATA_ET, std::vector
{6.75, 15.75, 9.25, 18.25, 19, 6, 11.35, 13.65}}, "bilinear_reflection_align_even_dims_inner" + types_str); return params; diff --git a/src/plugins/template/tests/functional/op_reference/grn.cpp b/src/plugins/template/tests/functional/op_reference/grn.cpp index d53acad7126144..f5a31eb2c97a1c 100644 --- a/src/plugins/template/tests/functional/op_reference/grn.cpp +++ b/src/plugins/template/tests/functional/op_reference/grn.cpp @@ -36,6 +36,7 @@ struct GrnParams { class ReferenceGrnLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.bias, params.pshape, params.inType); inputData = {params.inputData}; diff --git a/src/plugins/template/tests/functional/op_reference/group_convolution.cpp b/src/plugins/template/tests/functional/op_reference/group_convolution.cpp index 69f35868e71d56..0c28caab5aed09 100644 --- a/src/plugins/template/tests/functional/op_reference/group_convolution.cpp +++ b/src/plugins/template/tests/functional/op_reference/group_convolution.cpp @@ -13,9 +13,9 @@ using namespace ov; namespace { struct GroupConvolutionParams { template - GroupConvolutionParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& outputShape, + GroupConvolutionParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -30,17 +30,17 @@ struct GroupConvolutionParams { inType(iType), filterType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), dialations(dialations) {} - PartialShape inputShape; - PartialShape filterShape; - PartialShape outputShape; + Shape inputShape; + Shape filterShape; + Shape outputShape; ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; @@ -104,9 +104,9 @@ std::vector generateGroupConvolutionParams() { std::vector groupConvolutionParams{ // --------------------- 1D GroupConvolution ------------------------------------------ - GroupConvolutionParams(PartialShape{1, 1, 6}, - PartialShape{1, 1, 1, 3}, - PartialShape{1, 1, 4}, + GroupConvolutionParams(Shape{1, 1, 6}, + Shape{1, 1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2}, std::vector{2, 0, 1}, @@ -115,9 +115,9 @@ std::vector generateGroupConvolutionParams() { {0}, {0}, {1}), - GroupConvolutionParams(PartialShape{1, 2, 6}, - PartialShape{2, 1, 1, 3}, - PartialShape{1, 2, 4}, + GroupConvolutionParams(Shape{1, 2, 6}, + Shape{2, 1, 1, 3}, + Shape{1, 2, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, 1, 3, 3, 0, 1, 2}, std::vector{1, 0, 3, 3, 0, 1}, @@ -126,9 +126,9 @@ std::vector generateGroupConvolutionParams() { {0}, {0}, {1}), - GroupConvolutionParams(PartialShape{1, 2, 6}, - PartialShape{2, 2, 1, 3}, - PartialShape{1, 4, 4}, + GroupConvolutionParams(Shape{1, 2, 6}, + Shape{2, 2, 1, 3}, + Shape{1, 4, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, -1, -3, -3, 0, 1, 2}, std::vector{1, 0, 3, 3, 0, 1, -3, 0, 1, 3, 2, -1}, @@ -137,9 +137,9 @@ std::vector generateGroupConvolutionParams() { {0}, {0}, {1}), - GroupConvolutionParams(PartialShape{2, 2, 6}, - PartialShape{2, 1, 1, 3}, - PartialShape{2, 2, 4}, + GroupConvolutionParams(Shape{2, 2, 6}, + Shape{2, 1, 1, 3}, + Shape{2, 2, 4}, IN_ET, std::vector{// -- batch 1 -- 1, @@ -183,9 +183,9 @@ std::vector generateGroupConvolutionUintParams() { std::vector groupConvolutionParams{ // --------------------- 1D GroupConvolution ------------------------------------------ - GroupConvolutionParams(PartialShape{1, 1, 6}, - PartialShape{1, 1, 1, 3}, - PartialShape{1, 1, 4}, + GroupConvolutionParams(Shape{1, 1, 6}, + Shape{1, 1, 1, 3}, + Shape{1, 1, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2}, std::vector{2, 0, 1}, @@ -194,9 +194,9 @@ std::vector generateGroupConvolutionUintParams() { {0}, {0}, {1}), - GroupConvolutionParams(PartialShape{1, 2, 6}, - PartialShape{2, 1, 1, 3}, - PartialShape{1, 2, 4}, + GroupConvolutionParams(Shape{1, 2, 6}, + Shape{2, 1, 1, 3}, + Shape{1, 2, 4}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, 1, 3, 3, 0, 1, 2}, std::vector{1, 0, 3, 3, 0, 1}, @@ -205,9 +205,9 @@ std::vector generateGroupConvolutionUintParams() { {0}, {0}, {1}), - GroupConvolutionParams(PartialShape{2, 2, 6}, - PartialShape{2, 1, 1, 3}, - PartialShape{2, 2, 4}, + GroupConvolutionParams(Shape{2, 2, 6}, + Shape{2, 1, 1, 3}, + Shape{2, 2, 4}, IN_ET, std::vector{// -- batch 1 -- 1, diff --git a/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp b/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp index f831a3941e07a5..cc2162d4d95829 100644 --- a/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp +++ b/src/plugins/template/tests/functional/op_reference/group_convolution_backprop.cpp @@ -14,9 +14,9 @@ using namespace ov; namespace { struct GroupConvolutionBackpropDataParams { template - GroupConvolutionBackpropDataParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& outputShape, + GroupConvolutionBackpropDataParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -32,18 +32,18 @@ struct GroupConvolutionBackpropDataParams { inType(iType), filterType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), padBegin(padBegin), padEnd(padEnd), dialations(dialations), outPadding(outPadding) {} - PartialShape inputShape; - PartialShape filterShape; - PartialShape outputShape; + Shape inputShape; + Shape filterShape; + Shape outputShape; ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; @@ -59,9 +59,9 @@ struct GroupConvolutionBackpropDataParams { struct GroupConvolutionBackpropDataOutShapeParams { template - GroupConvolutionBackpropDataOutShapeParams(const PartialShape& inputShape, - const PartialShape& filterShape, - const PartialShape& outputShape, + GroupConvolutionBackpropDataOutShapeParams(const Shape& inputShape, + const Shape& filterShape, + const Shape& outputShape, const element::Type& iType, const std::vector& iValues, const std::vector& filterValues, @@ -76,17 +76,17 @@ struct GroupConvolutionBackpropDataOutShapeParams { inType(iType), filterType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - filterData(CreateTensor(iType, filterValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(inputShape, iType, iValues)), + filterData(CreateTensor(filterShape, iType, filterValues)), + refData(CreateTensor(outputShape, iType, oValues)), strides(strides), dialations(dialations), constantOutputShape(constantOutputShape), constantOutputShapeData(constantOutputShapeData) {} - PartialShape inputShape; - PartialShape filterShape; - PartialShape outputShape; + Shape inputShape; + Shape filterShape; + Shape outputShape; ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; @@ -104,6 +104,7 @@ class ReferenceGroupConvolutionBackpropDataLayerTest public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.inputData, params.filterData}; @@ -162,6 +163,7 @@ class ReferenceGroupConvolutionBackpropDataLayerOutShapeTest public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.inputData, params.filterData}; @@ -215,9 +217,9 @@ std::vector generateGroupConvolutionBackprop std::vector groupConvolutionBackpropDataParams{ // --------------------- 1D GroupConvolutionBackpropData ------------------------------------------ - GroupConvolutionBackpropDataParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 1, 3}, - PartialShape{1, 1, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 1, 4}, + Shape{1, 1, 1, 3}, + Shape{1, 1, 6}, IN_ET, std::vector{1, 3, 3, 0}, std::vector{2, 0, 1}, @@ -226,9 +228,9 @@ std::vector generateGroupConvolutionBackprop {0}, {0}, {1}), - GroupConvolutionBackpropDataParams(PartialShape{1, 2, 4}, - PartialShape{2, 1, 1, 3}, - PartialShape{1, 2, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 2, 4}, + Shape{2, 1, 1, 3}, + Shape{1, 2, 6}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, 1, 3}, std::vector{1, 0, 3, 3, 0, 1}, @@ -237,9 +239,9 @@ std::vector generateGroupConvolutionBackprop {0}, {0}, {1}), - GroupConvolutionBackpropDataParams(PartialShape{1, 4, 4}, - PartialShape{2, 2, 1, 3}, - PartialShape{1, 2, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 4, 4}, + Shape{2, 2, 1, 3}, + Shape{1, 2, 6}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, -1, -3, -3, 0, 1, 2, 0, -2, 3, -1}, std::vector{1, 0, 3, 3, 0, 1, -3, 0, 1, 3, 2, -1}, @@ -249,9 +251,9 @@ std::vector generateGroupConvolutionBackprop {0}, {1}), GroupConvolutionBackpropDataParams( - PartialShape{2, 2, 4}, - PartialShape{2, 1, 1, 3}, - PartialShape{2, 2, 6}, + Shape{2, 2, 4}, + Shape{2, 1, 1, 3}, + Shape{2, 2, 6}, IN_ET, std::vector{// -- batch 1 -- 1, @@ -278,9 +280,9 @@ std::vector generateGroupConvolutionBackprop {0}, {1}), GroupConvolutionBackpropDataParams( - PartialShape{1, 1, 3, 3}, - PartialShape{1, 1, 1, 3, 3}, - PartialShape{1, 1, 6, 6}, + Shape{1, 1, 3, 3}, + Shape{1, 1, 1, 3, 3}, + Shape{1, 1, 6, 6}, IN_ET, std::vector{0.16857791f, -0.15161794f, @@ -321,9 +323,9 @@ std::vector generateGroupConvolutionBackprop std::vector groupConvolutionBackpropDataParams{ // --------------------- 1D GroupConvolutionBackpropData ------------------------------------------ - GroupConvolutionBackpropDataParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 1, 3}, - PartialShape{1, 1, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 1, 4}, + Shape{1, 1, 1, 3}, + Shape{1, 1, 6}, IN_ET, std::vector{1, 3, 3, 0}, std::vector{2, 0, 1}, @@ -332,9 +334,9 @@ std::vector generateGroupConvolutionBackprop {0}, {0}, {1}), - GroupConvolutionBackpropDataParams(PartialShape{1, 2, 4}, - PartialShape{2, 1, 1, 3}, - PartialShape{1, 2, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 2, 4}, + Shape{2, 1, 1, 3}, + Shape{1, 2, 6}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, 1, 3}, std::vector{1, 0, 3, 3, 0, 1}, @@ -343,9 +345,9 @@ std::vector generateGroupConvolutionBackprop {0}, {0}, {1}), - GroupConvolutionBackpropDataParams(PartialShape{1, 4, 4}, - PartialShape{2, 2, 1, 3}, - PartialShape{1, 2, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 4, 4}, + Shape{2, 2, 1, 3}, + Shape{1, 2, 6}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, -1, -3, -3, 0, 1, 2, 0, -2, 3, -1}, std::vector{1, 0, 3, 3, 0, 1, -3, 0, 1, 3, 2, -1}, @@ -355,9 +357,9 @@ std::vector generateGroupConvolutionBackprop {0}, {1}), GroupConvolutionBackpropDataParams( - PartialShape{2, 2, 4}, - PartialShape{2, 1, 1, 3}, - PartialShape{2, 2, 6}, + Shape{2, 2, 4}, + Shape{2, 1, 1, 3}, + Shape{2, 2, 6}, IN_ET, std::vector{// -- batch 1 -- 1, @@ -393,9 +395,9 @@ std::vector generateGroupConvolutionBackprop std::vector groupConvolutionBackpropDataParams{ // --------------------- 1D GroupConvolutionBackpropData ------------------------------------------ - GroupConvolutionBackpropDataParams(PartialShape{1, 1, 4}, - PartialShape{1, 1, 1, 3}, - PartialShape{1, 1, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 1, 4}, + Shape{1, 1, 1, 3}, + Shape{1, 1, 6}, IN_ET, std::vector{1, 3, 3, 0}, std::vector{2, 0, 1}, @@ -404,9 +406,9 @@ std::vector generateGroupConvolutionBackprop {0}, {0}, {1}), - GroupConvolutionBackpropDataParams(PartialShape{1, 2, 4}, - PartialShape{2, 1, 1, 3}, - PartialShape{1, 2, 6}, + GroupConvolutionBackpropDataParams(Shape{1, 2, 4}, + Shape{2, 1, 1, 3}, + Shape{1, 2, 6}, IN_ET, std::vector{1, 3, 3, 0, 1, 2, 1, 3}, std::vector{1, 0, 3, 3, 0, 1}, @@ -416,9 +418,9 @@ std::vector generateGroupConvolutionBackprop {0}, {1}), GroupConvolutionBackpropDataParams( - PartialShape{2, 2, 4}, - PartialShape{2, 1, 1, 3}, - PartialShape{2, 2, 6}, + Shape{2, 2, 4}, + Shape{2, 1, 1, 3}, + Shape{2, 2, 6}, IN_ET, std::vector{// -- batch 1 -- 1, @@ -476,9 +478,9 @@ std::vector generateGroupConvolution std::vector groupConvolutionBackpropDataOutShapeParams{ // --------------------- 1D GroupConvolutionBackpropData ------------------------------------------ - GroupConvolutionBackpropDataOutShapeParams(PartialShape{1, 1, 1, 10}, - PartialShape{1, 1, 1, 1, 5}, - PartialShape{1, 1, 1, 14}, + GroupConvolutionBackpropDataOutShapeParams(Shape{1, 1, 1, 10}, + Shape{1, 1, 1, 1, 5}, + Shape{1, 1, 1, 14}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, std::vector{1, 2, 3, 2, 1}, diff --git a/src/plugins/template/tests/functional/op_reference/group_normalization.cpp b/src/plugins/template/tests/functional/op_reference/group_normalization.cpp index 82ef7bc330327d..322d509aa838ec 100644 --- a/src/plugins/template/tests/functional/op_reference/group_normalization.cpp +++ b/src/plugins/template/tests/functional/op_reference/group_normalization.cpp @@ -42,6 +42,7 @@ class ReferenceGroupNormalization : public testing::TestWithParam - HardSigmoidParams(const ov::PartialShape& shape, + HardSigmoidParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const std::vector& oValues, @@ -24,12 +24,12 @@ struct HardSigmoidParams { : pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(shape, iType, iValues)), + refData(CreateTensor(shape, iType, oValues)), alpha(alpha), beta(beta) {} - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -58,7 +58,7 @@ class ReferenceHardSigmoidLayerTest : public testing::TestWithParam CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& expected_output_type, const float alphaData, @@ -84,13 +84,13 @@ std::vector generateHardSigmoidFloatParams() { using T = typename element_type_traits::value_type; std::vector hardSigmoidParams{ - HardSigmoidParams(ov::PartialShape{3}, + HardSigmoidParams(ov::Shape{3}, IN_ET, std::vector{-1.0f, 0.0f, 1.0f}, std::vector{0.1f, 0.6f, 1.f}, 0.5, 0.6), - HardSigmoidParams(ov::PartialShape{2, 5}, + HardSigmoidParams(ov::Shape{2, 5}, IN_ET, std::vector{-3.0f, -1.0f, 0.0f, 1.0f, 3.0f, 0.5f, -0.2f, 6.0f, 8.0f, 0.1f}, std::vector{0.0f, 0.3f, 0.5f, 0.7f, 1.0f, 0.6f, 0.46f, 1.0f, 1.0f, 0.52f}, diff --git a/src/plugins/template/tests/functional/op_reference/hswish.cpp b/src/plugins/template/tests/functional/op_reference/hswish.cpp index 611a4258a3187d..14afe69e4090db 100644 --- a/src/plugins/template/tests/functional/op_reference/hswish.cpp +++ b/src/plugins/template/tests/functional/op_reference/hswish.cpp @@ -14,17 +14,17 @@ using namespace ov; namespace { struct HSwishParams { template - HSwishParams(const ov::PartialShape& shape, + HSwishParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const std::vector& oValues) : pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - refData(CreateTensor(iType, oValues)) {} + inputData(CreateTensor(shape, iType, iValues)), + refData(CreateTensor(shape, iType, oValues)) {} - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -49,7 +49,7 @@ class ReferenceHSwishLayerTest : public testing::TestWithParam, pu } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& HSwishected_output_type) { const auto in = std::make_shared(input_type, input_shape); @@ -67,11 +67,11 @@ std::vector generateHSwishFloatParams() { using T = typename element_type_traits::value_type; std::vector hSwishParams{ - HSwishParams(ov::PartialShape{2, 3}, + HSwishParams(ov::Shape{2, 3}, IN_ET, std::vector{1.f, 8.f, -8.f, 17.f, -0.5f, -1.f}, std::vector{0.66666667f, 8.f, 0.f, 17.f, -0.20833333f, -0.33333333f}), - HSwishParams(ov::PartialShape{2, 2, 1, 2}, + HSwishParams(ov::Shape{2, 2, 1, 2}, IN_ET, std::vector{0.1f, 0.6f, 20.f, -7.f, -5.3f, 3.5f, -9.f, 11.f}, std::vector{0.05166667f, 0.36f, 20.f, 0.f, 0.f, 3.5f, 0.f, 11.f})}; diff --git a/src/plugins/template/tests/functional/op_reference/idft.cpp b/src/plugins/template/tests/functional/op_reference/idft.cpp index f0e7b7063a5626..722f9c484a9c43 100644 --- a/src/plugins/template/tests/functional/op_reference/idft.cpp +++ b/src/plugins/template/tests/functional/op_reference/idft.cpp @@ -28,8 +28,8 @@ struct IDFTParams { m_expected_shape = expected_shape; m_input_type = input_type; m_expected_type = expected_type; - m_input_value = CreateTensor(input_type, input_value); - m_expected_value = CreateTensor(expected_type, expected_value); + m_input_value = CreateTensor(input_shape, input_type, input_value); + m_expected_value = CreateTensor(expected_shape, expected_type, expected_value); m_axes = axes; m_signal = signal; } @@ -1238,7 +1238,7 @@ std::vector generateParamsForIDFT() { NULL), // idft2d_signal_size_eval_1 IDFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{5, 6, 9, 2}, ET, ET, data_1, @@ -1256,7 +1256,7 @@ std::vector generateParamsForIDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{2}, {4, 6})), // idft2d_signal_size_eval_3 IDFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{3, 6, 4, 2}, ET, ET, data_1, @@ -1274,7 +1274,7 @@ std::vector generateParamsForIDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{2}, {4, 8})), // idft2d_signal_size_eval_5 IDFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{5, 6, 4, 2}, ET, ET, data_1, @@ -1283,7 +1283,7 @@ std::vector generateParamsForIDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{2}, {5, 4})), // idft3d_signal_size_eval IDFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{3, 7, 5, 2}, ET, ET, data_1, @@ -1292,7 +1292,7 @@ std::vector generateParamsForIDFT() { op::v0::Constant::create(element::Type_t::i64, Shape{3}, {3, 7, 5})), // idft1d_signal_size_eval IDFTParams(Shape{4, 6, 8, 2}, - Shape{4, 6, 8, 2}, + Shape{4, 7, 8, 2}, ET, ET, data_1, diff --git a/src/plugins/template/tests/functional/op_reference/interpolate.cpp b/src/plugins/template/tests/functional/op_reference/interpolate.cpp index fbf1f1337500ec..1363ae788a52d2 100644 --- a/src/plugins/template/tests/functional/op_reference/interpolate.cpp +++ b/src/plugins/template/tests/functional/op_reference/interpolate.cpp @@ -35,8 +35,8 @@ struct InterpolateV1Params { outShape(oShape), inType(iType), outType(oType), - inData(CreateTensor(iType, iValues)), - outData(CreateTensor(oType, oValues)), + inData(CreateTensor(iShape, iType, iValues)), + outData(CreateTensor(oShape, oType, oValues)), outShapeInput(outShapeInput) { attrs.axes = axes; attrs.mode = mode; @@ -72,8 +72,8 @@ struct InterpolateV4Params { outShape(oShape), inType(iType), outType(oType), - inData(CreateTensor(iType, iValues)), - outData(CreateTensor(oType, oValues)), + inData(CreateTensor(iShape, iType, iValues)), + outData(CreateTensor(oShape, oType, oValues)), outShapeInput(outShapeInput), outShapeInputType(outShapeInputType), scales(scales), @@ -823,8 +823,8 @@ class InterpolateV11TestParams { scales_data(scales_data), axes_data(axes_data), attrs(interp_attrs), - m_input_data(CreateTensor(inType, input_data)), - m_expected_result(CreateTensor(inType, expected_results)), + m_input_data(CreateTensor(input_data_shape, inType, input_data)), + m_expected_result(CreateTensor(output_shape, inType, expected_results)), inType(inType) { attrs.cube_coeff = cube_coeff_a; }; @@ -838,8 +838,8 @@ class InterpolateV11TestParams { scales_data(v4_params.scales_data), axes_data(v4_params.axes_data), attrs(v4_params.attrs), - m_input_data(CreateTensor(element::from(), v4_params.input_data)), - m_expected_result(CreateTensor(element::from(), v4_params.expected_results)), + m_input_data(CreateTensor(v4_params.input_data_shape, element::from(), v4_params.input_data)), + m_expected_result(CreateTensor(v4_params.output_shape, element::from(), v4_params.expected_results)), inType(element::from()){}; std::string test_name; @@ -1100,7 +1100,7 @@ std::vector generateParamsForInterpolate_bicubic_pil_i "bicubic.downsample_sizes_1x1x8x8_nchw", Shape{1, 1, 8, 8}, {4, 4}, - Shape{4, 4}, + Shape{1, 1, 4, 4}, {}, {2, 3}, {InterpolateMode::BICUBIC_PILLOW, ShapeCalcMode::SIZES, {0, 0}, {0, 0}}, @@ -1114,7 +1114,7 @@ std::vector generateParamsForInterpolate_bicubic_pil_i "bicubic.downsample_sizes_1x8x8x1_nhwc", Shape{1, 8, 8, 1}, {4, 4}, - Shape{4, 4}, + Shape{1, 4, 4, 1}, {}, {1, 2}, {InterpolateMode::BICUBIC_PILLOW, ShapeCalcMode::SIZES, {0, 0}, {0, 0}}, @@ -1268,7 +1268,7 @@ std::vector generateParamsForInterpolate_bilinear_pil_ "bilinear.downsample_to_2x3_2D_scales", Shape{5, 6}, {}, - Shape{2, 4}, + Shape{2, 3}, {0.4f, 0.6666f}, {0, 1}, {InterpolateMode::BILINEAR_PILLOW, ShapeCalcMode::SCALES, {0, 0}, {0, 0}}, diff --git a/src/plugins/template/tests/functional/op_reference/irdft.cpp b/src/plugins/template/tests/functional/op_reference/irdft.cpp index e10224b785ec56..36826ade32fb59 100644 --- a/src/plugins/template/tests/functional/op_reference/irdft.cpp +++ b/src/plugins/template/tests/functional/op_reference/irdft.cpp @@ -48,6 +48,7 @@ struct IRDFTParams { class ReferenceIRDFTLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); if (params.m_signal != NULL) { function = CreateFunctionWithSignal(params); @@ -762,4 +763,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_IRDFT_With_Hardcoded_Refs, ReferenceIRDFTLayerTest, ::testing::ValuesIn(generateCombinedParamsForIRDFT()), ReferenceIRDFTLayerTest::getTestCaseName); -} // namespace \ No newline at end of file +} // namespace diff --git a/src/plugins/template/tests/functional/op_reference/log_softmax.cpp b/src/plugins/template/tests/functional/op_reference/log_softmax.cpp index 59b53d7815b2e4..1c98ea3201e730 100644 --- a/src/plugins/template/tests/functional/op_reference/log_softmax.cpp +++ b/src/plugins/template/tests/functional/op_reference/log_softmax.cpp @@ -14,7 +14,7 @@ using namespace ov; namespace { struct LogSoftmaxParams { template - LogSoftmaxParams(const ov::PartialShape& shape, + LogSoftmaxParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const std::vector& oValues, @@ -23,12 +23,12 @@ struct LogSoftmaxParams { pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - refData(CreateTensor(iType, oValues)) {} + inputData(CreateTensor(shape, iType, iValues)), + refData(CreateTensor(shape, iType, oValues)) {} int64_t axis = 0; - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -54,7 +54,7 @@ class ReferenceLogSoftmaxLayerTest : public testing::TestWithParam CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& expected_output_type, const int64_t axis) { @@ -73,32 +73,32 @@ std::vector generateLogSoftmaxFloatParams() { using T = typename element_type_traits::value_type; std::vector logSoftmaxParams{ - LogSoftmaxParams(ov::PartialShape{1}, IN_ET, std::vector{1}, std::vector{0}, 0), - LogSoftmaxParams(ov::PartialShape{2, 4}, + LogSoftmaxParams(ov::Shape{1}, IN_ET, std::vector{1}, std::vector{0}, 0), + LogSoftmaxParams(ov::Shape{2, 4}, IN_ET, std::vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}, std::vector{-10000., -10000., -10000., -10000., 0., 0., 0., 0.}, 0), LogSoftmaxParams( - ov::PartialShape{2, 4}, + ov::Shape{2, 4}, IN_ET, std::vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}, std::vector< T>{-3.4401896, -2.4401896, -1.4401897, -0.4401897, -3.4401896, -2.4401896, -1.4401897, -0.4401897}, 1), LogSoftmaxParams( - ov::PartialShape{2, 4}, + ov::Shape{2, 4}, IN_ET, std::vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}, std::vector< T>{-3.4401896, -2.4401896, -1.4401897, -0.4401897, -3.4401896, -2.4401896, -1.4401897, -0.4401897}, -1), - LogSoftmaxParams(ov::PartialShape{2, 4}, + LogSoftmaxParams(ov::Shape{2, 4}, IN_ET, std::vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}, std::vector{-10000., -10000., -10000., -10000., 0., 0., 0., 0.}, -2), - LogSoftmaxParams(ov::PartialShape{3, 2, 3}, + LogSoftmaxParams(ov::Shape{3, 2, 3}, IN_ET, std::vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}, std::vector{-12.0024818, @@ -120,7 +120,7 @@ std::vector generateLogSoftmaxFloatParams() { -2.48181414e-03, -2.48181414e-03}, 0), - LogSoftmaxParams(ov::PartialShape{3, 2, 3}, + LogSoftmaxParams(ov::Shape{3, 2, 3}, IN_ET, std::vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}, std::vector{-3.04858735, @@ -142,7 +142,7 @@ std::vector generateLogSoftmaxFloatParams() { -0.04858735, -0.04858735}, 1), - LogSoftmaxParams(ov::PartialShape{3, 2, 3}, + LogSoftmaxParams(ov::Shape{3, 2, 3}, IN_ET, std::vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}, std::vector{-2.40760596, @@ -164,7 +164,7 @@ std::vector generateLogSoftmaxFloatParams() { -1.40760596, -0.40760596}, 2), - LogSoftmaxParams(ov::PartialShape{3, 2, 3}, + LogSoftmaxParams(ov::Shape{3, 2, 3}, IN_ET, std::vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}, std::vector{-2.40760596, @@ -186,7 +186,7 @@ std::vector generateLogSoftmaxFloatParams() { -1.40760596, -0.40760596}, -1), - LogSoftmaxParams(ov::PartialShape{3, 2, 3}, + LogSoftmaxParams(ov::Shape{3, 2, 3}, IN_ET, std::vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}, std::vector{-3.04858735, @@ -208,7 +208,7 @@ std::vector generateLogSoftmaxFloatParams() { -0.04858735, -0.04858735}, -2), - LogSoftmaxParams(ov::PartialShape{3, 2, 3}, + LogSoftmaxParams(ov::Shape{3, 2, 3}, IN_ET, std::vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}, std::vector{-12.0024818, diff --git a/src/plugins/template/tests/functional/op_reference/lrn.cpp b/src/plugins/template/tests/functional/op_reference/lrn.cpp index b87590b654485b..a19bc163af5ae8 100644 --- a/src/plugins/template/tests/functional/op_reference/lrn.cpp +++ b/src/plugins/template/tests/functional/op_reference/lrn.cpp @@ -31,8 +31,8 @@ struct LRNParams { m_expected_shape = expected_shape; m_input_type = input_type; m_expected_type = expected_type; - m_input_value = CreateTensor(input_type, input_value); - m_expected_value = CreateTensor(expected_type, expected_value); + m_input_value = CreateTensor(input_shape, input_type, input_value); + m_expected_value = CreateTensor(expected_shape, expected_type, expected_value); m_alpha = alpha; m_beta = beta; m_bias = bias; @@ -58,8 +58,8 @@ struct LRNParams { m_expected_type = expected_type; std::vector input_value(shape_size(input_shape)); std::iota(std::begin(input_value), std::end(input_value), input_value_step); - m_input_value = CreateTensor(input_type, input_value); - m_expected_value = CreateTensor(expected_type, expected_value); + m_input_value = CreateTensor(input_shape, input_type, input_value); + m_expected_value = CreateTensor(expected_shape, expected_type, expected_value); m_alpha = alpha; m_beta = beta; m_bias = bias; diff --git a/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp b/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp index a40406f4ccdbe5..da9f210a9fa26c 100644 --- a/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp +++ b/src/plugins/template/tests/functional/op_reference/lstm_cell.cpp @@ -50,6 +50,7 @@ struct Builder : ParamsBuilder { class ReferenceLSTMCellTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.X.data, params.H_t.data, params.C_t.data, params.W.data, params.R.data, params.B.data}; @@ -109,6 +110,7 @@ class ReferenceLSTMCellTest : public testing::TestWithParam, pub class ReferenceLSTMCellTestBiasDefaultAttrs : public ReferenceLSTMCellTest { public: void SetUp() override { + legacy_compare = true; threshold = 1e-1f; auto params = GetParam(); function = CreateFunction(params); @@ -142,6 +144,7 @@ class ReferenceLSTMCellTestBiasDefaultAttrs : public ReferenceLSTMCellTest { class ReferenceLSTMCellTestBiasClip : public ReferenceLSTMCellTest { public: void SetUp() override { + legacy_compare = true; threshold = 1e-1f; auto params = GetParam(); function = CreateFunction(params); @@ -240,6 +243,7 @@ class ReferenceLSTMCellV1TestBiasDefaultAttrs : public ReferenceLSTMCellTestBias class ReferenceLSTMCellV1TestBiasClip : public ReferenceLSTMCellTestBiasClip { public: void SetUp() override { + legacy_compare = true; threshold = 1e-1f; auto params = GetParam(); function = CreateFunction(params); diff --git a/src/plugins/template/tests/functional/op_reference/lstm_sequence.cpp b/src/plugins/template/tests/functional/op_reference/lstm_sequence.cpp index 9e13293e9ab6d0..fe9ad2ddde743f 100644 --- a/src/plugins/template/tests/functional/op_reference/lstm_sequence.cpp +++ b/src/plugins/template/tests/functional/op_reference/lstm_sequence.cpp @@ -176,6 +176,7 @@ struct LSTMSequenceV1Params { class ReferenceLSTMSequenceTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.X.data, @@ -243,6 +244,7 @@ class ReferenceLSTMSequenceTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.X.data, @@ -3485,4 +3487,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_LSTMSequence_With_Hardcoded_Refs, testing::ValuesIn(generateV1CombinedParams()), ReferenceLSTMSequenceV1Test::getTestCaseName); -} // namespace \ No newline at end of file +} // namespace diff --git a/src/plugins/template/tests/functional/op_reference/matmul.cpp b/src/plugins/template/tests/functional/op_reference/matmul.cpp index 8673a97be3de92..7a1d458274776c 100644 --- a/src/plugins/template/tests/functional/op_reference/matmul.cpp +++ b/src/plugins/template/tests/functional/op_reference/matmul.cpp @@ -34,9 +34,9 @@ struct MatMulParams { m_input_type1 = input_type1; m_input_type2 = input_type2; m_expected_type = expected_type; - m_input_value1 = CreateTensor(input_type1, input_value1); - m_input_value2 = CreateTensor(input_type2, input_value2); - m_expected_value = CreateTensor(expected_type, expected_value); + m_input_value1 = CreateTensor(input_shape1, input_type1, input_value1); + m_input_value2 = CreateTensor(input_shape2, input_type2, input_value2); + m_expected_value = CreateTensor(expected_shape, expected_type, expected_value); m_transpose1 = transpose1; m_transpose2 = transpose2; m_use_constant = use_constant; @@ -64,9 +64,9 @@ struct MatMulParams { std::vector input_value2(shape_size(input_shape2)); std::iota(std::begin(input_value1), std::end(input_value1), input_value_step); std::iota(std::begin(input_value2), std::end(input_value2), input_value_step); - m_input_value1 = CreateTensor(input_type1, input_value1); - m_input_value2 = CreateTensor(input_type2, input_value2); - m_expected_value = CreateTensor(expected_type, expected_value); + m_input_value1 = CreateTensor(input_shape1, input_type1, input_value1); + m_input_value2 = CreateTensor(input_shape2, input_type2, input_value2); + m_expected_value = CreateTensor(expected_shape, expected_type, expected_value); m_transpose1 = transpose1; m_transpose2 = transpose2; m_use_constant = use_constant; diff --git a/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp b/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp index 3469fc13947697..803fe39b86ed93 100644 --- a/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp +++ b/src/plugins/template/tests/functional/op_reference/matrix_nms.cpp @@ -41,6 +41,7 @@ struct MatrixNmsParams { class ReferenceMatrixNmsTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.boxes.data, params.scores.data}; diff --git a/src/plugins/template/tests/functional/op_reference/max_pool.cpp b/src/plugins/template/tests/functional/op_reference/max_pool.cpp index 80562649e9a0a9..0932af28aa69d7 100644 --- a/src/plugins/template/tests/functional/op_reference/max_pool.cpp +++ b/src/plugins/template/tests/functional/op_reference/max_pool.cpp @@ -60,6 +60,7 @@ struct MaxPoolParams { class ReferenceMaxPoolLayerTestV8 : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; const auto params = GetParam(); function = CreateFunction(params); inputData = {params.m_input_data}; @@ -425,6 +426,7 @@ INSTANTIATE_TEST_SUITE_P( class ReferenceMaxPoolLayerTestV14 : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; const auto params = GetParam(); function = CreateFunction(params); inputData = {params.m_input_data}; @@ -785,4 +787,4 @@ INSTANTIATE_TEST_SUITE_P( op::PadType::EXPLICIT, 3)), - ReferenceMaxPoolLayerTestV14::getTestCaseName); \ No newline at end of file + ReferenceMaxPoolLayerTestV14::getTestCaseName); diff --git a/src/plugins/template/tests/functional/op_reference/maximum.cpp b/src/plugins/template/tests/functional/op_reference/maximum.cpp index 5d165d16c2cdf7..2646e7496b1927 100644 --- a/src/plugins/template/tests/functional/op_reference/maximum.cpp +++ b/src/plugins/template/tests/functional/op_reference/maximum.cpp @@ -41,6 +41,7 @@ struct MaximumParams { class ReferenceMaximumLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.pshape1, params.pshape2, params.inType, params.outType); inputData = {params.inputData1, params.inputData2}; diff --git a/src/plugins/template/tests/functional/op_reference/memory.cpp b/src/plugins/template/tests/functional/op_reference/memory.cpp index 16aca8a84b259f..4c76ef03a260db 100644 --- a/src/plugins/template/tests/functional/op_reference/memory.cpp +++ b/src/plugins/template/tests/functional/op_reference/memory.cpp @@ -29,8 +29,8 @@ struct ReadValueAssignParams { m_output_shape(output_shape), m_input_type(input_type), m_output_type(ouput_type), - m_input_data(CreateTensor(input_type, input_values)), - m_expected_data(CreateTensor(ouput_type, output_values)), + m_input_data(CreateTensor(input_shape, input_type, input_values)), + m_expected_data(CreateTensor(output_shape, ouput_type, output_values)), m_variable_id(variable_id) {} Shape m_input_shape; Shape m_output_shape; @@ -298,6 +298,7 @@ class ReferenceMemoryTest : public testing::TestWithParam { i, 1e-2f, -1.f, + true, 0); } } diff --git a/src/plugins/template/tests/functional/op_reference/mish.cpp b/src/plugins/template/tests/functional/op_reference/mish.cpp index 338a78d6d7b147..18c48df95c2dcf 100644 --- a/src/plugins/template/tests/functional/op_reference/mish.cpp +++ b/src/plugins/template/tests/functional/op_reference/mish.cpp @@ -27,7 +27,7 @@ struct MishParams { inType(iType), outType(iType), inputData(CreateTensor(inputShape, iType, iValues)), - refData(CreateTensor(iType, oValues)), + refData(CreateTensor(inputShape, iType, oValues)), testcaseName(test_name) {} ov::PartialShape dynamicShape; @@ -42,6 +42,7 @@ struct MishParams { class ReferenceMishLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.dynamicShape, params.inType); inputData = {params.inputData}; diff --git a/src/plugins/template/tests/functional/op_reference/mod.cpp b/src/plugins/template/tests/functional/op_reference/mod.cpp index 24f2afc289e81e..0aa83511100300 100644 --- a/src/plugins/template/tests/functional/op_reference/mod.cpp +++ b/src/plugins/template/tests/functional/op_reference/mod.cpp @@ -15,8 +15,9 @@ namespace { struct ModParams { template - ModParams(const PartialShape& iShape1, - const PartialShape& iShape2, + ModParams(const Shape& iShape1, + const Shape& iShape2, + const Shape& oShape, const element::Type& iType, const std::vector& iValues1, const std::vector& iValues2, @@ -25,12 +26,12 @@ struct ModParams { pshape2(iShape2), inType(iType), outType(iType), - inputData1(CreateTensor(iType, iValues1)), - inputData2(CreateTensor(iType, iValues2)), - refData(CreateTensor(iType, oValues)) {} + inputData1(CreateTensor(iShape1, iType, iValues1)), + inputData2(CreateTensor(iShape2, iType, iValues2)), + refData(CreateTensor(oShape, iType, oValues)) {} - PartialShape pshape1; - PartialShape pshape2; + Shape pshape1; + Shape pshape2; element::Type inType; element::Type outType; ov::Tensor inputData1; @@ -58,8 +59,8 @@ class ReferenceModLayerTest : public testing::TestWithParam, public C } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -90,8 +91,8 @@ class ReferenceModInPlaceLayerTest : public testing::TestWithParam, p } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -115,32 +116,37 @@ template std::vector generateParamsForMod() { using T = typename element_type_traits::value_type; - std::vector params{ModParams(ov::PartialShape{1, 2}, - ov::PartialShape{1, 2}, + std::vector params{ModParams(ov::Shape{1, 2}, + ov::Shape{1, 2}, + ov::Shape{1, 2}, IN_ET, std::vector{256, 56}, std::vector{256, 56}, std::vector{0, 0}), - ModParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + ModParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{256, 56, 21, 14}, std::vector{112, 56, 6, 8}, std::vector{32, 0, 3, 6}), - ModParams(ov::PartialShape{1, 2}, - ov::PartialShape{3, 2, 2}, + ModParams(ov::Shape{1, 2}, + ov::Shape{3, 2, 2}, + ov::Shape{3, 2, 2}, IN_ET, std::vector{1, 2}, std::vector{5, 6, 7, 8, 2, 3, 1, 5, 6, 7, 1, 3}, std::vector{1, 2, 1, 2, 1, 2, 0, 2, 1, 2, 0, 2}), - ModParams(ov::PartialShape{1}, - ov::PartialShape{1}, + ModParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{57}, std::vector{13}, std::vector{5}), - ModParams(ov::PartialShape{2, 2}, - ov::PartialShape{1}, + ModParams(ov::Shape{2, 2}, + ov::Shape{1}, + ov::Shape{2, 2}, IN_ET, std::vector{2, 4, 7, 8}, std::vector{8}, @@ -152,8 +158,9 @@ template std::vector generateParamsForModNegative() { using T = typename element_type_traits::value_type; - std::vector params{ModParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{ModParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{-57, -14, -12, -6}, std::vector{13, -7, 5, -5}, @@ -165,8 +172,9 @@ template std::vector generateParamsForModInPlace() { using T = typename element_type_traits::value_type; - std::vector params{ModParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{ModParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{1, 2, 3, 4}, std::vector{5, 6, 7, 8}, diff --git a/src/plugins/template/tests/functional/op_reference/multiply.cpp b/src/plugins/template/tests/functional/op_reference/multiply.cpp index 7d44072876f353..feee485a9e5f9b 100644 --- a/src/plugins/template/tests/functional/op_reference/multiply.cpp +++ b/src/plugins/template/tests/functional/op_reference/multiply.cpp @@ -15,8 +15,9 @@ namespace { struct MultiplyParams { template - MultiplyParams(const PartialShape& iShape1, - const PartialShape& iShape2, + MultiplyParams(const Shape& iShape1, + const Shape& iShape2, + const Shape& oShape, const element::Type& iType, const std::vector& iValues1, const std::vector& iValues2, @@ -25,12 +26,12 @@ struct MultiplyParams { pshape2(iShape2), inType(iType), outType(iType), - inputData1(CreateTensor(iType, iValues1)), - inputData2(CreateTensor(iType, iValues2)), - refData(CreateTensor(iType, oValues)) {} + inputData1(CreateTensor(iShape1, iType, iValues1)), + inputData2(CreateTensor(iShape2, iType, iValues2)), + refData(CreateTensor(oShape, iType, oValues)) {} - PartialShape pshape1; - PartialShape pshape2; + Shape pshape1; + Shape pshape2; element::Type inType; element::Type outType; ov::Tensor inputData1; @@ -41,14 +42,14 @@ struct MultiplyParams { class ReferenceMultiplyLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { - auto params = GetParam(); + const auto& params = GetParam(); function = CreateFunction(params.pshape1, params.pshape2, params.inType, params.outType); inputData = {params.inputData1, params.inputData2}; refOutData = {params.refData}; } static std::string getTestCaseName(const testing::TestParamInfo& obj) { - auto param = obj.param; + const auto& param = obj.param; std::ostringstream result; result << "iShape1=" << param.pshape1 << "_"; result << "iShape2=" << param.pshape2 << "_"; @@ -58,8 +59,8 @@ class ReferenceMultiplyLayerTest : public testing::TestWithParam } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -78,14 +79,16 @@ template std::vector generateParamsForMultiply() { using T = typename element_type_traits::value_type; - std::vector params{MultiplyParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + std::vector params{MultiplyParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{1, 2, 3, 4}, std::vector{5, 6, 7, 8}, std::vector{5, 12, 21, 32}), - MultiplyParams(ov::PartialShape{1}, - ov::PartialShape{1}, + MultiplyParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{2}, std::vector{8}, @@ -97,8 +100,9 @@ template std::vector generateParamsForMultiplyFloat() { using T = typename element_type_traits::value_type; - std::vector params{MultiplyParams(ov::PartialShape{1}, - ov::PartialShape{1}, + std::vector params{MultiplyParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{3.1}, std::vector{8}, @@ -111,8 +115,9 @@ std::vector generateParamsForMultiplyWithBroadcast() { using T = typename element_type_traits::value_type; std::vector params{MultiplyParams( - ov::PartialShape{3, 2, 1}, - ov::PartialShape{1, 6}, + ov::Shape{3, 2, 1}, + ov::Shape{1, 6}, + ov::Shape{3, 2, 6}, IN_ET, std::vector{12, 24, 36, 48, 60, 72}, std::vector{1, 2, 3, 4, 6, 1}, @@ -128,8 +133,9 @@ std::vector generateParamsForMultiplyWithBroadcast::value_type; std::vector params{MultiplyParams( - ov::PartialShape{3, 2, 1}, - ov::PartialShape{1, 6}, + ov::Shape{3, 2, 1}, + ov::Shape{1, 6}, + ov::Shape{3, 2, 6}, IN_ET, std::vector{-12, -6, 4, 14, 18, 20}, std::vector{1, 2, 3, 4, 6, 1}, @@ -145,8 +151,9 @@ std::vector generateParamsForMultiplyWithBroadcast::value_type; std::vector params{MultiplyParams( - ov::PartialShape{3, 2, 1}, - ov::PartialShape{1, 6}, + ov::Shape{3, 2, 1}, + ov::Shape{1, 6}, + ov::Shape{3, 2, 6}, IN_ET, std::vector{12, 24, 36, 38, 40, 42}, std::vector{1, 2, 3, 4, 6, 1}, diff --git a/src/plugins/template/tests/functional/op_reference/nonzero.cpp b/src/plugins/template/tests/functional/op_reference/nonzero.cpp index 4f8b2db9137805..0f2cafcd820e00 100644 --- a/src/plugins/template/tests/functional/op_reference/nonzero.cpp +++ b/src/plugins/template/tests/functional/op_reference/nonzero.cpp @@ -42,6 +42,7 @@ struct NonZeroParams { class ReferenceNonZeroLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.dynamicShape, params.inType, params.refType); inputData = {params.inputData}; diff --git a/src/plugins/template/tests/functional/op_reference/normalize_l2.cpp b/src/plugins/template/tests/functional/op_reference/normalize_l2.cpp index b3c6308a4f25e1..d1624f4870ce7e 100644 --- a/src/plugins/template/tests/functional/op_reference/normalize_l2.cpp +++ b/src/plugins/template/tests/functional/op_reference/normalize_l2.cpp @@ -30,8 +30,8 @@ struct NormalizeL2Params { m_expected_shape = expected_shape; m_input_type = input_type; m_expected_type = expected_type; - m_input_value = CreateTensor(input_type, input_value); - m_expected_value = CreateTensor(expected_type, expected_value); + m_input_value = CreateTensor(input_shape, input_type, input_value); + m_expected_value = CreateTensor(expected_shape, expected_type, expected_value); m_axes = axes; m_eps_mode = eps_mode; m_eps = eps; @@ -55,8 +55,8 @@ struct NormalizeL2Params { m_expected_type = expected_type; std::vector input_value(shape_size(input_shape)); std::iota(begin(input_value), end(input_value), input_value_step); - m_input_value = CreateTensor(input_type, input_value); - m_expected_value = CreateTensor(expected_type, expected_value); + m_input_value = CreateTensor(input_shape, input_type, input_value); + m_expected_value = CreateTensor(expected_shape, expected_type, expected_value); m_axes = axes; m_eps_mode = eps_mode; m_eps = eps; diff --git a/src/plugins/template/tests/functional/op_reference/parameter_as_output.cpp b/src/plugins/template/tests/functional/op_reference/parameter_as_output.cpp index 5a9885c3f241cd..bc5e9813bb198c 100644 --- a/src/plugins/template/tests/functional/op_reference/parameter_as_output.cpp +++ b/src/plugins/template/tests/functional/op_reference/parameter_as_output.cpp @@ -25,8 +25,8 @@ struct ParameterParams { m_expected_shape(expected_shape), m_input_type(input_type), m_expected_type(expected_type), - m_input_value(CreateTensor(input_type, input_value)), - m_expected_value(CreateTensor(expected_type, expected_value)) {} + m_input_value(CreateTensor(input_shape, input_type, input_value)), + m_expected_value(CreateTensor(expected_shape, expected_type, expected_value)) {} Shape m_input_shape; Shape m_expected_shape; diff --git a/src/plugins/template/tests/functional/op_reference/power.cpp b/src/plugins/template/tests/functional/op_reference/power.cpp index 6055b4c16537e8..c5821ccc8f8b34 100644 --- a/src/plugins/template/tests/functional/op_reference/power.cpp +++ b/src/plugins/template/tests/functional/op_reference/power.cpp @@ -15,8 +15,9 @@ namespace { struct PowerParams { template - PowerParams(const PartialShape& iShape1, - const PartialShape& iShape2, + PowerParams(const Shape& iShape1, + const Shape& iShape2, + const Shape& oShape, const element::Type& iType, const std::vector& iValues1, const std::vector& iValues2, @@ -25,12 +26,12 @@ struct PowerParams { pshape2(iShape2), inType(iType), outType(iType), - inputData1(CreateTensor(iType, iValues1)), - inputData2(CreateTensor(iType, iValues2)), - refData(CreateTensor(iType, oValues)) {} + inputData1(CreateTensor(iShape1, iType, iValues1)), + inputData2(CreateTensor(iShape2, iType, iValues2)), + refData(CreateTensor(oShape, iType, oValues)) {} - PartialShape pshape1; - PartialShape pshape2; + Shape pshape1; + Shape pshape2; element::Type inType; element::Type outType; ov::Tensor inputData1; @@ -58,8 +59,8 @@ class ReferencePowerLayerTest : public testing::TestWithParam, publ } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -79,26 +80,30 @@ std::vector generateParamsForPower() { using T = typename element_type_traits::value_type; std::vector params{ - PowerParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + PowerParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{1, 2, 3, 5}, std::vector{2, 0, 6, 3}, std::vector{1, 1, 729, 125}), - PowerParams(ov::PartialShape{2, 1, 5}, - ov::PartialShape{2, 1}, + PowerParams(ov::Shape{2, 1, 5}, + ov::Shape{2, 1}, + ov::Shape{2, 2, 5}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, std::vector{1, 2}, std::vector{1, 2, 3, 4, 5, 1, 4, 9, 16, 25, 6, 7, 8, 9, 10, 36, 49, 64, 81, 100}), - PowerParams(ov::PartialShape{1}, - ov::PartialShape{1}, + PowerParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{2}, std::vector{3}, std::vector{8}), - PowerParams(ov::PartialShape{2, 2}, - ov::PartialShape{1}, + PowerParams(ov::Shape{2, 2}, + ov::Shape{1}, + ov::Shape{2, 2}, IN_ET, std::vector{2, 3, 4, 5}, std::vector{2}, diff --git a/src/plugins/template/tests/functional/op_reference/prelu.cpp b/src/plugins/template/tests/functional/op_reference/prelu.cpp index a3c88431a628eb..8540ae2bb34e5e 100644 --- a/src/plugins/template/tests/functional/op_reference/prelu.cpp +++ b/src/plugins/template/tests/functional/op_reference/prelu.cpp @@ -14,7 +14,7 @@ using namespace ov; namespace { struct PreluParams { template - PreluParams(const ov::PartialShape& shape, + PreluParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const std::vector& oValues, @@ -24,13 +24,13 @@ struct PreluParams { : pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(shape, iType, iValues)), + refData(CreateTensor(shape, iType, oValues)), negativeSlopeShape(slopeShape), - negativeSlope(CreateTensor(iType, negativeSlopeValues)), + negativeSlope(CreateTensor(slopeShape, iType, negativeSlopeValues)), testcaseName(test_name) {} - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -65,7 +65,7 @@ class ReferencePreluLayerTest : public testing::TestWithParam, publ } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const Shape& slope_shape, const element::Type& input_type) { const auto in = std::make_shared(input_type, input_shape); @@ -84,102 +84,102 @@ std::vector generatePreluFloatParams() { using T = typename element_type_traits::value_type; std::vector preluParams{ - PreluParams(ov::PartialShape{6}, + PreluParams(ov::Shape{6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6}, std::vector{1, 2, -6, -8, 5, 6}, ov::Shape{1}, std::vector{2}), - PreluParams(ov::PartialShape{6}, + PreluParams(ov::Shape{6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6}, std::vector{1, 2, -12, -20, 5, 6}, ov::Shape{6}, std::vector{2, 3, 4, 5, 6, 7}), - PreluParams(ov::PartialShape{3, 2}, + PreluParams(ov::Shape{3, 2}, IN_ET, std::vector{-2, 3, -2, 1, -1, 0}, std::vector{0, 3, 0, 1, 0, 0}, ov::Shape{2}, std::vector{0, 1}), - PreluParams(ov::PartialShape{2, 6}, + PreluParams(ov::Shape{2, 6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6, 7, 8, -9, -10, 11, 12}, std::vector{1, 2, -9, -16, 5, 6, 7, 8, -27, -40, 11, 12}, ov::Shape{6}, std::vector{1, 2, 3, 4, 5, 6}), - PreluParams(ov::PartialShape{3, 2}, + PreluParams(ov::Shape{3, 2}, IN_ET, std::vector{-1, -1, -1, -1, -1, -1}, std::vector{-2, -0.5, -2, -0.5, -2, -0.5}, ov::Shape{2}, std::vector{2, 0.5}, "C_2_const"), - PreluParams(ov::PartialShape{2, 2, 2}, + PreluParams(ov::Shape{2, 2, 2}, IN_ET, std::vector{-0.5, -2, -3, -4, -5, -6, -7, -8}, std::vector{0.25, 1, 6, 8, 2.5, 3, 14, 16}, ov::Shape{2}, std::vector{-0.5, -2}), - PreluParams(ov::PartialShape{3, 2}, + PreluParams(ov::Shape{3, 2}, IN_ET, std::vector{-2, 3, -2, 1, -1, 0}, std::vector{1, 3, 1, 1, 0.5, 0}, ov::Shape{2}, std::vector{-0.5, -1}, "negative_slope"), - PreluParams(ov::PartialShape{2, 6}, + PreluParams(ov::Shape{2, 6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6, 1, 2, -3, -4, 5, 6}, std::vector{1, 2, -6, -8, 5, 6, 1, 2, -12, -8, 5, 6}, ov::Shape{2, 6}, std::vector{2, 2, 2, 2, 2, 2, 1, 1, 4, 2, 1, 1}), - PreluParams(ov::PartialShape{2, 2, 2, 2}, + PreluParams(ov::Shape{2, 2, 2, 2}, IN_ET, std::vector{1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4}, std::vector{1, 2, -3, -8, 1, 2, -9, -16, 1, 2, -3, -8, 1, 2, -9, -16}, ov::Shape{2, 1, 2}, std::vector{1, 2, 3, 4}), - PreluParams(ov::PartialShape{2, 2, 2, 2}, + PreluParams(ov::Shape{2, 2, 2, 2}, IN_ET, std::vector{1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4}, std::vector{1, 2, -3, -8, 1, 2, -9, -16, 1, 2, -3, -8, 1, 2, -9, -16}, ov::Shape{1, 2, 1, 2}, std::vector{1, 2, 3, 4}), PreluParams( - ov::PartialShape{2, 2, 6}, + ov::Shape{2, 2, 6}, IN_ET, std::vector{1, 2, -3, -4, -5, 6, -1, -2, -3, -4, -5, -6, 1, 2, -3, -4, 5, 6, -2, 4, -6, -8, 10, 12}, std::vector{1, 2, -9, -16, -5, 6, -2, -2, -9, -16, -5, -42, 1, 2, -9, -16, 5, 6, -2, 4, -18, -32, 10, 12}, ov::Shape{2, 1, 6}, std::vector{2, 1, 3, 4, 1, 7, 1, 2, 3, 4, 5, 6}), - PreluParams(ov::PartialShape{2, 3, 2}, + PreluParams(ov::Shape{2, 3, 2}, IN_ET, std::vector{1, 2, -3, -4, -5, 6, -1, -2, -3, -4, -5, -6}, std::vector{1, 2, -9, -16, -5, 6, -1, -4, -9, -16, -25, -36}, ov::Shape{2, 3, 2}, std::vector{2, 1, 3, 4, 1, 7, 1, 2, 3, 4, 5, 6}), - PreluParams(ov::PartialShape{2, 1, 2}, + PreluParams(ov::Shape{2, 1, 2}, IN_ET, std::vector{-10, -10, -10, -10}, std::vector{-1, -100, -1, -100}, ov::Shape{2}, std::vector{0.1, 10}), - PreluParams(ov::PartialShape{1, 2, 1, 2}, + PreluParams(ov::Shape{1, 2, 1, 2}, IN_ET, std::vector{-10, -10, -10, -10}, std::vector{-1, -1, -100, -100}, ov::Shape{2}, std::vector{0.1, 10}), - PreluParams(ov::PartialShape{1, 5, 1, 1}, + PreluParams(ov::Shape{1, 5, 1, 1}, IN_ET, std::vector{-1, 0, -1, -1, -1}, std::vector{-1, 0, -3, -4, -5}, ov::Shape{5}, std::vector{1, 2, 3, 4, 5}), PreluParams( - ov::PartialShape{2, 3, 4, 5}, + ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., @@ -207,7 +207,7 @@ std::vector generatePreluFloatParams() { 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119}), PreluParams( - ov::PartialShape{2, 3, 4, 5}, + ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., @@ -226,7 +226,7 @@ std::vector generatePreluFloatParams() { ov::Shape{5}, std::vector{0, 1, 2, 3, 4}), PreluParams( - ov::PartialShape{2, 3, 4, 5}, + ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., @@ -245,7 +245,7 @@ std::vector generatePreluFloatParams() { ov::Shape{3}, std::vector{0, 1, 2}), PreluParams( - ov::PartialShape{2, 3, 4, 5}, + ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., @@ -271,70 +271,70 @@ std::vector generatePreluI8Params() { using T = typename element_type_traits::value_type; std::vector preluParams{ - PreluParams(ov::PartialShape{6}, + PreluParams(ov::Shape{6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6}, std::vector{1, 2, -6, -8, 5, 6}, ov::Shape{1}, std::vector{2}), - PreluParams(ov::PartialShape{6}, + PreluParams(ov::Shape{6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6}, std::vector{1, 2, -12, -20, 5, 6}, ov::Shape{6}, std::vector{2, 3, 4, 5, 6, 7}), - PreluParams(ov::PartialShape{3, 2}, + PreluParams(ov::Shape{3, 2}, IN_ET, std::vector{-2, 3, -2, 1, -1, 0}, std::vector{0, 3, 0, 1, 0, 0}, ov::Shape{2}, std::vector{0, 1}), - PreluParams(ov::PartialShape{2, 6}, + PreluParams(ov::Shape{2, 6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6, 7, 8, -9, -10, 11, 12}, std::vector{1, 2, -9, -16, 5, 6, 7, 8, -27, -40, 11, 12}, ov::Shape{6}, std::vector{1, 2, 3, 4, 5, 6}), - PreluParams(ov::PartialShape{2, 6}, + PreluParams(ov::Shape{2, 6}, IN_ET, std::vector{1, 2, -3, -4, 5, 6, 1, 2, -3, -4, 5, 6}, std::vector{1, 2, -6, -8, 5, 6, 1, 2, -12, -8, 5, 6}, ov::Shape{2, 6}, std::vector{2, 2, 2, 2, 2, 2, 1, 1, 4, 2, 1, 1}), - PreluParams(ov::PartialShape{2, 2, 2, 2}, + PreluParams(ov::Shape{2, 2, 2, 2}, IN_ET, std::vector{1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4}, std::vector{1, 2, -3, -8, 1, 2, -9, -16, 1, 2, -3, -8, 1, 2, -9, -16}, ov::Shape{2, 1, 2}, std::vector{1, 2, 3, 4}), - PreluParams(ov::PartialShape{2, 2, 2, 2}, + PreluParams(ov::Shape{2, 2, 2, 2}, IN_ET, std::vector{1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4, 1, 2, -3, -4}, std::vector{1, 2, -3, -8, 1, 2, -9, -16, 1, 2, -3, -8, 1, 2, -9, -16}, ov::Shape{1, 2, 1, 2}, std::vector{1, 2, 3, 4}), PreluParams( - ov::PartialShape{2, 2, 6}, + ov::Shape{2, 2, 6}, IN_ET, std::vector{1, 2, -3, -4, -5, 6, -1, -2, -3, -4, -5, -6, 1, 2, -3, -4, 5, 6, -2, 4, -6, -8, 10, 12}, std::vector{1, 2, -9, -16, -5, 6, -2, -2, -9, -16, -5, -42, 1, 2, -9, -16, 5, 6, -2, 4, -18, -32, 10, 12}, ov::Shape{2, 1, 6}, std::vector{2, 1, 3, 4, 1, 7, 1, 2, 3, 4, 5, 6}), - PreluParams(ov::PartialShape{2, 3, 2}, + PreluParams(ov::Shape{2, 3, 2}, IN_ET, std::vector{1, 2, -3, -4, -5, 6, -1, -2, -3, -4, -5, -6}, std::vector{1, 2, -9, -16, -5, 6, -1, -4, -9, -16, -25, -36}, ov::Shape{2, 3, 2}, std::vector{2, 1, 3, 4, 1, 7, 1, 2, 3, 4, 5, 6}), - PreluParams(ov::PartialShape{1, 5, 1, 1}, + PreluParams(ov::Shape{1, 5, 1, 1}, IN_ET, std::vector{-1, 0, -1, -1, -1}, std::vector{-1, 0, -3, -4, -5}, ov::Shape{5}, std::vector{1, 2, 3, 4, 5}), PreluParams( - ov::PartialShape{2, 3, 4, 5}, + ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -358,7 +358,7 @@ std::vector generatePreluI8Params() { 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119}), - PreluParams(ov::PartialShape{2, 3, 4, 5}, + PreluParams(ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -374,7 +374,7 @@ std::vector generatePreluI8Params() { -0, -1, -2, -3, -4, -0, -1, -2, -3, -4, -0, -1, -2, -3, -4, -0, -1, -2, -3, -4}, ov::Shape{5}, std::vector{0, 1, 2, 3, 4}), - PreluParams(ov::PartialShape{2, 3, 4, 5}, + PreluParams(ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -390,7 +390,7 @@ std::vector generatePreluI8Params() { -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2}, ov::Shape{3}, std::vector{0, 1, 2}), - PreluParams(ov::PartialShape{2, 3, 4, 5}, + PreluParams(ov::Shape{2, 3, 4, 5}, IN_ET, std::vector{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, diff --git a/src/plugins/template/tests/functional/op_reference/prior_box.cpp b/src/plugins/template/tests/functional/op_reference/prior_box.cpp index f59857af23a80e..687952ae23ad01 100644 --- a/src/plugins/template/tests/functional/op_reference/prior_box.cpp +++ b/src/plugins/template/tests/functional/op_reference/prior_box.cpp @@ -92,6 +92,7 @@ struct PriorBoxV8Params { class ReferencePriorBoxLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {}; @@ -123,6 +124,7 @@ class ReferencePriorBoxLayerTest : public testing::TestWithParam class ReferencePriorBoxV8LayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {}; diff --git a/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp b/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp index 11febb2294771b..2088b4e3dca8c9 100644 --- a/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp +++ b/src/plugins/template/tests/functional/op_reference/prior_box_clustered.cpp @@ -57,6 +57,7 @@ class ReferencePriorBoxClusteredLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.clsScoreData, params.bboxPredData, params.imageShapeData}; @@ -193,6 +194,7 @@ class ReferenceProposalV1LayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.clsScoreData, params.bboxPredData, params.imageShapeData}; diff --git a/src/plugins/template/tests/functional/op_reference/psroi_pooling.cpp b/src/plugins/template/tests/functional/op_reference/psroi_pooling.cpp index 6b96f5c266a148..80f7d2454629e0 100644 --- a/src/plugins/template/tests/functional/op_reference/psroi_pooling.cpp +++ b/src/plugins/template/tests/functional/op_reference/psroi_pooling.cpp @@ -72,6 +72,7 @@ struct PSROIPoolingParams { class ReferencePSROIPoolingLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.imageData, params.coordsData}; diff --git a/src/plugins/template/tests/functional/op_reference/range.cpp b/src/plugins/template/tests/functional/op_reference/range.cpp index 0ec5a05b0be413..ff04eeb1cc7b25 100644 --- a/src/plugins/template/tests/functional/op_reference/range.cpp +++ b/src/plugins/template/tests/functional/op_reference/range.cpp @@ -81,6 +81,7 @@ static std::shared_ptr CreateConstant(Shape& ishape, element:: class ReferenceRangeV0LayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.inShape, params.outShape, @@ -124,6 +125,7 @@ class ReferenceRangeV0LayerTest : public testing::TestWithParam, pu class ReferenceRangeV4LayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.inShape, params.outShape, diff --git a/src/plugins/template/tests/functional/op_reference/rdft.cpp b/src/plugins/template/tests/functional/op_reference/rdft.cpp index b959875ef0eede..571d7ca82edf4d 100644 --- a/src/plugins/template/tests/functional/op_reference/rdft.cpp +++ b/src/plugins/template/tests/functional/op_reference/rdft.cpp @@ -46,6 +46,7 @@ struct RDFTParams { class ReferenceRDFTLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); if (params.m_signal != NULL) { function = CreateFunctionWithSignal(params); diff --git a/src/plugins/template/tests/functional/op_reference/region_yolo.cpp b/src/plugins/template/tests/functional/op_reference/region_yolo.cpp index 3e12ab8e4384ef..8932e3cb7bc983 100644 --- a/src/plugins/template/tests/functional/op_reference/region_yolo.cpp +++ b/src/plugins/template/tests/functional/op_reference/region_yolo.cpp @@ -75,6 +75,7 @@ struct RegionYoloParams { class ReferenceRegionYoloLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = {params.inputData}; @@ -164,4 +165,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_RegionYolo_With_Hardcoded_Refs, testing::ValuesIn(generateRegionYoloCombinedParams()), ReferenceRegionYoloLayerTest::getTestCaseName); -} // namespace \ No newline at end of file +} // namespace diff --git a/src/plugins/template/tests/functional/op_reference/relu.cpp b/src/plugins/template/tests/functional/op_reference/relu.cpp index 97c29c683035f6..8aa75ea4f4c3bb 100644 --- a/src/plugins/template/tests/functional/op_reference/relu.cpp +++ b/src/plugins/template/tests/functional/op_reference/relu.cpp @@ -14,17 +14,17 @@ using namespace ov; namespace { struct ReluParams { template - ReluParams(const ov::PartialShape& shape, + ReluParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const std::vector& oValues) : pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - refData(CreateTensor(iType, oValues)) {} + inputData(CreateTensor(shape, iType, iValues)), + refData(CreateTensor(shape, iType, oValues)) {} - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -49,7 +49,7 @@ class ReferenceReluLayerTest : public testing::TestWithParam, public } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& Reluected_output_type) { const auto in = std::make_shared(input_type, input_shape); @@ -67,11 +67,11 @@ std::vector generateReluFloatParams() { using T = typename element_type_traits::value_type; std::vector reluParams{ - ReluParams(ov::PartialShape{2, 5}, + ReluParams(ov::Shape{2, 5}, IN_ET, std::vector{1, 8, -8, 17, -0.5, 1, 8, -8, 17, -0.5}, std::vector{1, 8, 0, 17, 0, 1, 8, 0, 17, 0}), - ReluParams(ov::PartialShape{2, 2, 2, 2}, + ReluParams(ov::Shape{2, 2, 2, 2}, IN_ET, std::vector{1, 8, -8, 17, -0.5, 1, 8, -8, 17, -0.5, 1, 8, -8, 17, -0.5, 1}, std::vector{1, 8, 0, 17, 0, 1, 8, 0, 17, 0, 1, 8, 0, 17, 0, 1})}; @@ -82,7 +82,7 @@ template std::vector generateReluIntParams() { using T = typename element_type_traits::value_type; - std::vector reluParams{ReluParams(ov::PartialShape{2, 5}, + std::vector reluParams{ReluParams(ov::Shape{2, 5}, IN_ET, std::vector{1, 8, -8, 17, -2, 1, 8, -8, 17, -1}, std::vector{1, 8, 0, 17, 0, 1, 8, 0, 17, 0})}; @@ -93,7 +93,7 @@ template std::vector generateReluUintParams() { using T = typename element_type_traits::value_type; - std::vector reluParams{ReluParams(ov::PartialShape{2, 5}, + std::vector reluParams{ReluParams(ov::Shape{2, 5}, IN_ET, std::vector{1, 8, 17, 1, 8, 17, 1, 8, 17, 0}, std::vector{1, 8, 17, 1, 8, 17, 1, 8, 17, 0})}; diff --git a/src/plugins/template/tests/functional/op_reference/reorg_yolo.cpp b/src/plugins/template/tests/functional/op_reference/reorg_yolo.cpp index 2a19633173adbf..6ac68f4c0b9621 100644 --- a/src/plugins/template/tests/functional/op_reference/reorg_yolo.cpp +++ b/src/plugins/template/tests/functional/op_reference/reorg_yolo.cpp @@ -21,7 +21,8 @@ namespace { struct ReorgYoloParams { template ReorgYoloParams(const ov::Strides& stride, - const ov::PartialShape& inputShape, + const ov::Shape& inputShape, + const ov::Shape& outputShape, const ov::element::Type& iType, const std::vector& oValues, const std::string& testcaseName = "") @@ -29,15 +30,15 @@ struct ReorgYoloParams { inputShape(inputShape), inType(iType), outType(iType), - refData(CreateTensor(iType, oValues)), + refData(CreateTensor(outputShape, iType, oValues)), testcaseName(testcaseName) { - std::vector iValues(shape_size(inputShape.get_shape())); + std::vector iValues(shape_size(inputShape)); std::iota(iValues.begin(), iValues.end(), 0); - inputData = CreateTensor(iType, iValues); + inputData = CreateTensor(inputShape, iType, iValues); } ov::Strides stride; - ov::PartialShape inputShape; + ov::Shape inputShape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -87,7 +88,8 @@ std::vector generateReorgYoloParams() { std::vector reorgYoloParams{ ReorgYoloParams({2}, - PartialShape{1, 8, 4, 4}, + Shape{1, 8, 4, 4}, + Shape{1, 32, 2, 2}, IN_ET, std::vector{0, 2, 4, 6, 16, 18, 20, 22, 32, 34, 36, 38, 48, 50, 52, 54, 64, 66, 68, 70, 80, 82, 84, 86, 96, 98, 100, 102, 112, 114, 116, 118, @@ -99,7 +101,8 @@ std::vector generateReorgYoloParams() { 73, 75, 77, 79, 89, 91, 93, 95, 105, 107, 109, 111, 121, 123, 125, 127}), ReorgYoloParams( {3}, - PartialShape{1, 9, 3, 3}, + Shape{1, 9, 3, 3}, + Shape{1, 81, 1, 1}, IN_ET, std::vector{0, 3, 6, 27, 30, 33, 54, 57, 60, 1, 4, 7, 28, 31, 34, 55, 58, 61, 2, 5, 8, 29, 32, 35, 56, 59, 62, 9, 12, 15, 36, 39, 42, 63, 66, 69, 10, 13, 16, 37, 40, 43, diff --git a/src/plugins/template/tests/functional/op_reference/reshape.cpp b/src/plugins/template/tests/functional/op_reference/reshape.cpp index b520f6f573c08a..861de521d2706e 100644 --- a/src/plugins/template/tests/functional/op_reference/reshape.cpp +++ b/src/plugins/template/tests/functional/op_reference/reshape.cpp @@ -105,6 +105,7 @@ struct ReshapeShuffleParams { class ReferenceReshapeLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; const auto params = GetParam(); function = CreateFunction(params.m_input_type, params.m_expected_type, @@ -146,6 +147,7 @@ class ReferenceReshapeShuffleLayerTest : public testing::TestWithParam generateReverseSeqParams() { 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}), reference_tests::Tensor({4}, element::i32, std::vector{1, 2, 1, 2}), reference_tests::Tensor( - {4, 3, 2, 2}, + {4, 2, 3, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 28, 29, 30, 31, 24, 25, 26, 27, 32, 33, 34, 35, 40, 41, 42, 43, diff --git a/src/plugins/template/tests/functional/op_reference/rnn_sequence.cpp b/src/plugins/template/tests/functional/op_reference/rnn_sequence.cpp index de19641733b55f..182e5a8f6cf5ea 100644 --- a/src/plugins/template/tests/functional/op_reference/rnn_sequence.cpp +++ b/src/plugins/template/tests/functional/op_reference/rnn_sequence.cpp @@ -84,6 +84,7 @@ struct RNNSequenceParams { class ReferenceRNNSequenceTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params); inputData = @@ -1065,4 +1066,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_RNNSequence_With_Hardcoded_Refs, testing::ValuesIn(generateCombinedParams()), ReferenceRNNSequenceTest::getTestCaseName); -} // namespace \ No newline at end of file +} // namespace diff --git a/src/plugins/template/tests/functional/op_reference/roi_pooling.cpp b/src/plugins/template/tests/functional/op_reference/roi_pooling.cpp index 013002234d2b9b..17727470a15800 100644 --- a/src/plugins/template/tests/functional/op_reference/roi_pooling.cpp +++ b/src/plugins/template/tests/functional/op_reference/roi_pooling.cpp @@ -73,6 +73,7 @@ struct ROIPoolingParams { class ReferenceRoiPoolingLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.inputH, params.inputW, diff --git a/src/plugins/template/tests/functional/op_reference/scatter_update.cpp b/src/plugins/template/tests/functional/op_reference/scatter_update.cpp index 693746168109fe..ba0ccb7456248e 100644 --- a/src/plugins/template/tests/functional/op_reference/scatter_update.cpp +++ b/src/plugins/template/tests/functional/op_reference/scatter_update.cpp @@ -239,7 +239,7 @@ std::vector generateScatterUpdate3Params(const ov::element .updates({{2, 2, 3, 2, 1}, numeric_type, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}}) .axis({{1}, integer_type, std::vector{1}}) - .expected({{2, 2, 2}, numeric_type, std::vector{1, 13, 0, 0, 2, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}), + .expected({{2, 2, 4}, numeric_type, std::vector{1, 13, 0, 0, 2, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}), Builder{} .data({{2, 4, 2}, numeric_type, std::vector{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}) .indices({{1, 2, 1}, integer_type, std::vector{0, 1}}) diff --git a/src/plugins/template/tests/functional/op_reference/select.cpp b/src/plugins/template/tests/functional/op_reference/select.cpp index 125337c3129199..2afd8bb0ec801f 100644 --- a/src/plugins/template/tests/functional/op_reference/select.cpp +++ b/src/plugins/template/tests/functional/op_reference/select.cpp @@ -46,6 +46,7 @@ struct SelectParams { class ReferenceSelectLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.data_type, params.broadcast, diff --git a/src/plugins/template/tests/functional/op_reference/sigmoid.cpp b/src/plugins/template/tests/functional/op_reference/sigmoid.cpp index f18165b1f4d29c..58d96242ef8aaf 100644 --- a/src/plugins/template/tests/functional/op_reference/sigmoid.cpp +++ b/src/plugins/template/tests/functional/op_reference/sigmoid.cpp @@ -14,17 +14,17 @@ using namespace ov; namespace { struct SigmoidParams { template - SigmoidParams(const ov::PartialShape& shape, + SigmoidParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const std::vector& oValues) : pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - refData(CreateTensor(iType, oValues)) {} + inputData(CreateTensor(shape, iType, iValues)), + refData(CreateTensor(shape, iType, oValues)) {} - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -49,7 +49,7 @@ class ReferenceSigmoidLayerTest : public testing::TestWithParam, } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& Sigmoidected_output_type) { const auto in = std::make_shared(input_type, input_shape); @@ -71,11 +71,11 @@ std::vector generateSigmoidFloatParams() { float sigma1 = 1.0f / (1.0f + std::exp(-x1)); float sigma2 = 1.0f / (1.0f + std::exp(-x2)); - std::vector sigmoidParams{SigmoidParams(ov::PartialShape{1, 1, 2, 2}, + std::vector sigmoidParams{SigmoidParams(ov::Shape{1, 1, 2, 2}, IN_ET, std::vector{x1, x2, x1, x2}, std::vector{sigma1, sigma2, sigma1, sigma2}), - SigmoidParams(ov::PartialShape{1, 1, 4}, + SigmoidParams(ov::Shape{1, 1, 4}, IN_ET, std::vector{x1, x2, x1, x2}, std::vector{sigma1, sigma2, sigma1, sigma2})}; @@ -87,8 +87,8 @@ std::vector generateSigmoidIntParams() { using T = typename element_type_traits::value_type; std::vector sigmoidParams{ - SigmoidParams(ov::PartialShape{1, 1, 2, 2}, IN_ET, std::vector{1, 4, -1, -4}, std::vector{1, 1, 0, 0}), - SigmoidParams(ov::PartialShape{1, 1, 4}, IN_ET, std::vector{1, 4, -1, -4}, std::vector{1, 1, 0, 0})}; + SigmoidParams(ov::Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 4, -1, -4}, std::vector{1, 1, 0, 0}), + SigmoidParams(ov::Shape{1, 1, 4}, IN_ET, std::vector{1, 4, -1, -4}, std::vector{1, 1, 0, 0})}; return sigmoidParams; } @@ -97,8 +97,8 @@ std::vector generateSigmoidUintParams() { using T = typename element_type_traits::value_type; std::vector sigmoidParams{ - SigmoidParams(ov::PartialShape{1, 1, 2, 2}, IN_ET, std::vector{1, 4, 1, 4}, std::vector{1, 1, 1, 1}), - SigmoidParams(ov::PartialShape{1, 1, 4}, IN_ET, std::vector{1, 4, 1, 4}, std::vector{1, 1, 1, 1})}; + SigmoidParams(ov::Shape{1, 1, 2, 2}, IN_ET, std::vector{1, 4, 1, 4}, std::vector{1, 1, 1, 1}), + SigmoidParams(ov::Shape{1, 1, 4}, IN_ET, std::vector{1, 4, 1, 4}, std::vector{1, 1, 1, 1})}; return sigmoidParams; } diff --git a/src/plugins/template/tests/functional/op_reference/slice.cpp b/src/plugins/template/tests/functional/op_reference/slice.cpp index 9e5ead831dd3cb..4915ceef28da67 100644 --- a/src/plugins/template/tests/functional/op_reference/slice.cpp +++ b/src/plugins/template/tests/functional/op_reference/slice.cpp @@ -94,6 +94,7 @@ class ReferenceSliceLayerTest : public testing::TestWithParam, publ result << "axes_shape=" << param.m_axes.shape << "_"; result << "axes_type=" << param.m_axes.type << "_"; } + result << param.m_test_name; return result.str(); } @@ -295,7 +296,7 @@ std::vector generateSliceParamsUnsigned() { reference_tests::Tensor{{5}, IND_ET, std::vector{1, 1, 1, 1, 1}}, reference_tests::Tensor{{5}, AXIS_ET, std::vector{0, 1, 2, 3, 4}}, reference_tests::Tensor{ - {2, 2, 2, 1, 2}, + {2, 4, 2, 2, 3}, DATA_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, diff --git a/src/plugins/template/tests/functional/op_reference/softmax.cpp b/src/plugins/template/tests/functional/op_reference/softmax.cpp index 73bb7e3015105b..65c51b25197e1c 100644 --- a/src/plugins/template/tests/functional/op_reference/softmax.cpp +++ b/src/plugins/template/tests/functional/op_reference/softmax.cpp @@ -18,7 +18,7 @@ using namespace ov; namespace { struct SoftmaxParams { template - SoftmaxParams(const ov::PartialShape& shape, + SoftmaxParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const std::vector& oValues, @@ -28,13 +28,13 @@ struct SoftmaxParams { pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), - refData(CreateTensor(iType, oValues)), + inputData(CreateTensor(shape, iType, iValues)), + refData(CreateTensor(shape, iType, oValues)), test_case_name(test_name) {} int64_t axis = 0; - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -66,7 +66,7 @@ class ReferenceSoftmaxLayerTest : public testing::TestWithParam, } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& expected_output_type, const int64_t axis) { @@ -110,7 +110,7 @@ std::vector generateSoftmaxFloatParams() { auto d2_of = expf(2) + expf(5); std::vector softmaxParams{ - SoftmaxParams(ov::PartialShape{2, 2, 3}, + SoftmaxParams(ov::Shape{2, 2, 3}, IN_ET, std::vector{-10, -20, -30, -40, -50, -60, -1, -2, -3, -4, -5, -6}, std::vector{expf(-10) / d0, @@ -127,7 +127,7 @@ std::vector generateSoftmaxFloatParams() { expf(-6) / d5}, 0, ""), - SoftmaxParams(ov::PartialShape{2, 3}, + SoftmaxParams(ov::Shape{2, 3}, IN_ET, std::vector{-10, -20, -30, -40, -50, -60}, std::vector{expf(-10) / d0_a1, @@ -138,7 +138,7 @@ std::vector generateSoftmaxFloatParams() { expf(-60) / d1_a1}, 1, ""), - SoftmaxParams(ov::PartialShape{2, 3}, + SoftmaxParams(ov::Shape{2, 3}, IN_ET, std::vector{-10, -20, -30, -40, -50, -60}, std::vector{expf(-10) / d0_a0, @@ -149,13 +149,13 @@ std::vector generateSoftmaxFloatParams() { expf(-60) / d2_a0}, 0, "test"), - SoftmaxParams(ov::PartialShape{1, 2, 3}, + SoftmaxParams(ov::Shape{1, 2, 3}, IN_ET, std::vector{-10, -20, -30, -40, -50, -60}, std::vector{1, 1, 1, 1, 1, 1}, 0, "trivial"), - SoftmaxParams(ov::PartialShape{2, 3}, + SoftmaxParams(ov::Shape{2, 3}, IN_ET, std::vector{low, 1, 2, 3, 4, 5}, std::vector{expf(low) / d0_uf, @@ -166,7 +166,7 @@ std::vector generateSoftmaxFloatParams() { expf(5) / d2_uf}, 0, "underflow"), - SoftmaxParams(ov::PartialShape{2, 3}, + SoftmaxParams(ov::Shape{2, 3}, IN_ET, std::vector{high, 1, 2, 3, 4, 5}, std::vector{expf(high - high) / d0_of, diff --git a/src/plugins/template/tests/functional/op_reference/squared_difference.cpp b/src/plugins/template/tests/functional/op_reference/squared_difference.cpp index fda71b9d14e965..b426754e018f8f 100644 --- a/src/plugins/template/tests/functional/op_reference/squared_difference.cpp +++ b/src/plugins/template/tests/functional/op_reference/squared_difference.cpp @@ -42,6 +42,7 @@ class ReferenceSquaredDifferenceLayerTest : public testing::TestWithParam - SubtractParams(const PartialShape& iShape1, - const PartialShape& iShape2, + SubtractParams(const Shape& iShape1, + const Shape& iShape2, + const Shape& oShape, const element::Type& iType, const std::vector& iValues1, const std::vector& iValues2, @@ -25,12 +26,12 @@ struct SubtractParams { pshape2(iShape2), inType(iType), outType(iType), - inputData1(CreateTensor(iType, iValues1)), - inputData2(CreateTensor(iType, iValues2)), - refData(CreateTensor(iType, oValues)) {} + inputData1(CreateTensor(iShape1, iType, iValues1)), + inputData2(CreateTensor(iShape2, iType, iValues2)), + refData(CreateTensor(oShape, iType, oValues)) {} - PartialShape pshape1; - PartialShape pshape2; + Shape pshape1; + Shape pshape2; element::Type inType; element::Type outType; ov::Tensor inputData1; @@ -58,8 +59,8 @@ class ReferenceSubtractLayerTest : public testing::TestWithParam } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape1, - const PartialShape& input_shape2, + static std::shared_ptr CreateFunction(const Shape& input_shape1, + const Shape& input_shape2, const element::Type& input_type, const element::Type& expected_output_type) { const auto in1 = std::make_shared(input_type, input_shape1); @@ -79,21 +80,24 @@ std::vector generateParamsForSubtract() { using T = typename element_type_traits::value_type; std::vector params{ - SubtractParams(ov::PartialShape{2, 2}, - ov::PartialShape{2, 2}, + SubtractParams(ov::Shape{2, 2}, + ov::Shape{2, 2}, + ov::Shape{2, 2}, IN_ET, std::vector{2, 4, 8, 16}, std::vector{1, 2, 4, 8}, std::vector{1, 2, 4, 8}), - SubtractParams(ov::PartialShape{3, 2, 1}, - ov::PartialShape{1, 6}, + SubtractParams(ov::Shape{3, 2, 1}, + ov::Shape{1, 6}, + ov::Shape{3, 2, 6}, IN_ET, std::vector{12, 24, 36, 48, 60, 72}, std::vector{1, 2, 3, 4, 6, 1}, std::vector{11, 10, 9, 8, 6, 11, 23, 22, 21, 20, 18, 23, 35, 34, 33, 32, 30, 35, 47, 46, 45, 44, 42, 47, 59, 58, 57, 56, 54, 59, 71, 70, 69, 68, 66, 71}), - SubtractParams(ov::PartialShape{1}, - ov::PartialShape{1}, + SubtractParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{8}, std::vector{2}, @@ -105,8 +109,9 @@ template std::vector generateParamsForSubtractFloat() { using T = typename element_type_traits::value_type; - std::vector params{SubtractParams(ov::PartialShape{1}, - ov::PartialShape{1}, + std::vector params{SubtractParams(ov::Shape{1}, + ov::Shape{1}, + ov::Shape{1}, IN_ET, std::vector{3.1}, std::vector{8}, diff --git a/src/plugins/template/tests/functional/op_reference/swish.cpp b/src/plugins/template/tests/functional/op_reference/swish.cpp index 95a72c66730049..5cc656bd2dde7f 100644 --- a/src/plugins/template/tests/functional/op_reference/swish.cpp +++ b/src/plugins/template/tests/functional/op_reference/swish.cpp @@ -14,14 +14,14 @@ using namespace ov; namespace { struct SwishParams { template - SwishParams(const ov::PartialShape& shape, + SwishParams(const ov::Shape& shape, const ov::element::Type& iType, const std::vector& iValues, const float beta = 1) : pshape(shape), inType(iType), outType(iType), - inputData(CreateTensor(iType, iValues)), + inputData(CreateTensor(shape, iType, iValues)), beta(beta) { std::vector oValues; std::vector output; @@ -36,13 +36,13 @@ struct SwishParams { for (auto element : output) oValues.push_back(static_cast(element)); - refData = CreateTensor(outType, oValues); + refData = CreateTensor(shape, outType, oValues); betaVector.push_back(static_cast(beta)); betaBlob = CreateTensor(inType, betaVector); } - ov::PartialShape pshape; + ov::Shape pshape; ov::element::Type inType; ov::element::Type outType; ov::Tensor inputData; @@ -79,7 +79,7 @@ class ReferenceSwishLayerTest : public testing::TestWithParam, publ } private: - static std::shared_ptr CreateFunction(const PartialShape& input_shape, + static std::shared_ptr CreateFunction(const Shape& input_shape, const element::Type& input_type, const element::Type& Swishected_output_type, const float beta) { @@ -104,9 +104,9 @@ std::vector generateSwishFloatParams() { using T = typename element_type_traits::value_type; std::vector swishParams{ - SwishParams(ov::PartialShape{2, 4}, IN_ET, std::vector{0.4, -5.7, -6, 3, -0.9, 23, 5, 3.3}, 0.6f), - SwishParams(ov::PartialShape{2, 3}, IN_ET, std::vector{1, 8, -8, 17, -0.5, -1}), - SwishParams(ov::PartialShape{2, 2, 1, 2}, IN_ET, std::vector{0.1, 0.6, 20, -7, -5.3, 3.5, -9, 11}, 0.33f)}; + SwishParams(ov::Shape{2, 4}, IN_ET, std::vector{0.4, -5.7, -6, 3, -0.9, 23, 5, 3.3}, 0.6f), + SwishParams(ov::Shape{2, 3}, IN_ET, std::vector{1, 8, -8, 17, -0.5, -1}), + SwishParams(ov::Shape{2, 2, 1, 2}, IN_ET, std::vector{0.1, 0.6, 20, -7, -5.3, 3.5, -9, 11}, 0.33f)}; return swishParams; } diff --git a/src/plugins/template/tests/functional/op_reference/tan.cpp b/src/plugins/template/tests/functional/op_reference/tan.cpp index 0258f35d47033a..7b54f9161dca1e 100644 --- a/src/plugins/template/tests/functional/op_reference/tan.cpp +++ b/src/plugins/template/tests/functional/op_reference/tan.cpp @@ -33,6 +33,7 @@ struct TanParams { class ReferenceTanLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; auto params = GetParam(); function = CreateFunction(params.pshape, params.inType); inputData = {params.inputData}; diff --git a/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp b/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp index 477585ce5a7319..a2b3d199adf1bc 100644 --- a/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp +++ b/src/plugins/template/tests/functional/op_reference/tensor_iterator.cpp @@ -86,6 +86,7 @@ class ReferenceTILayerTest : public testing::TestWithParam public: void SetUp() override { SKIP_IF_CURRENT_TEST_IS_DISABLED() + legacy_compare = true; auto params = GetParam(); function = params.function->create_function(params.inputs, params.expected_results); inputData.reserve(params.inputs.size()); @@ -483,6 +484,7 @@ class ReferenceTILayerStaticTest : public testing::TestWithParamcreate_function(params); if (params.body_type == TensorIteratorBodyType::LSTM) { diff --git a/src/plugins/template/tests/functional/op_reference/tile.cpp b/src/plugins/template/tests/functional/op_reference/tile.cpp index b48c55646b1ee4..01e66ee8574044 100644 --- a/src/plugins/template/tests/functional/op_reference/tile.cpp +++ b/src/plugins/template/tests/functional/op_reference/tile.cpp @@ -104,11 +104,11 @@ std::vector generateParams() { "tile_3d_to_3d_repeats_broadcast"), TileParams(reference_tests::Tensor(ET, {1}, std::vector{1}), reference_tests::Tensor(ET_INT, {3}, std::vector{0, 2, 3}), - reference_tests::Tensor(ET, {0}, std::vector{}), + reference_tests::Tensor(ET, {0, 2, 3}, std::vector{}), "tile_1d_to_3d_with_zero_on_axis_0"), TileParams(reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), reference_tests::Tensor(ET_INT, {3}, std::vector{2, 0, 3}), - reference_tests::Tensor(ET, {0}, std::vector{}), + reference_tests::Tensor(ET, {2, 0, 9}, std::vector{}), "tile_1d_to_3d_with_zero_on_axis_1"), }; return params; diff --git a/src/plugins/template/tests/functional/op_reference/transpose.cpp b/src/plugins/template/tests/functional/op_reference/transpose.cpp index 1f62406b56439f..0c335a3e0e0f06 100644 --- a/src/plugins/template/tests/functional/op_reference/transpose.cpp +++ b/src/plugins/template/tests/functional/op_reference/transpose.cpp @@ -153,7 +153,7 @@ std::vector generateTransposeParams() { 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}), reference_tests::Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), - reference_tests::Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, + reference_tests::Tensor(IN_ET, {3, 4, 2, 1}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24}), "transpose_axes_parameter_static_shapes"), // transpose_axes_parameter_dynamic_shapes @@ -163,7 +163,7 @@ std::vector generateTransposeParams() { 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}), reference_tests::Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), - reference_tests::Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, + reference_tests::Tensor(IN_ET, {3, 4, 2, 1}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24}), "transpose_axes_parameter_dynamic_shapes"), // transpose_int_data_axes_constant diff --git a/src/plugins/template/tests/functional/op_reference/unique.cpp b/src/plugins/template/tests/functional/op_reference/unique.cpp index 98b8efd1efcec6..494edb153bba91 100644 --- a/src/plugins/template/tests/functional/op_reference/unique.cpp +++ b/src/plugins/template/tests/functional/op_reference/unique.cpp @@ -57,6 +57,7 @@ struct UniqueParams { class ReferenceUniqueLayerTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { + legacy_compare = true; const auto& params = GetParam(); function = CreateFunction(params); inputData = {params.m_input_data}; diff --git a/src/plugins/template/tests/functional/op_reference/unsqueeze.cpp b/src/plugins/template/tests/functional/op_reference/unsqueeze.cpp index 742f19c59c7dcb..2955b965e13f8b 100644 --- a/src/plugins/template/tests/functional/op_reference/unsqueeze.cpp +++ b/src/plugins/template/tests/functional/op_reference/unsqueeze.cpp @@ -29,11 +29,11 @@ struct UnsqueezeParams { m_expected_shape(expected_shape), m_input_type(input_type), m_expected_type(expected_type), - m_input_value(CreateTensor(input_type, input_value)), - m_expected_value(CreateTensor(expected_type, expected_value)), + m_input_value(CreateTensor(input_shape, input_type, input_value)), + m_expected_value(CreateTensor(expected_shape, expected_type, expected_value)), m_axes_shape(axes_shape), m_axes_type(axes_type), - m_axes_value(CreateTensor(axes_type, axes_value)) {} + m_axes_value(CreateTensor(axes_shape, axes_type, axes_value)) {} Shape m_input_shape; Shape m_expected_shape; diff --git a/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp b/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp index a2512ba1285283..ab9b5f36312491 100644 --- a/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp +++ b/src/plugins/template/tests/functional/subgraph_reference/preprocess.cpp @@ -33,6 +33,7 @@ class ReferencePreprocessTest : public testing::TestWithParam