Unverified Commit 2f180f90 authored by Adam Procter's avatar Adam Procter Committed by GitHub

Merge pull request #2320 from NervanaSystems/krovatkin/memory_bug_fix1

Disable parameter propagation in MemoryLayout
parents d380f40e 3932d53e
......@@ -68,8 +68,10 @@ bool pass::MemoryLayout::run_on_function(shared_ptr<ngraph::Function> function)
// Non-destructive kernels can pass through if memory sharing is disabled
if ((node->liveness_free_list.count(input) != 0 ||
std::dynamic_pointer_cast<op::GetOutputElement>(node) ||
(m_disable_memory_sharing && !oi_pair.destructive)) &&
(m_disable_memory_sharing && !oi_pair.destructive &&
!input_node->is_parameter() && !input_node->is_constant())) &&
node->liveness_new_list.count(output) != 0)
{
NGRAPH_DEBUG << "Reusing " << input->get_name() << " for "
<< output->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