"ts/webui/src/vscode:/vscode.git/clone" did not exist on "c55300df843ee3f85fd311807a434ee3e812af59"
Commit d7d84f55 authored by Paul's avatar Paul
Browse files

Formatting

parent d673e0c4
......@@ -185,7 +185,8 @@ struct match_add_relu
{
auto matcher() const
{
return match::name("gpu::relu")(match::arg(0)(match::any_of(match::name("gpu::add"), match::name("hip::triadd")).bind("add")));
return match::name("gpu::relu")(match::arg(0)(
match::any_of(match::name("gpu::add"), match::name("hip::triadd")).bind("add")));
}
void apply(program& p, match::matcher_result r) const
......@@ -206,14 +207,15 @@ struct match_triadd
{
auto matcher() const
{
return match::name("gpu::add")(match::either_arg(0, 1)(match::name("gpu::add").bind("add"), match::any().bind("input")));
return match::name("gpu::add")(match::either_arg(0, 1)(match::name("gpu::add").bind("add"),
match::any().bind("input")));
}
void apply(program& p, match::matcher_result r) const
{
auto add_ins = r.instructions["add"];
auto input_ins = r.instructions["input"];
auto ins = r.result;
auto add_ins = r.instructions["add"];
auto input_ins = r.instructions["input"];
auto ins = r.result;
auto args = add_ins->inputs();
auto is_broadcasted = [](auto arg) { return arg->get_shape().broadcasted(); };
if(std::count_if(args.begin(), args.end(), is_broadcasted) > 1)
......
......@@ -10,7 +10,10 @@ namespace device {
void add_relu(const argument& result, const argument& arg1, const argument& arg2);
void add_relu(const argument& result, const argument& arg1, const argument& arg2, const argument& arg3);
void add_relu(const argument& result,
const argument& arg1,
const argument& arg2,
const argument& arg3);
} // namespace device
} // 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