From 268f143dfd8213975ab8dbe8f43b85535e1e7efc Mon Sep 17 00:00:00 2001 From: Chen Xu Date: Wed, 4 Dec 2024 20:07:59 +0800 Subject: [PATCH] [Test] Fix test cases of Reduce node with empty input (#27849) ### Details: - *This is a fix about some of the test cases of https://github.com/openvinotoolkit/openvino/pull/27603. The test cases are modified so that all of them will cover the new added functionality in Reduce layer, i.e., input tensor is empty while output tensor is not empty.* The PR is cherry-picked from the last commit in https://github.com/openvinotoolkit/openvino/pull/27813. --- .../single_layer_tests/reduce_ops.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/reduce_ops.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/reduce_ops.cpp index 9b7ae687e9c81d..bffb0787333185 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/reduce_ops.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/reduce_ops.cpp @@ -32,7 +32,7 @@ const std::vector> input_shapes = { const std::vector> input_shapes_0_dim = { std::vector{2, 0, 4, 1}, std::vector{8, 0, 4, 0}, - std::vector{0, 0, 0, 0}, + std::vector{2, 3, 4, 0}, }; const std::vector> input_shapes_one_axis = { @@ -60,6 +60,11 @@ const std::vector> axes = { {1, -1} }; +const std::vector> axes_0_dim = { + {1, 3}, + {0, 1, 3} +}; + std::vector op_types = { ov::test::utils::OpType::SCALAR, ov::test::utils::OpType::VECTOR, @@ -174,7 +179,7 @@ const auto params_reduction_types = testing::Combine( ); const auto params_empty_input = testing::Combine( - testing::ValuesIn(axes), + testing::ValuesIn(axes_0_dim), testing::Values(op_types[1]), testing::ValuesIn(keep_dims), testing::ValuesIn(reduction_types),