Skip to content

[Snippets][CPU] Used Plugin Reorder for weights repacking #31024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

a-sidorova
Copy link
Contributor

@a-sidorova a-sidorova commented Jun 18, 2025

Details:

  • Renamed RepackedInput to InputRepacker since this structure doesn't contain repacked data - it contains data and information for repacking
  • Fixed the pass FuseTransposeBrgemm - previously this imp calls matcher pass in callback which stores matched Transpose ops. It means that after Transpose elimination (fusing into Brgemm), this matcher pass prolongated life time of Transpose - the parent of Transpose still had this op in consumers
  • Implemented the data flow pass RepackMatMulWeights which calls Reorder::reorderData to align we plugin CPU dnnl impl. Locally launched tests with following settings: default (as it is), using blocked weights for all precision, using blocked shapes for second input of MatMuls if it is not constant (in MHA for example). All tests are passed.

Tickets:

  • 169331

@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Jun 18, 2025
@a-sidorova a-sidorova force-pushed the feature/snippets/use_reorder_for_weights branch 3 times, most recently from 86853be to 1bdd058 Compare June 19, 2025 08:20
@a-sidorova a-sidorova added this to the 2025.3 milestone Jun 19, 2025
@a-sidorova a-sidorova force-pushed the feature/snippets/use_reorder_for_weights branch from 1bdd058 to 2da7160 Compare June 19, 2025 10:04
@a-sidorova a-sidorova marked this pull request as ready for review June 19, 2025 10:15
@a-sidorova a-sidorova requested review from a team as code owners June 19, 2025 10:15
@a-sidorova a-sidorova force-pushed the feature/snippets/use_reorder_for_weights branch 2 times, most recently from 569bebe to 2a7d9ed Compare June 20, 2025 09:40
@a-sidorova a-sidorova force-pushed the feature/snippets/use_reorder_for_weights branch from e2c1dc4 to 2d339c4 Compare June 23, 2025 12:27
@a-sidorova a-sidorova requested a review from EgorDuplensky June 23, 2025 12:28
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@EgorDuplensky may I ask you to review dnnl_utils part which was updated after our offline discussion? Thank you in advance!

@a-sidorova a-sidorova force-pushed the feature/snippets/use_reorder_for_weights branch from 2d339c4 to 105ac58 Compare June 23, 2025 13:33
@a-sidorova a-sidorova requested a review from v-Golubev June 23, 2025 13:45
Copy link
Contributor

@v-Golubev v-Golubev left a comment

Choose a reason for hiding this comment

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

Good job 👍

@a-sidorova a-sidorova force-pushed the feature/snippets/use_reorder_for_weights branch from 105ac58 to 62afcda Compare June 24, 2025 05:08
@a-sidorova a-sidorova force-pushed the feature/snippets/use_reorder_for_weights branch from 62afcda to 837ab7c Compare June 26, 2025 04:57
@a-sidorova a-sidorova added this pull request to the merge queue Jun 26, 2025
Merged via the queue into openvinotoolkit:master with commit 2e2acdf Jun 26, 2025
209 checks passed
@a-sidorova a-sidorova deleted the feature/snippets/use_reorder_for_weights branch June 26, 2025 13:02
riverlijunjie pushed a commit to riverlijunjie/openvino-1 that referenced this pull request Jul 3, 2025
…olkit#31024)

### Details:
- *Renamed `RepackedInput` to `InputRepacker` since this structure
doesn't contain repacked data - it contains data and information for
repacking*
- *Fixed the pass `FuseTransposeBrgemm` - previously this imp calls
matcher pass in callback which stores matched `Transpose` ops. It means
that after `Transpose` elimination (fusing into `Brgemm`), this matcher
pass prolongated life time of `Transpose` - the parent of `Transpose`
still had this op in consumers*
- *Implemented the data flow pass `RepackMatMulWeights` which calls
`Reorder::reorderData` to align we plugin CPU dnnl impl. Locally
launched tests with following settings: default (as it is), using
blocked weights for all precision, using blocked shapes for second input
of MatMuls if it is not constant (in MHA for example). All tests are
passed.*

### Tickets:
 - *169331*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants