"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "70009bccc9ab9a3cd1512167d9a6b0b7f72cfbc3"
Commit 8e49a9f2 authored by Paul's avatar Paul
Browse files

Format

parent 407acb7d
......@@ -148,10 +148,10 @@ struct pointwise_compiler : compiler<pointwise_compiler>
compiler_replace compile(context& ctx, instruction_ref ins, const operation& op) const
{
if (op.name() == "contiguous")
if(op.name() == "contiguous")
{
return replace(
compile_op(ctx, to_shapes(ins->inputs()), {{"lambda", "[](auto x) { return x; }"}}));
return replace(compile_op(
ctx, to_shapes(ins->inputs()), {{"lambda", "[](auto x) { return x; }"}}));
}
else
{
......@@ -169,13 +169,14 @@ struct pointwise_compiler : compiler<pointwise_compiler>
g.add_point_op("greater", "migraphx::abs(${0} > ${1})");
g.add_point_op("not", "migraphx::abs(not ${0})");
// Add explict conversions
g.fresult(
[](const shape& s) { return "migraphx::convert<" + shape::cpp_type(s.type()) + ">"; });
g.fresult([](const shape& s) {
return "migraphx::convert<" + shape::cpp_type(s.type()) + ">";
});
auto name = g.create_function(
g.generate_module(*pm).set_attributes({"__device__"}).set_generic_types(*pm));
std::string lambda = "MIGRAPHX_LIFT(" + name + ")";
return replace(
compile_op(ctx, to_shapes(ins->inputs()), {{"lambda", lambda}, {"preamble", g.str()}}));
return replace(compile_op(
ctx, to_shapes(ins->inputs()), {{"lambda", lambda}, {"preamble", g.str()}}));
}
}
};
......
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