Add conv dequant squash#18905
Merged
luotao1 merged 8 commits intoPaddlePaddle:developfrom Aug 27, 2019
Merged
Conversation
added 3 commits
July 23, 2019 03:56
test=develop
test=develop
test=develop
Author
|
@luotao1 what do you think about the result and option to enable the pass? |
Contributor
|
Tested on Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz
|
Contributor
|
@juncaipeng @wzzju Please double-check the #18905 (comment) |
5efd9a1 to
6d4ce01
Compare
test=develop
6d4ce01 to
e412296
Compare
wojtuss
reviewed
Aug 23, 2019
paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass_tester.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass_tester.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass_tester.cc
Outdated
Show resolved
Hide resolved
test=develop
Author
|
@luotao1 if everything is fine then this PR is an improvement ready to merge |
Contributor
|
Tested on Intel(R) Xeon(R) Gold 6271 CPU @ 2.60GHz
|
This was referenced Aug 29, 2019
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 squash is based on PR #18754
This squash change chain with conv op. and dequantize op. to conv with forced float output.
Thanks to this you will avoid additional conversion to int8.
In mobilenet ssd there are 12 pattern like this and the use of this squash improves accuracy
(on clx machine):
- Before squash: acc_fp32 = 0.7733, acc_int8=0.77
- After that squash: acc_fp32 = 0.7733, acc_int8=0.7719
Unfortunately, after a few tests using mkl-dnn and int8 on clx machine, fps decreased:
- Before squash: avg fps = 151.634
- After squash: avg fps = 146.8749
Is's almost 3%.
That could be some kind of option if accuracy is more important than performance.