Fix elementwise_add quantization#34820
Merged
jczaja merged 3 commits intoPaddlePaddle:developfrom Aug 16, 2021
Merged
Conversation
|
Thanks for your contribution! |
sfraczek
reviewed
Aug 12, 2021
Comment on lines
+773
to
+774
| if (!AreScalesPresentForNodes({elementwise_add_x, elementwise_add_y}) || | ||
| !AreScalesPresentForNodes({elementwise_add_out})) { |
There was a problem hiding this comment.
Consider calling this method only once with all three nodes in arguments.
Comment on lines
+134
to
+140
| // all quantized operators, except relu | ||
| MainTest({}, {}, 5); | ||
| } | ||
|
|
||
| TEST(QuantizerPlacementPass, default_attr_value) { | ||
| // all operators quantized | ||
| DefaultAttrTest(6); | ||
| // all quantized operators, except relu | ||
| DefaultAttrTest(5); |
There was a problem hiding this comment.
I think that reversing order of words "quantized" and "operators" might be confusing.
You could consider making it a full sentence for example:
All operators except relu should be quantized
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.
PR types
Bug fixes
PR changes
OPs
Describe
This PR:
relufrom the list of quantizable operators because so farreluhas no quantization support,elementwise_add: if there is no output tensor scale, the operator is not quantized. Previously, when there was no output scale, theforce_fp32_outputattribute was set, unfortunately, it was an error because the operator does not have such an attribute or functionality.This PR should fix the problem #34574