Skip to content

Conversation

@hyunback
Copy link
Contributor

@hyunback hyunback commented Dec 25, 2025

Regression from #32236

There are some refactoring code in #32236
(Too many if-else branches with no rules in reorder fusion function, probably just added by many people over many times, so refactoring did clean up by primitive based)
But in refactoring, there are some mistake in quantize, it caused to change in reorder-fusion rule.

  • Previous refactoring:
    Do reorder fusion for quantize and reorder pattern
  • Refactoring
    Do reorder fusion for quantize and reorder pattern only quantize' s input format is plain.

Because this reason, the graph has been changed (Reorder is not fused now) and it causes unintentional use of onednn concat. It occurs the poor similarity issue.

This PR restores previous reorder-fusion pattern which was before refactoring so address the low similarity. And separate from the issue resolution, the onednn concat accuracy problem which was discovered accidentally due to the use of onednn concat, was issued by MFDNN-14504

Tickets:

  • 178661

@hyunback hyunback requested review from a team as code owners December 25, 2025 07:30
@hyunback hyunback added the category: GPU OpenVINO GPU plugin label Dec 25, 2025
@p-durandin p-durandin added this to the 2026.0 milestone Dec 26, 2025
@hyunback hyunback force-pushed the fix_modnet_webcam_portarit_matting_bad_acc branch from 8ecdb78 to d2e6e94 Compare December 29, 2025 09:06
@isanghao isanghao changed the title [GPU] Fix modnet_webcam_portarit_matting low similarity. [GPU] Fix modnet_webcam_portrait_matting low similarity. Dec 30, 2025
(fmt_prev == format::b_fs_yx_fsv4 &&
prev_output_layout.feature() % 32 == 0 &&
prev_output_layout.spatial(0) == 1 &&
prev_output_layout.spatial(1) == 1)) && is_input_reorder(prev, next))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random spot) the PR description is difficult to understand. Let's discuss offline.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • could you improve the PR description? I think the problem itself(problematic pattern) is not described enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

(fmt_prev == format::b_fs_yx_fsv4 &&
prev_output_layout.feature() % 32 == 0 &&
prev_output_layout.spatial(0) == 1 &&
prev_output_layout.spatial(1) == 1)) && is_input_reorder(prev, next))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • could you improve the PR description? I think the problem itself(problematic pattern) is not described enough.

if (fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::b_fs_zyx_fsv16 ||
fmt_next == format::bs_fs_yx_bsv16_fsv16 || fmt_next == format::b_fs_yx_fsv4)
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm not following the logic here. If cross-layout quantization is executed, performance drops. Then I think it is better to disable cross-layout. Does OneDNN concat selection happen because of the quantization behavior?

Copy link
Contributor Author

@hyunback hyunback Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the different graph because of quantize and reorder fusion causes to run onednn concat. onednn concat bad accuracy is not fixed yet.
I think this PR is for restoring refactoring mistake , so It seems better to proceed separately if need. Honestly, Perf improvement shows only for this model(so special) and basically leaving the reorder seems not good.

Copy link
Contributor

@isanghao isanghao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@isanghao isanghao added this pull request to the merge queue Jan 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2026
@p-durandin p-durandin added this pull request to the merge queue Jan 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2026
@p-durandin p-durandin added this pull request to the merge queue Jan 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2026
@p-durandin p-durandin added this pull request to the merge queue Jan 6, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 6, 2026
Regression from #32236

There are some refactoring code in
#32236
(Too many if-else branches with no rules in reorder fusion function,
probably just added by many people over many times, so refactoring did
clean up by primitive based)
But in refactoring, there are some mistake in quantize, it caused to
change in reorder-fusion rule.
- Previous refactoring:
Do reorder fusion for quantize and reorder pattern
- Refactoring
Do reorder fusion for quantize and reorder pattern only quantize' s
input format is plain.

Because this reason, the graph has been changed (Reorder is not fused
now) and it causes unintentional use of onednn concat. It occurs the
poor similarity issue.

This PR restores previous reorder-fusion pattern which was before
refactoring so address the low similarity. And separate from the issue
resolution, the onednn concat accuracy problem which was discovered
accidentally due to the use of onednn concat, was issued by [MFDNN-14504
](https://jira.devtools.intel.com/browse/MFDNN-14504)


### Tickets:
 - *178661*

Signed-off-by: hyunback <[email protected]>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2026
@hyunback hyunback added this pull request to the merge queue Jan 7, 2026
Merged via the queue into openvinotoolkit:master with commit a7b161a Jan 7, 2026
188 checks passed
@hyunback hyunback deleted the fix_modnet_webcam_portarit_matting_bad_acc branch January 7, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GPU OpenVINO GPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants