[ONNX][#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear#9028
Merged
masahi merged 5 commits intoapache:mainfrom Sep 17, 2021
Merged
[ONNX][#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear#9028masahi merged 5 commits intoapache:mainfrom
masahi merged 5 commits intoapache:mainfrom
Conversation
Contributor
mbrookhart
requested changes
Sep 16, 2021
Contributor
mbrookhart
left a comment
There was a problem hiding this comment.
I think the bugfix with DequantizeLinear isn't quite correct, but the QLinearSigmoid stuff looks great! Thank you.
anwang2009
approved these changes
Sep 16, 2021
| ## and then requantize after: | ||
| ## https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/core/ | ||
| ## providers/dml/DmlExecutionProvider/src/GraphTransformer.cpp#L245 | ||
| x = _qnn.op.dequantize(inputs[0], x_scale, x_zero_point) |
Contributor
There was a problem hiding this comment.
nit
Suggested change
| x = _qnn.op.dequantize(inputs[0], x_scale, x_zero_point) | |
| x = _qnn.op.dequantize(x, x_scale, x_zero_point) |
Contributor
|
The de-quantize change did cause those tests to fail in CI. I think we need a better solution there, but otherwise, it looks good. |
Contributor
Author
Thank you, @mbrookhart , @anwang2009 , @masahi , @AndrewZhaoLuo for reviewing, catching the issue with this change, and for suggesting a solution. Updated the PR to address your comments. |
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Sep 29, 2021
…izeLinear (apache#9028) * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Jan 13, 2022
…izeLinear (apache#9028) * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear * [ONNX][apache#8838] QLinearSigmoid contrib op and Bug Fix for DequantizeLinear
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements com.microsoft.QLinearSigmoid (tracked here). This is implemented as dequantize->sigmoid->quantize for now.
This also fixes an issue with DequantizeLinear for tensors with rank=1. The current default axis of 1 for _impl_v13 leads to failures with rank=1 tensors. A new test is added for an existing op (QLinearMul) for this case.