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

Handle Reshape's special zero in SimplifySecondInputOfReshape (#20785) #20820

Conversation

itikhono
Copy link
Contributor

@itikhono itikhono commented Nov 1, 2023

  • Handle Reshape's special zero in SimplifySecondInputOfReshape

Port (#20785) to Release branch

SimplifySecondInputOfReshape detects ShapeOf->Gather->Concat subgraphs on Reshape's second input and replaces ShapeOf->Gather with a Constant with zero(s). Currently it works only with Reshapes that have special_zero set to true, but it can work for Reshapes with special_zero == false if non-Gather inputs to Concat are Constants and don't contain any zero.

image

Now for special_zero == false case, the transformation checks that all inputs Constants to Concat don't contain 0 values and sets special_zero = true flag to Reshape operation.

Ticket: CVS-123434

…notoolkit#20785)

* Handle Reshape's special zero in SimplifySecondInputOfReshape

SimplifySecondInputOfReshape detects ShapeOf->Gather->Concat
subgraphs on Reshape's second input and replaces ShapeOf->Gather
with a Constant with zero(s). Currently it works only with Reshapes
that have special_zero set to true, but it can work for Reshapes
with special_zero == false if non-Gather inputs to Concat are Constants
and don't contain any zero.

Ticket: CVS-123434

* fix no default output
@itikhono itikhono requested a review from a team as a code owner November 1, 2023 14:44
@github-actions github-actions bot added the category: transformations OpenVINO Runtime library - Transformations label Nov 1, 2023
@itikhono itikhono added this to the 2023.2 milestone Nov 1, 2023
@andrei-kochin andrei-kochin merged commit cfd42bd into openvinotoolkit:releases/2023/2 Nov 2, 2023
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: transformations OpenVINO Runtime library - Transformations Code Freeze
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants