-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Fix quantize pass error when excluding a quantization supported op #13596
Conversation
Thanks for the fix. |
@pengzhao-intel The picture of graph might not reflect the error, an enhanced test was added to cover this kind of cases. I paste the full symbol file of the test case w/ and w/o the fix.
The incorrect connection (error entry index) is located at 3nd/4th input (counting from 0), [21, 4294967295, 0], [21, 0, 0]
After fixed, the connection is as below, 3nd/4th inputs are correct now [21, 1, 0], [21, 2, 0]
|
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.
Thanks for the explanation. It makes sense.
ping @apeforest @TaoLv to have a reveiw :) |
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. Thank you for the fix.
@mxnet-label-bot add [Operator, pr-awaiting-review] |
@roywei No open issue related to it so far. We found this error when trying to quantize Resnet50_v1 at local (with excluding some ops which supports quantization from the model script manually). In this case, |
* upstream/master: (38 commits) Feature/mkldnn static (apache#13628) Fix the bug of BidirectionalCell (apache#13575) Set install path for libmxnet.so dynamic lib on Mac OS (apache#13629) add batch norm test (apache#13625) Scripts for building dependency libraries of MXNet (apache#13282) fix quantize pass error when the quantization supported Op are excluded in the model (apache#13596) Optimize C++ API (apache#13496) Fix warning in waitall doc (apache#13618) [MXNET-1225] Always use config.mk in make install instructions (apache#13364) [MXNET-1224]: improve scala maven jni build and packing. (apache#13493) [MXNET-1155] Add scala packageTest utility (apache#13046) fix the Float not showing correctly problem (apache#13617) apache#13385 [Clojure] - Turn examples into integration tests (apache#13554) Add Intel MKL blas to Jenkins (apache#13607) Revert "[MXNET-1198] MXNet Java API (apache#13162)" Reducing the length of setup tutorial (apache#13306) [MXNET-1182] Predictor example (apache#13237) [MXNET-1187] Added Java SSD Inference Tutorial for website (apache#13201) add defaults and clean up the tests (apache#13295) [MXNET-1181] Added command line alternative to IntelliJ in install instructions (apache#13267) ...
Description
This PR is to address the error when excluding a quantization supported op in a model like the case below, where both
op1
andop2
support quantization.op1 -> op2
When excluding
op1
from the model, the pattern is changed toop1 -> _contrib_quantize -> quantized_op2
There's an incorrect connection (incorrect entry index) between
_contrib_quantize
andquantize_op2
formin/max
inputs in current code base.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
@TaoLv @pengzhao-intel @apeforest