Commit ae9803ad authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Add world's longest matcher to capture retinanet "filter"

Used to capture the input of the data from the reshape, to the greater operation
taken via indices. Should capture things via

gatherND <-reshape <- data
        \<-transpose <-nonzero <- greater <- indicies
parent c8808d34
...@@ -496,13 +496,16 @@ struct find_nonzero_gathernd_filter ...@@ -496,13 +496,16 @@ struct find_nonzero_gathernd_filter
auto matcher() const auto matcher() const
{ {
return match::name("gathernd")( return match::name("gathernd")(
match::args((match::arg(1)(match::name("transpose").bind("data"))))); match::args(match::name("reshape").bind("data"),
match::name("transpose")(match::args(match::arg(0)(match::name("nonzero")(
match::args(match::arg(0)(match::name("greater").bind("ind")))))))));
} }
void apply(module &m, const match::matcher_result& r) const void apply(module& m, const match::matcher_result& r) const
{ {
auto ins = r.result; auto ins = r.result;
auto reshape = r.instructions["data"]; auto data_input = r.instructions["data"];
auto index_input = r.instructions["ind"];
std::cout << "Beep" << std::endl; std::cout << "Beep" << std::endl;
} }
......
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