Skip to content

Commit

Permalink
[luci/quantize] modify tests without drop
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong8139 committed Aug 29, 2024
1 parent f01a1b5 commit bda5613
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion compiler/luci/service/src/Nodes/CircleQuantize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ luci::CircleNode *CloneNodeLet<CN::OPQR>::visit(const luci::CircleQuantize *)

loco::TensorShape sinf::Algorithm::visit(const luci::CircleQuantize *node)
{
const auto input_shape = sinf::circle_shape(loco::must_cast<CircleNode *>(node->input()));
const auto input = loco::must_cast<CircleNode *>(node->input());
const auto input_shape = sinf::circle_shape(input);
return input_shape;
}

Expand Down
10 changes: 3 additions & 7 deletions compiler/luci/service/src/Nodes/CircleQuantize.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ TEST(CloneNodeTest, clone_Quantize)

TEST(ShapeRuleTest, quantize_dynamic_shape)
{
luci::CircleQuantize quantize;
luci::CircleInput input;
luci::CircleQuantize quantize;

input.shape({1, 2, 3, 4});
input.shape_status(luci::ShapeStatus::VALID);
Expand All @@ -58,14 +58,12 @@ TEST(ShapeRuleTest, quantize_dynamic_shape)
ASSERT_EQ(2, shape.dim(1).value());
ASSERT_EQ(0, shape.dim(2).value());
ASSERT_EQ(4, shape.dim(3).value());

quantize.drop();
}

TEST(ShapeRuleTest, quantize_dynamic_shape_NEG)
TEST(ShapeRuleTest, quantize_shape_not_ready_NEG)
{
luci::CircleQuantize quantize;
luci::CircleInput input;
luci::CircleQuantize quantize;

input.shape_status(luci::ShapeStatus::UNDEFINED);
quantize.input(&input);
Expand All @@ -74,6 +72,4 @@ TEST(ShapeRuleTest, quantize_dynamic_shape_NEG)
luci::sinf::Rule shape_inf_rule;

ASSERT_FALSE(shape_inf_rule.infer(&quantize, shape));

quantize.drop();
}

0 comments on commit bda5613

Please sign in to comment.