Unverified Commit 861847d5 authored by Matthew Brookhart's avatar Matthew Brookhart Committed by GitHub

don't propagate outputs inplace to constants (#1399)

* don't propagate outputs inplace to constants

* apply formatting

* refactor for style-check

* fix typo
parent 070ea46c
......@@ -1035,8 +1035,9 @@ void runtime::cpu::CPU_ExternalFunction::propagate_in_place_output(
{
size_t input_index = oi_pair.input;
auto& input_tensor = arg->get_inputs().at(input_index).get_tensor();
if (input_tensor.get_pool_offset() == offset &&
!arg->get_inputs().at(input_index).get_output().get_node()->is_parameter())
auto tmp_node = arg->get_inputs().at(input_index).get_output().get_node();
if (input_tensor.get_pool_offset() == offset && !tmp_node->is_parameter() &&
!tmp_node->is_constant())
{
NGRAPH_DEBUG << "Reusing " << output_name << " for "
<< input_tensor.get_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