Commit e18aa2fa authored by Nick Korovaiko's avatar Nick Korovaiko Committed by Scott Cyphers

Remove extra checks from CPUAssigment (#1241)

* simplify inplace reshape

* relax check in emitter
parent fe894895
......@@ -1652,9 +1652,7 @@ namespace ngraph
void CPU_Emitter::EMITTER_DECL(ngraph::op::Reshape)
{
auto reshape = static_cast<const ngraph::op::Reshape*>(node);
auto annotation = reshape->get_op_annotations();
if (annotation && annotation->get_in_place_oi_pairs().size() > 0 &&
out[0].get_name() == args[0].get_name())
if (!reshape->get_is_transpose() && out[0].get_name() == args[0].get_name())
{
writer.block_begin();
writer << "// Stride change only, skipping.\n";
......
......@@ -548,13 +548,7 @@ namespace ngraph
// not in the memory pool, or has output users.
bool need_copy =
reshape->get_is_transpose() || arg->is_parameter() || arg->is_constant();
for (auto n = users.begin(); !need_copy && n != users.end(); ++n)
{
if ((*n)->is_output())
{
need_copy = true;
}
}
if (!need_copy)
{
// map output to the input memory
......
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