-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Correct MultipleQuantizeSquash #40717
Correct MultipleQuantizeSquash #40717
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@wozna Hi, Does all daily CI models could all pass? Or the coverage CI should test all the models? |
@@ -45,6 +45,7 @@ void LogCannotQuantizeOp(Node* op, const char* details = nullptr) { | |||
<< " (type: " << op->Op()->Type() << ", id: " << op->id() << ")."; | |||
if (details) msg_ss << " " << details; | |||
PrettyLogDetail(msg_ss.str().c_str()); | |||
op->Op()->SetAttr("mkldnn_data_type", std::string("float32")); |
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.
Later on, could we refactor these log functions? It looks VLOG(4)
is enough for these log functions?
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.
Does function below void LogQuantizationDisabled(Node* op)
maybe also need to set "mkldnn_data_type", std::string("float32")
?
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!
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
Hi, @jczaja please review. This PR need one more approval to merge. Thanks |
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
你的PR已合入Paddle库,请关注后续测试结果。 |
* Correct MultipleQuantizeSquash * Correct logging
PR types
Bug fixes
PR changes
Others
Describe
This fixed the problem with running the yolov3_darknet model.
This PR corrects MultipleQuantizeSquash in
cpu_quantize_squash_pass.cc
.It turned out that this mechanism didn't support the situation when under one input name are many inputs (eg. concat, sum).
Before new inputs for the next operators were created, now we just updating the next operator input.
Moreover, I added setting
mkldnn_data_type
to float32 if the operator is not quantised, because before even if the operator wasn't quantized this attribute was set to int8.