Commit a9872038 authored by Paul's avatar Paul
Browse files

Fix kernel name

parent 22c92a19
......@@ -346,9 +346,11 @@ static std::vector<std::string> get_op_names(const module& m)
return result;
}
std::string generate_name_from_ops(const module& m)
std::string generate_name_from_ops(const module& m, const std::string& postname)
{
auto op_names = get_op_names(m);
if(not postname.empty())
op_names.push_back(postname);
return join_strings(op_names, "_");
}
......
......@@ -76,7 +76,7 @@ std::string generate_pointwise(const module& pm, const std::string& name);
std::string generate_reduce(const module& m, const std::string& name);
std::string generate_name_from_ops(const module& m);
std::string generate_name_from_ops(const module& m, const std::string& postname = "");
struct reduce_op
{
......
......@@ -104,7 +104,7 @@ struct pointwise_compiler : compiler<pointwise_compiler>
auto* pm = ins->module_inputs().front();
auto pf = generate_pointwise(*pm, "inner_pointwise");
std::string lambda = "MIGRAPHX_LIFT(inner_pointwise)";
auto kernel_name = generate_name_from_ops(*pm) + "_kernel";
auto kernel_name = generate_name_from_ops(*pm, "kernel");
return compile_op(ctx,
to_shapes(ins->inputs()),
{{"lambda", lambda}, {"preamble", pf}, {"kernel", kernel_name}});
......
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