Skip to content

Commit

Permalink
[GPU] fix memory conflict for multi iteration in loop. (#28503)
Browse files Browse the repository at this point in the history
### Details:
 - backport of #28487

### Tickets:
 - 158017

Co-authored-by: Xu, Jia3 <[email protected]>
  • Loading branch information
e-ddykim and timxu826 authored Jan 17, 2025
1 parent 4f4881f commit fcffe4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/intel_gpu/src/graph/primitive_inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2391,6 +2391,9 @@ memory::ptr primitive_inst::allocate_output(engine& _engine,
if (_node.is_in_shape_of_subgraph())
reusable_across_network = false;

if (reusable_across_network && _node.get_program().is_body_program() && is_output_buffer && runtime_alloc)
reusable_across_network = false;

// For outputs, cpu prim we want to have lockable alloc type
// Also if the successor of a node is an cpu, then memory needs to be lockable.
bool is_cpu = _node.get_selected_impl() ? _node.get_selected_impl()->is_cpu() :
Expand Down

0 comments on commit fcffe4a

Please sign in to comment.