neural-compressor
neural-compressor copied to clipboard
Add a feature of UniformQDQ - support CV/NLP model's OPs, includingConv, DepthwiseConv2D, MatMul, etc. Additional op support be added upon request.
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
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?
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
loop in @ashahba and @mahmoud-abuzaina also.
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"), },
Supporting only 3.x API is fine, we don't really need to depend on 2.x API.