Skip to content

Commit

Permalink
[luci/service] change test case
Browse files Browse the repository at this point in the history
Change TC to have direct relation with changed code.

ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
  • Loading branch information
icodo98 committed Sep 9, 2024
1 parent 553a758 commit fdf22cc
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions compiler/luci/service/src/Nodes/CirclePad.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,22 @@ TEST(ShapeRuleTest, pad_non_const_paddings)
ASSERT_EQ(0, shape.dim(3).value());
}

TEST(ShapeRuleTest, pad_without_input_NEG)
TEST(ShapeRuleTest, pad_empty_padding_NEG)
{
auto g = loco::make_graph();
auto node_pad = g->nodes()->create<luci::CirclePad>();

auto node_paddings = g->nodes()->create<luci::CircleConst>();
auto node_input = g->nodes()->create<luci::CircleInput>();
auto node_paddings = g->nodes()->create<luci::CircleAdd>();

loco::TensorShape shape;
luci::sinf::Rule shape_inf_rule;

node_paddings->dtype(loco::DataType::S64);
node_paddings->shape({4, 2});
node_paddings->shape_status(luci::ShapeStatus::VALID);

const loco::DataType S64 = loco::DataType::S64;
uint32_t t = 64 * 8;
node_paddings->size<S64>(t);
node_input->shape({1, 2, 3, 4});
node_input->shape_status(luci::ShapeStatus::VALID);
node_input->dim(2).unset();

node_pad->input(node_input);
node_pad->paddings(node_paddings);

ASSERT_ANY_THROW(shape_inf_rule.infer(node_pad, shape));
ASSERT_FALSE(shape_inf_rule.infer(node_pad, shape));
}

0 comments on commit fdf22cc

Please sign in to comment.