Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[Test] Fix test cases of Reduce node with empty input (#27849)

Chen Xu9b60600dda82
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 9b7ae687e9c..bffb0787333 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<std::vector<size_t>> input_shapes = {
const std::vector<std::vector<size_t>> input_shapes_0_dim = {
std::vector<size_t>{2, 0, 4, 1},
std::vector<size_t>{8, 0, 4, 0},
- std::vector<size_t>{0, 0, 0, 0},
+ std::vector<size_t>{2, 3, 4, 0},
};
const std::vector<std::vector<size_t>> input_shapes_one_axis = {
@@ -60,6 +60,11 @@ const std::vector<std::vector<int>> axes = {
{1, -1}
};
+const std::vector<std::vector<int>> axes_0_dim = {
+ {1, 3},
+ {0, 1, 3}
+};
+
std::vector<ov::test::utils::OpType> 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),