"vscode:/vscode.git/clone" did not exist on "11a21a09bcc37da70daf1bfa92cb5ee586257935"
Commit 5d998fb2 authored by charlie's avatar charlie
Browse files

progress

parent 3c160a3f
......@@ -131,10 +131,24 @@ struct find_const_4in_slice
}
};
/**
* Find allocate into reshape instructions that can be simplified to a static reshape.
* Example:
* x = allocate(constant_dims) -> reshape(input_data, x)
*/
struct find_static_reshape
{
auto matcher const {return match::name("allocate")(match::nargs(1), }
};
void simplify_dyn_ops::apply(module& m) const
{
match::find_matches(
m, find_static_2in_broadcasts{}, find_const_3in_slice{}, find_const_4in_slice{});
match::find_matches(m,
find_static_2in_broadcasts{},
find_static_alloc_reshape,
find_const_3in_slice{},
find_const_4in_slice{});
match::find_matches(m, find_static_reshape);
}
} // namespace MIGRAPHX_INLINE_NS
......
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