Skip to content

Fix performance on resnet50 quantized models#7670

Merged
ilyachur merged 11 commits intoopenvinotoolkit:masterfrom
mateusztabaka:onnxqdq
Oct 13, 2021
Merged

Fix performance on resnet50 quantized models#7670
ilyachur merged 11 commits intoopenvinotoolkit:masterfrom
mateusztabaka:onnxqdq

Conversation

@mateusztabaka
Copy link
Copy Markdown
Contributor

LP transformations won't work on the model unless the last 4 inputs to FakeQuantize
are constants. In order to meet that requirement, we need to perform constant folding
for those inputs in QuantizeLinear ONNX operator.

Ticket: 65375

LP transformations won't work on the model unless the last 4 inputs to FakeQuantize
are constants. In order to meet that requirement, we need to perform constant folding
for those inputs in QuantizeLinear ONNX operator.

Ticket: 65375
@openvino-pushbot openvino-pushbot added category: CPU OpenVINO CPU plugin category: IE Tests OpenVINO Test: plugins and common category: inference OpenVINO Runtime library - Inference category: Core OpenVINO Core (aka ngraph) labels Sep 27, 2021
@mateusztabaka mateusztabaka requested a review from iefode October 1, 2021 10:14
@@ -0,0 +1,126 @@
ir_version: 6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't like the approach to store models under git. And what is the license of the model? Is there the way not to store this model as a file under git?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In general case we can have a model as a C++ string and after that read model from the stream. It should allow to avoid additional files on file system

Copy link
Copy Markdown
Contributor Author

@mateusztabaka mateusztabaka Oct 7, 2021

Choose a reason for hiding this comment

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

that doesn't work anymore since we support only protobuf lite. Current approach is to have models in prototxt and convert them to onnx during build time.

@mateusztabaka mateusztabaka requested a review from vzinovie October 5, 2021 08:37

using namespace ONNXTestsDefinitions;

INSTANTIATE_TEST_SUITE_P(ONNXQuantizedModels, QuantizedModelsTests,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we enable these tests for other plugins?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think that can be checked later. Currently I wanted to make sure that CPU works with onnx low precision models.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please create a ticket to enable tests for other plugins in this case.

@@ -0,0 +1,126 @@
ir_version: 6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In general case we can have a model as a C++ string and after that read model from the stream. It should allow to avoid additional files on file system

@mateusztabaka mateusztabaka requested a review from ilyachur October 7, 2021 08:39
@MaximProshin
Copy link
Copy Markdown
Contributor

@mateusztabaka , do you have any progress with this PR? When do you think it can be merged?

@mateusztabaka
Copy link
Copy Markdown
Contributor Author

@mateusztabaka , do you have any progress with this PR? When do you think it can be merged?

From my perspective it's ready. I'm just waiting for tests to be green

@ilyachur ilyachur merged commit db527ff into openvinotoolkit:master Oct 13, 2021
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) category: CPU OpenVINO CPU plugin category: IE Tests OpenVINO Test: plugins and common category: inference OpenVINO Runtime library - Inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants