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

Avoid Constant data copy inside Reshape constant folding #6410

Conversation

GlebKazantaev
Copy link
Contributor

@GlebKazantaev GlebKazantaev commented Jun 28, 2021

Description

This change optimizes Reshape operation constant folding. In more cases Constant which goes to Reshape has more than one consumer (because we make function copy with shared constants) so the previous optimization wasn't efficient in most cases. But with this changes we don't make Constant data copy anymore because we now create Constant with shared data but with different shape.

@GlebKazantaev GlebKazantaev force-pushed the gkazanta/const_reshape_optimization branch from e2e6347 to 72d58e9 Compare July 27, 2021 11:29
@GlebKazantaev GlebKazantaev marked this pull request as ready for review July 27, 2021 15:18
@GlebKazantaev GlebKazantaev requested a review from a team July 27, 2021 15:18
@GlebKazantaev GlebKazantaev force-pushed the gkazanta/const_reshape_optimization branch from c980aea to 0878007 Compare July 27, 2021 15:19
@jane-intel
Copy link
Contributor

Lets make it for (Un)Squeeze too

@GlebKazantaev GlebKazantaev force-pushed the gkazanta/const_reshape_optimization branch from 0878007 to e173a02 Compare July 28, 2021 13:16
@GlebKazantaev GlebKazantaev requested a review from ilyachur July 28, 2021 13:16
@GlebKazantaev GlebKazantaev added the enhancement New feature or request label Jul 28, 2021
@GlebKazantaev GlebKazantaev requested a review from jane-intel July 28, 2021 13:56
@GlebKazantaev GlebKazantaev requested a review from a team July 28, 2021 15:12
@ilyachur ilyachur added this to the 2022.1 milestone Jul 29, 2021
@ilyachur ilyachur added the category: Core OpenVINO Core (aka ngraph) label Jul 29, 2021
@GlebKazantaev GlebKazantaev merged commit 0a1cad5 into openvinotoolkit:master Jul 29, 2021
rnugmanx pushed a commit to rnugmanx/openvino that referenced this pull request Aug 26, 2021
…lkit#6410)

* Avoid Constant data copy inside Reshape constant folding

* Fix Codestyle

* Updated Squeeze, Unsqueeze cf

* Deprecate set_data_shape method

* Fix Pruning
andrei-cv pushed a commit to andrei-cv/openvino that referenced this pull request Aug 30, 2021
…lkit#6410)

* Avoid Constant data copy inside Reshape constant folding

* Fix Codestyle

* Updated Squeeze, Unsqueeze cf

* Deprecate set_data_shape method

* Fix Pruning
akuporos pushed a commit to akuporos/openvino that referenced this pull request Sep 29, 2021
…lkit#6410)

* Avoid Constant data copy inside Reshape constant folding

* Fix Codestyle

* Updated Squeeze, Unsqueeze cf

* Deprecate set_data_shape method

* Fix Pruning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Core OpenVINO Core (aka ngraph) enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants