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

FakeQuantize decomposition #3741

Conversation

mandrono
Copy link

@mandrono mandrono commented Dec 25, 2020

Issue: 42853

At this moment CPU plug-in supports following FakeQuantize node:

  1. 'data' node with rank <= 5
  2. 'ranges' node with rank <= 5, with Constant type, with shape_size == 1 or with batch or channel dimension != 1

Motivation of this PR is supporting cases:

  • inputs with rank > 5
  • 'ranges' node with Constant type and any shape

via decomposition FakeQuantize into a set of eltwise operations
Unsupported FakeQuantize can also be obtained after transformation or LPT transformation.
So FakeQuantizeDecomposition called after LPT transformation, but before ConvertOpSet1ToLegacy

At this moment used only for CPU plug-in

@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch 2 times, most recently from 8398de5 to d275a15 Compare December 30, 2020 19:12
@mandrono mandrono marked this pull request as ready for review December 31, 2020 08:30
@mandrono mandrono requested review from a team and dmitry-gorokhov December 31, 2020 08:30
@mandrono mandrono added category: CPU OpenVINO CPU plugin category: transformations OpenVINO Runtime library - Transformations labels Dec 31, 2020
@mandrono mandrono added this to the 2021.3 milestone Dec 31, 2020
@mandrono
Copy link
Author

@dmitry-gorokhov @GlebKazantaev take a look please

@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch from d275a15 to e3b9519 Compare January 11, 2021 06:41
@dmitry-gorokhov
Copy link
Contributor

@eshoguli could you please review

@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch from e3b9519 to b914368 Compare January 15, 2021 14:53
@mandrono mandrono requested a review from eshoguli January 18, 2021 07:06
@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch 2 times, most recently from df1787a to d008f82 Compare January 19, 2021 11:08
@mandrono
Copy link
Author

Discussed with @GlebKazantaev and decided to place FakeQuantizeDecomposition in transformation library because it possible to reuse for other plugins.

@mandrono mandrono assigned dmitry-gorokhov and unassigned eshoguli Jan 20, 2021
@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch 3 times, most recently from 7051a23 to 15b3708 Compare January 25, 2021 11:39
@mandrono mandrono closed this Jan 25, 2021
@mandrono mandrono reopened this Jan 25, 2021
@mandrono
Copy link
Author

@dmitry-gorokhov could you review again please?

@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch from 15b3708 to 6d6e7ef Compare January 27, 2021 14:28
@dmitry-gorokhov
Copy link
Contributor

@GlebKazantaev do you have any comments?

Copy link
Contributor

@GlebKazantaev GlebKazantaev left a comment

Choose a reason for hiding this comment

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

Transformation part looks good.

@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch from 6d6e7ef to cf1b41b Compare January 29, 2021 08:03
@mandrono mandrono force-pushed the feature/mandrono/fq_decompos branch from cf1b41b to d4df3d7 Compare January 29, 2021 14:13
@dmitry-gorokhov dmitry-gorokhov merged commit 537179b into openvinotoolkit:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin category: transformations OpenVINO Runtime library - Transformations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants