Commit 6f692ebd authored by turneram's avatar turneram
Browse files

Formatting

parent 35f709a2
...@@ -33,8 +33,8 @@ struct find_gelu_erf ...@@ -33,8 +33,8 @@ struct find_gelu_erf
{ {
static auto match_div() static auto match_div()
{ {
return match::name("div")( return match::name("div")(match::either_arg(0, 1)(
match::either_arg(0, 1)(match::any().bind("x"), match::skip_broadcasts(match::has_value(1.414f, 1e-3)))); match::any().bind("x"), match::skip_broadcasts(match::has_value(1.414f, 1e-3))));
} }
static auto match_erf() { return match::name("erf")(match::arg(0)(match_div())); } static auto match_erf() { return match::name("erf")(match::arg(0)(match_div())); }
...@@ -45,7 +45,10 @@ struct find_gelu_erf ...@@ -45,7 +45,10 @@ struct find_gelu_erf
match::either_arg(0, 1)(match_erf(), match::skip_broadcasts(match::has_value(1.0f)))); match::either_arg(0, 1)(match_erf(), match::skip_broadcasts(match::has_value(1.0f))));
} }
static auto match_mul() { return match::name("mul")(match::either_arg(0, 1)(match::any(), match_add())); } static auto match_mul()
{
return match::name("mul")(match::either_arg(0, 1)(match::any(), match_add()));
}
auto matcher() const auto matcher() const
{ {
...@@ -74,10 +77,7 @@ struct find_gelu_erf ...@@ -74,10 +77,7 @@ struct find_gelu_erf
} }
}; };
void rewrite_gelu::apply(module& m) const void rewrite_gelu::apply(module& m) const { match::find_matches(m, find_gelu_erf{}); }
{
match::find_matches(m, find_gelu_erf{});
}
} // namespace MIGRAPHX_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <migraphx/verify.hpp> #include <migraphx/verify.hpp>
TEST_CASE(bias_gelu) TEST_CASE(bias_gelu)
{ {
migraphx::shape s1{migraphx::shape::half_type, {2, 4, 8}}; migraphx::shape s1{migraphx::shape::half_type, {2, 4, 8}};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment