Skip to content

Commit

Permalink
skip all user format check when dynamic shape in get_preferred_format…
Browse files Browse the repository at this point in the history
…() to avoid endless recursive call (openvinotoolkit#18096)
  • Loading branch information
wilson-seok authored Jun 20, 2023
1 parent 429af27 commit 3519050
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,8 @@ format layout_optimizer::get_preferred_format(program_node& node) {
} else if (node.is_type<resample>()) {
// if the resample is in the last part of the network and there are no users using blocked format,
// it is better to reorder to bfyx before resample is done.
if (all_users_simple_format_until_output(node, node, 0, 10)) {
// Skip all user format check when node is dynamic. It could cause endless recursive call in get_preferred_foramt()
if (!node.is_dynamic() && all_users_simple_format_until_output(node, node, 0, 10)) {
const auto& dim = format::dimension(node.get_output_layout().format);
expected = format::get_default_format(dim, false, false);
} else {
Expand Down

0 comments on commit 3519050

Please sign in to comment.