Commit b324b9ed authored by Paul's avatar Paul
Browse files

Replace with literal

parent d01a5086
......@@ -86,8 +86,11 @@ void eliminate_contiguous::apply(program& p) const
}
else if(prev->can_eval())
{
auto c = p.insert_instruction(arg, op::contiguous{}, prev);
p.replace_instruction(arg, op::identity{}, c);
auto c = op::contiguous{};
auto r = c.compute(c.compute_shape({prev->get_shape()}), {prev->eval()});
auto l = p.add_literal(r.get_shape(), r.data());
p.replace_instruction(arg, l);
}
}
}
......
......@@ -62,8 +62,6 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
dead_code_elimination{},
eliminate_contiguous{},
dead_code_elimination{},
propagate_constant{},
dead_code_elimination{},
adjust_allocation{},
dead_code_elimination{},
fuse_ops{&ctx},
......
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