Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GPU] reset only part of max_output_layout_count (#37126)

Michal Miotk894ddbcccf07
diff --git a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp
index 539e69e7435..3aa0e1db570 100644
--- a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp
+++ b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp
@@ -983,7 +983,8 @@ void primitive_inst::realloc_outputs(bool prev_execution_skipped) {
}
};
if (can_be_optimized()) {
- _max_output_layout_count = _deps[0].first->_max_output_layout_count;
+ const auto dep_idx = _deps[0].second;
+ _max_output_layout_count[0] = _deps[0].first->_max_output_layout_count[static_cast<size_t>(dep_idx)];
GPU_DEBUG_PROFILED_STAGE_MEMALLOC_INFO("can_be_optimized");
// If the inst is optimized out but it executed at the previous iteration,
// reset all output memory of users which was optimized out at the previous iteration.