Skip to content

Commit

Permalink
Add 5d and 6d cases to GroupNormalizationFusion tests + fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jhajducz committed Jan 16, 2025
1 parent f35e9c1 commit 45160a8
Showing 1 changed file with 48 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ template <element::Type_t T_act_elem,
element::Type_t T_gn_beta_elem = T_act_elem,
element::Type_t T_in_gamma_elem = T_act_elem,
element::Type_t T_in_beta_elem = T_act_elem>
class GroupNormalizationFusionTestsFixture
: public TestWithParam<ValuesContainerWithPositiveTestFlag> {
class GroupNormalizationFusionTestsFixture : public TestWithParam<ValuesContainerWithPositiveTestFlag> {
public:
static constexpr element::Type_t T_act_elem_t = T_act_elem;
static constexpr element::Type_t T_gn_gamma_elem_t = T_gn_gamma_elem;
Expand Down Expand Up @@ -343,18 +342,23 @@ std::vector<RawValuesContainer> valid_vals = {
Shape{1, 320, 1, 1},
1,
1e-5f),
std::make_tuple(PartialShape{1, 320, 2, 2},
std::make_tuple(PartialShape{1, 320, 2, 2, 2},
Shape{1, 320, 1},
Shape{1, 320, 1},
Shape{320, 1, 1},
Shape{320, 1, 1},
Shape{320, 1, 1, 1},
Shape{320, 1, 1, 1},
320,
1e-5f),
std::make_tuple(PartialShape{Dimension::dynamic(), 320, Dimension::dynamic(), Dimension::dynamic()},
std::make_tuple(PartialShape{Dimension::dynamic(),
320,
Dimension::dynamic(),
Dimension::dynamic(),
Dimension::dynamic(),
Dimension::dynamic()},
Shape{1, 320, 1},
Shape{1, 320, 1},
Shape{320, 1, 1},
Shape{320, 1, 1},
Shape{320, 1, 1, 1, 1},
Shape{320, 1, 1, 1, 1},
320,
1e-5f),
std::make_tuple(PartialShape{Dimension::dynamic(), 320},
Expand Down Expand Up @@ -394,42 +398,42 @@ std::vector<RawValuesContainer> valid_vals = {
64,
1e-6f)};

auto invalid_vals = Values(
std::make_tuple(false, PartialShape{1, 320}, Shape{}, Shape{}, Shape{}, Shape{}, 1, 1e-5f),
std::make_tuple(false,
PartialShape{1, 320, 2, 2},
Shape{1, 1, 1},
Shape{1, 1, 1},
Shape{1, 1, 1},
Shape{1, 1, 1, 1},
1,
1e-5f),
std::make_tuple(false, PartialShape{1, 320, 2, 2}, Shape{}, Shape{}, Shape{320, 1, 1}, Shape{}, 1, 1e-5f),
std::make_tuple(false, PartialShape{1, 320, 2, 2}, Shape{}, Shape{}, Shape{}, Shape{1, 320, 1, 1}, 1, 1e-5f),
std::make_tuple(false,
PartialShape{1, 320, 2, 2},
Shape{1, 1, 1},
Shape{1, 32, 1},
Shape{320, 1, 1},
Shape{320, 1, 1},
32,
1e-5f),
std::make_tuple(false,
PartialShape{1, 320, 2, 2},
Shape{1, 32, 1},
Shape{1, 1, 1},
Shape{320, 1, 1},
Shape{320, 1, 1},
32,
1e-5f),
std::make_tuple(false,
PartialShape{Dimension::dynamic(), 512, Dimension::dynamic(), Dimension::dynamic()},
Shape{},
Shape{},
Shape{1, 512, 1, 1},
Shape{1, 512, 1, 1},
100,
1e-6f));
auto invalid_vals =
Values(std::make_tuple(false, PartialShape{1, 320}, Shape{}, Shape{}, Shape{}, Shape{}, 1, 1e-5f),
std::make_tuple(false,
PartialShape{1, 320, 2, 2},
Shape{1, 1, 1},
Shape{1, 1, 1},
Shape{1, 1, 1},
Shape{1, 1, 1, 1},
1,
1e-5f),
std::make_tuple(false, PartialShape{1, 320, 2, 2}, Shape{}, Shape{}, Shape{320, 1, 1}, Shape{}, 1, 1e-5f),
std::make_tuple(false, PartialShape{1, 320, 2, 2}, Shape{}, Shape{}, Shape{}, Shape{1, 320, 1, 1}, 1, 1e-5f),
std::make_tuple(false,
PartialShape{1, 320, 2, 2},
Shape{1, 1, 1},
Shape{1, 32, 1},
Shape{320, 1, 1},
Shape{320, 1, 1},
32,
1e-5f),
std::make_tuple(false,
PartialShape{1, 320, 2, 2},
Shape{1, 32, 1},
Shape{1, 1, 1},
Shape{320, 1, 1},
Shape{320, 1, 1},
32,
1e-5f),
std::make_tuple(false,
PartialShape{Dimension::dynamic(), 512, Dimension::dynamic(), Dimension::dynamic()},
Shape{},
Shape{},
Shape{1, 512, 1, 1},
Shape{1, 512, 1, 1},
100,
1e-6f));

std::vector<ValuesContainerWithPositiveTestFlag> add_positive_test_flag_to_vals(
const bool positive_test,
Expand Down

0 comments on commit 45160a8

Please sign in to comment.