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

Add a feature of UniformQDQ - support CV/NLP model's OPs, includingConv, DepthwiseConv2D, MatMul, etc. Additional op support be added upon request. #2155

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

Conversation

qgao007
Copy link
Contributor

@qgao007 qgao007 commented Mar 27, 2025

Type of Change

A feature of UniformQDQ

Description

A feature of UniformQDQ

  • support CV/NLP model's OPs, includingConv, DepthwiseConv2D, MatMul, etc. Additional op support be added upon request.

Expected Behavior & Potential Risk

Generate a UniformQDQ int8 model. No foreseeable risk.

How has this PR been tested?

This PR is tested on selected models with representative ops from image-classfication, object detection, and nlp.

Dependency Change?

Need Tensorflow with qunit8-support.
https://github.com/intel-innersource/frameworks.ai.tensorflow.private-tensorflow/tree/mabuzain/add-quint8-support

zehao-intel and others added 25 commits March 20, 2024 10:59
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: zehao-intel <[email protected]>
Signed-off-by: Qun Gao <[email protected]>
Signed-off-by: Qun Gao <[email protected]>
Signed-off-by: Qun Gao <[email protected]>
Signed-off-by: Gao, Qun <[email protected]>
@thuang6
Copy link
Contributor

thuang6 commented Mar 31, 2025

one general question, I saw the changes in both 2.x and 3.x folders, so this PR enables UniformQDQ supported in both 2.x and 3.x API?

@qgao007
Copy link
Contributor Author

qgao007 commented Apr 1, 2025

one general question, I saw the changes in both 2.x and 3.x folders, so this PR enables UniformQDQ supported in both 2.x and 3.x API?

Thanks @thuang6 for the question! We ran it in new pythonic 3.x API, assuming compatibility with 2.x. We will confirm this shortly with @nhatleSummer22

@qgao007
Copy link
Contributor Author

qgao007 commented Apr 1, 2025

loop in @ashahba and @mahmoud-abuzaina also.

@thuang6
Copy link
Contributor

thuang6 commented Apr 3, 2025

one general question, I saw the changes in both 2.x and 3.x folders, so this PR enables UniformQDQ supported in both 2.x and 3.x API?

Thanks @thuang6 for the question! We ran it in new pythonic 3.x API, assuming compatibility with 2.x. We will confirm this shortly with @nhatleSummer22

new feature is only expected to 3.x API.

Please note, 3.x has separated packaging for each framework, TF 3.x packing is listed below, which only contains common & tensorflow folder under neural_compressor. If the function relies on code in other 2.x folders, it does not work.

"neural_compressor_tf": {
"project_name": "neural_compressor_tf",
"include_packages": find_packages(
include=[
"neural_compressor.common",
"neural_compressor.common.",
"neural_compressor.tensorflow",
"neural_compressor.tensorflow.
",
],
),
"package_data": {"": ["*.yaml"]},
"install_requires": fetch_requirements("requirements_tf.txt"),
},

@mahmoud-abuzaina
Copy link

Supporting only 3.x API is fine, we don't really need to depend on 2.x API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants