Skip to content

Commit

Permalink
PropagatePrecision::get_precisions test #2
Browse files Browse the repository at this point in the history
  • Loading branch information
eshoguli committed Mar 11, 2023
1 parent 2a25280 commit 9d1714c
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ namespace snippets {
class PrecisionPropagationGetPrecisionsTest : public testing::Test {};

TEST_F(PrecisionPropagationGetPrecisionsTest, empty) {
ASSERT_EQ(std::vector<element::Type>{}, ngraph::snippets::pass::PropagatePrecision::get_precisions({}, {}));
ASSERT_EQ(std::vector<element::Type>{}, ngraph::snippets::pass::PropagatePrecision::get_precisions({}, {}));
}

TEST_F(PrecisionPropagationGetPrecisionsTest, selected) {
ASSERT_EQ(
std::vector<element::Type>({element::f32, element::f32}),
ngraph::snippets::pass::PropagatePrecision::get_precisions(
{ element::f32, element::f32 },
{
{element::bf16, element::bf16},
{element::f32, element::f32},
{element::i8, element::i8},
}));
ASSERT_EQ(
std::vector<element::Type>({element::f32, element::f32}),
ngraph::snippets::pass::PropagatePrecision::get_precisions(
{ element::f32, element::f32 },
{
{element::bf16, element::bf16},
{element::f32, element::f32},
{element::i8, element::i8},
}));
}

TEST_F(PrecisionPropagationGetPrecisionsTest, first) {
ASSERT_EQ(
std::vector<element::Type>({ element::bf16, element::bf16 }),
ngraph::snippets::pass::PropagatePrecision::get_precisions(
{ element::i32, element::i32 },
{
{element::bf16, element::bf16},
{element::f32, element::f32},
{element::i8, element::i8},
}));
ASSERT_EQ(
std::vector<element::Type>({ element::bf16, element::bf16 }),
ngraph::snippets::pass::PropagatePrecision::get_precisions(
{ element::i32, element::i32 },
{
{element::bf16, element::bf16},
{element::f32, element::f32},
{element::i8, element::i8},
}));
}

} // namespace snippets
Expand Down

0 comments on commit 9d1714c

Please sign in to comment.