Skip to content

Commit 7da364d

Browse files
authored
[GPU] fix memory conflict for multi iteration in loop. (openvinotoolkit#28487)
Cause is shown in graph below. The black, green, and dotted line donates the primitive dependency, memory buffer reuse, and memory conflict (at the second iteration) respectively. The body of the loop is compiled as a separate model and is not aware the data reuse in backedge in multiple iteration. Tickets: [CVS-158017](https://jira.devtools.intel.com/browse/CVS-158017)
1 parent 08d8755 commit 7da364d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/plugins/intel_gpu/src/graph/primitive_inst.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -2391,6 +2391,9 @@ memory::ptr primitive_inst::allocate_output(engine& _engine,
23912391
if (_node.is_in_shape_of_subgraph())
23922392
reusable_across_network = false;
23932393

2394+
if (reusable_across_network && _node.get_program().is_body_program() && is_output_buffer && runtime_alloc)
2395+
reusable_across_network = false;
2396+
23942397
// For outputs, cpu prim we want to have lockable alloc type
23952398
// Also if the successor of a node is an cpu, then memory needs to be lockable.
23962399
bool is_cpu = _node.get_selected_impl() ? _node.get_selected_impl()->is_cpu() :

0 commit comments

Comments
 (0)