"docs/vscode:/vscode.git/clone" did not exist on "b8e31971e12a0675caa5d3cbfece43cf36b8dd07"
Commit a850f0bc authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Bad attempt at a matcher

This doesn't seem to match yet for the gathernd nonzero op.
parent 4418bf77
...@@ -491,6 +491,23 @@ struct find_resize ...@@ -491,6 +491,23 @@ struct find_resize
} }
}; };
struct find_nonzero_gathernd_filter
{
auto matcher() const
{
return match::name("gathernd")(
match::args((match::arg(1)(match::name("transpose").bind("data")))));
}
void apply(module &m, const match::matcher_result& r) const
{
auto ins = r.result;
auto reshape = r.instructions["data"];
std::cout << "Beep" << std::endl;
}
};
struct find_where_op struct find_where_op
{ {
auto matcher() const auto matcher() const
...@@ -804,6 +821,7 @@ void simplify_reshapes::apply(module& m) const ...@@ -804,6 +821,7 @@ void simplify_reshapes::apply(module& m) const
match::find_matches(m, match::find_matches(m,
find_where_op{}, find_where_op{},
find_resize{}, find_resize{},
find_nonzero_gathernd_filter{},
find_reshape_cont{}, find_reshape_cont{},
find_nop_reshapes{}, find_nop_reshapes{},
find_reshaper{}, find_reshaper{},
......
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