"vscode:/vscode.git/clone" did not exist on "60fb332b66cea7d4bc2dcdb573f756277414f1a6"
Unverified Commit 1ca3c133 authored by kahmed10's avatar kahmed10 Committed by GitHub
Browse files

rename hip to gpu (#610)


Co-authored-by: default avatarmvermeulen <5479696+mvermeulen@users.noreply.github.com>
parent b61f5921
...@@ -451,7 +451,7 @@ struct find_add_clip ...@@ -451,7 +451,7 @@ struct find_add_clip
{ {
return match::name(std::unordered_set<std::string>{"gpu::clip", "gpu::clipped_relu"})( return match::name(std::unordered_set<std::string>{"gpu::clip", "gpu::clipped_relu"})(
match::arg(0)(match::any_of(match::name("gpu::add"), match::arg(0)(match::any_of(match::name("gpu::add"),
match::name("hip::triadd"), match::name("gpu::triadd"),
match::any_of[match::inputs()](match::standard_shape())) match::any_of[match::inputs()](match::standard_shape()))
.bind("add"))); .bind("add")));
} }
...@@ -470,7 +470,7 @@ struct find_add_clip ...@@ -470,7 +470,7 @@ struct find_add_clip
add_args.insert(add_args.end(), std::next(ins_args.begin()), ins_args.end()); add_args.insert(add_args.end(), std::next(ins_args.begin()), ins_args.end());
if(add_ins->name() == "gpu::add") if(add_ins->name() == "gpu::add")
p.replace_instruction(ins, hip_add_clip{}, add_args); p.replace_instruction(ins, hip_add_clip{}, add_args);
else if(add_ins->name() == "hip::triadd") else if(add_ins->name() == "gpu::triadd")
p.replace_instruction(ins, hip_triadd_clip{}, add_args); p.replace_instruction(ins, hip_triadd_clip{}, add_args);
} }
}; };
...@@ -485,7 +485,7 @@ struct find_add_unary ...@@ -485,7 +485,7 @@ struct find_add_unary
return match::name(op_name)(match::arg(0)( return match::name(op_name)(match::arg(0)(
match::used_once(), match::used_once(),
match::any_of(match::name("gpu::add"), match::any_of(match::name("gpu::add"),
match::name("hip::triadd"), match::name("gpu::triadd"),
match::any_of(match::name("@literal"), match::any_of(match::name("@literal"),
match::any_of[match::inputs()](match::standard_shape()))) match::any_of[match::inputs()](match::standard_shape())))
.bind("add"))); .bind("add")));
...@@ -503,7 +503,7 @@ struct find_add_unary ...@@ -503,7 +503,7 @@ struct find_add_unary
args.back() = ins->inputs().back(); args.back() = ins->inputs().back();
if(add_ins->name() == "gpu::add") if(add_ins->name() == "gpu::add")
p.replace_instruction(ins, binary_add_op, args); p.replace_instruction(ins, binary_add_op, args);
else if(add_ins->name() == "hip::triadd") else if(add_ins->name() == "gpu::triadd")
p.replace_instruction(ins, ternary_add_op, args); p.replace_instruction(ins, ternary_add_op, args);
} }
}; };
...@@ -569,7 +569,7 @@ struct find_mul_add_relu ...@@ -569,7 +569,7 @@ struct find_mul_add_relu
auto matcher() const auto matcher() const
{ {
return match::name("gpu::relu")( return match::name("gpu::relu")(
match::arg(0)(match::name("hip::mul_add")(match::used_once()).bind("mul_add"))); match::arg(0)(match::name("gpu::mul_add")(match::used_once()).bind("mul_add")));
} }
void apply(program& p, match::matcher_result r) const void apply(program& p, match::matcher_result r) const
......
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