-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Support QDQ transformations with com.microsoft.Quantize/Dequantize ops #17127
Conversation
…nsformerTests.QDQPropagation_Forward/Backward
onnxruntime/test/testdata/transform/qdq_with_multi_consumer_dq_nodes.fixed.qdq_contrib.onnx
Outdated
Show resolved
Hide resolved
…er script to handle subgraphs.
@yufenglee The work is being broken down into separate/smaller PRs. This specific PR focuses on making sure contrib QDQ ops can be optimized in the same manner as ONNX ops (please refer to the PR description for details). The next PR (linked in the description) adds int16 support, but I'd like to get this one merged in before starting reviews on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
microsoft#17127) ### Description - Enables int32 support for com.microsoft.DequantizeLinear (contrib op) - Makes the `zero_point` input optional for Quantize/Dequantize contrib ops - Enables QDQ transformations with the Quantize/Dequantize contrib ops - Update tests: EnsureUniqueDQForNodeUnitTests, QDQTransformerTests, TransposeOptimizerTests ### Testing List of tested graph transformations: - [x] QDQSelectorActionTransformer - qdq_transformer_test.cc - [x] QDQS8ToU8Transformer - qdq_transformer_test.cc - [x] DoubleQDQPairsRemover - qdq_transformer_test.cc - [x] IdenticalChildrenConsolidation - qdq_transformer_test.cc - [x] QDQPropagation - qdq_transformer_test.cc - [x] QDQFinalCleanup - qdq_transformer_test.cc - [x] CliQuantFusion - qdq_transformer_test.cc - [x] ReluQuantFusion - qdq_transformer_test.cc - [x] EnsureUniqueDQForNodeUnit - ensure_unique_dq_for_node_unit_test.cc - [x] TransposeOptimizer - transpose_optimizer_test.cc - [x] CommonSubexpressionElimination - graph_transform_test.cc - [x] ConstantFolding - graph_transform_test.cc ### Motivation and Context We need to [support mixed 16-bit/8-bit precision QDQ models](microsoft#17015). This PR is the first step in achieving this goal: we need to make QDQ contrib ops work with our optimizations/transformations. --------- Co-authored-by: Edward Chen <[email protected]> Co-authored-by: Scott McKay <[email protected]>
Description
zero_point
input optional for Quantize/Dequantize contrib opsTesting
List of tested graph transformations:
Motivation and Context
We need to support mixed 16-bit/8-bit precision QDQ models. This PR is the first step in achieving this goal: we need to make QDQ contrib ops work with our optimizations/transformations.