Skip to content
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

sink reshape for reorder+reshape+permute pattern opt #28183

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

songbell
Copy link
Contributor

@songbell songbell commented Dec 23, 2024

Details:

  • when looking at yolov6s, there is quite a lot of conv+reorder+reshape+permute pattern as below
    image
    convolution ([N,W,C,H], byxf) -> reorder ([N,W,C,H), bfyx) -> reshape [N, W, CxH], bfyx -> permute order (0, 2,1) to [N, CxH, W] bfyx, which is equivalent/alias to ([N,W,C,H] byxf), and this execution chain can be optimized
  • in this pr, we are sinking reshape to after permute if applicable, so that we can leverage existing optimizations like reorder/conv+permute to achieve overall opt

Tickets:

@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Dec 23, 2024
Signed-off-by: fishbell <[email protected]>
@songbell songbell changed the title Bell/fuse reorder reshape transpose optimize reorder+reshape+permute pattern if possible Dec 23, 2024
@songbell songbell force-pushed the bell/fuse_reorder_reshape_transpose branch 2 times, most recently from 8362209 to 5c077b4 Compare December 24, 2024 07:36
@songbell songbell changed the title optimize reorder+reshape+permute pattern if possible sink reshape for reorder+reshape+permute pattern opt Dec 24, 2024
@songbell songbell marked this pull request as ready for review December 24, 2024 07:49
@songbell songbell requested review from a team as code owners December 24, 2024 07:49
@songbell songbell force-pushed the bell/fuse_reorder_reshape_transpose branch from 5c077b4 to 58aafd5 Compare December 24, 2024 08:37
@songbell songbell force-pushed the bell/fuse_reorder_reshape_transpose branch 2 times, most recently from 68ba5b1 to d233d75 Compare December 25, 2024 03:27
Signed-off-by: fishbell <[email protected]>
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.

1 participant