Commit cfdd207d authored by Paul's avatar Paul
Browse files

Fix convolution name

parent 97fd3c3b
......@@ -9,10 +9,10 @@
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
auto lit_broadcast() { return match::any_of(match::name("@literal"), match::name("broadcast")); }
auto lit_broadcast() { return match::any_of(match::is_constant(), match::name("broadcast")); }
auto not_lit_broadcast()
{
return match::none_of(match::name("@literal"), match::name("broadcast"));
return match::none_of(match::is_constant(), match::name("broadcast"));
}
auto op_lit_broadcast(std::string op, std::string x, std::string y)
{
......@@ -25,7 +25,7 @@ struct find_mul_conv
auto matcher() const
{
return match::name("mul")(match::either_arg(0, 1)(
match::name("conv")(match::used_once(),
match::name("convolution")(match::used_once(),
match::args(match::any(), match::is_constant().bind("w")))
.bind("conv"),
match::name("broadcast").bind("a")));
......
......@@ -115,7 +115,8 @@ TEST_CASE(simplify_mul_conv1)
p.add_instruction(pass_op{}, mul);
EXPECT(conv->outputs().front()->name() == "mul");
p.compile(simplify_algebra_target{});
EXPECT(conv->outputs().front()->name() != "mul");
auto new_conv = std::find_if(p.begin(), p.end(), [](auto&& ins) { return ins.name() == "convolution"; });
EXPECT(new_conv->outputs().front()->name() != "mul");
}
// TODO: Add test case
......
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