Skip to content

Commit

Permalink
[Test] Fix test cases of Reduce node with empty input (#27849)
Browse files Browse the repository at this point in the history
### Details:
- *This is a fix about some of the test cases of
#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
#27813.
  • Loading branch information
xuchen-intel authored Dec 4, 2024
1 parent c69e5d7 commit 268f143
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 268f143

Please sign in to comment.