-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add unsigned int8 scale propagation #46378
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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.
I have a few small suggestions
paddle/fluid/framework/ir/mkldnn/compute_propagate_scales_mkldnn_pass.cc
Outdated
Show resolved
Hide resolved
for (auto& var_name : variable_names) { | ||
auto iter = var_quant_scales->find(var_name); | ||
ASSERT_NE(iter, var_quant_scales->end()); | ||
ASSERT_EQ((*var_quant_scales)[var_name].first, true); |
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.
You could perhaps reuse iter here but it's okay.
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
6b4356d
to
dac2f6f
Compare
c2c736a
to
f8fd057
Compare
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.
LGTM
@wozna Hello, does this PR still need to be updated? do you need us to merge |
@yeliang2258 It is ready to be merged. |
* Add unsigned int8 propagation * Add or modify unit tests * Correct concat scale checking * Apply review suggestions * Corrections Co-authored-by: joanna.wozna.intel <[email protected]>
PR types
New features
PR changes
Others
Describe
I found out that in cpu_quantize_squash_pass there was check to prevent squashing dequantize and quantize with different data type (int8/uint8) but it was not working correctly. In
compute_propagate_scales_mkldnn_pass
we have scale propagation so eg. scale before reshape2 is applied after reshape var but the type (uint8 or int8) weren't applied.This PR fixes picodet int8 acc drop #44075 and fixes concat error in #45970