-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix the duplicated QDQ attributes setup issue #18039
Conversation
The copied QDQ node should have exactly the same attributes as the original QDQ node. Otherwise, it might cause errors when the original node has attributes that use non default values (such as axis != 1 case).
thanks for the fix. could you please also add a unit test for 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.
thanks for adding the test. just had one comment about it.
onnxruntime/test/optimizer/ensure_unique_dq_for_node_unit_test.cc
Outdated
Show resolved
Hide resolved
onnxruntime/test/optimizer/ensure_unique_dq_for_node_unit_test.cc
Outdated
Show resolved
Hide resolved
onnxruntime/test/optimizer/ensure_unique_dq_for_node_unit_test.cc
Outdated
Show resolved
Hide resolved
onnxruntime/test/optimizer/ensure_unique_dq_for_node_unit_test.cc
Outdated
Show resolved
Hide resolved
/azp run Linux CPU CI Pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, Linux QNN CI Pipeline |
/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows ARM64 QNN CI Pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, ONNX Runtime React Native CI Pipeline, Windows x64 QNN CI Pipeline |
Azure Pipelines successfully started running 9 pipeline(s). |
/azp run Linux MIGraphX CI Pipeline, orttraining-amd-gpu-ci-pipeline |
Azure Pipelines successfully started running 9 pipeline(s). |
Azure Pipelines successfully started running 2 pipeline(s). |
the PR looks pretty good to me. the formatting check is complaining: please run clang-format on the modified files. this is one way to set that up: |
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, Linux QNN CI Pipeline |
/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows ARM64 QNN CI Pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, ONNX Runtime React Native CI Pipeline, Windows x64 QNN CI Pipeline |
/azp run Linux MIGraphX CI Pipeline, orttraining-amd-gpu-ci-pipeline |
Azure Pipelines successfully started running 2 pipeline(s). |
Azure Pipelines successfully started running 9 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 9 pipeline(s). |
@vera121 I think this PR is almost ready to merge. would you mind taking a look at the Contributor License Agreement? |
Hello @edgchen1 |
Hi @vera121, just wanted to follow up on this PR. were you able to get the necessary approvals? |
Hello @edgchen1 Thanks for the remind. Yes, I didn't forget this but our company's legal department is still running the reviewing process (you know such process usually might take a while). I will notify you and submit the CLA as soon as they finish. Thanks very much. |
@microsoft-github-policy-service agree [company="Synopsys"] |
Hello @edgchen1 Sorry for the long wait. Now we finally got the approval from our company's legal department. Please check my reply and go on with the merge. |
@microsoft-github-policy-service agree company="Synopsys" |
great, just in time for the 1.17 release! thanks again for the fix! |
Description
The copied QDQ node should have exactly the same attributes as the original QDQ node. Otherwise, it might cause errors when the original node has attributes that use non default values (such as axis != 1 case).
An example user case is like:
A DequantizeLinear node has more than 1 consumer in the graph, and its attributes axis is 0.
Motivation and Context
I see the errors like
#16188
and this fix could solve the issue.