Commit 740f5ba1 authored by Paul's avatar Paul
Browse files

Formatting

parent e2db5e20
......@@ -24,23 +24,23 @@ struct hip_add_relu
struct match_add_relu
{
auto matcher() const { return match::name("gpu::relu")(match::args(match::name("gpu::add").bind("add"))); }
auto matcher() const
{
return match::name("gpu::relu")(match::args(match::name("gpu::add").bind("add")));
}
void apply(program& p, match::matcher_result r) const
{
void apply(program& p, match::matcher_result r) const
{
auto add_ins = r.instructions["add"];
auto ins = r.result;
auto args = add_ins->inputs();
auto ins = r.result;
auto args = add_ins->inputs();
// Use the allocation from the relu operator
args.back() = ins->inputs().back();
p.replace_instruction(ins, hip_add_relu{}, args);
}
};
void fuse_ops::apply(program& p) const
{
match::find_matches(p, match_add_relu{});
}
void fuse_ops::apply(program& p) const { match::find_matches(p, match_add_relu{}); }
} // namespace gpu
......
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