Skip to content

Commit

Permalink
[GPU] Small code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
p-durandin committed Aug 1, 2024
1 parent 5d849de commit ce77d64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/intel_gpu/src/graph/primitive_inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,12 @@ void primitive_inst::update_shape() {
for (size_t i = 0; i < _deps.size(); i++) {
auto idx = _deps[i].second;
auto new_shape = _deps[i].first->_impl_params->get_output_layout(idx);
if (_impl_params->get_input_layout(i) != new_shape) {
auto& old_shape = _impl_params->input_layouts[i];
if (old_shape != new_shape) {
GPU_DEBUG_TRACE_DETAIL << id() << ": update shape dep [" << i << "] : " << _deps[i].first->id()
<< " was: " << _impl_params->get_input_layout(i).to_short_string()
<< " now: " << new_shape.to_short_string() << std::endl;
_impl_params->input_layouts[i] = new_shape;
old_shape = new_shape;
input_shape_changed = true;
}
}
Expand Down Expand Up @@ -321,8 +322,7 @@ void primitive_inst::update_shape() {

if (input_shape_changed) {
set_shape_change();
}
else {
} else {
reset_shape_change();

// if input shape is not changed, loop doesn't need to update anything.
Expand Down

0 comments on commit ce77d64

Please sign in to comment.