-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MKLDNN]Enhance Quantization APIs and Tutorial #15448
[MKLDNN]Enhance Quantization APIs and Tutorial #15448
Conversation
@anirudh2290 @ThomasDelteil as we discussed in the forum, we post the developer guide for the user who wants to integrate quantization flow into their script. CC @reminisce @ZhennanQin @ElaineBao Any suggestion is highly appreciated :) |
Update MKLDNN_QUANTIZATION.md
@KellenSunderland please help take a review too :) |
nit: use lower case in the name of document. |
…-intel/incubator-mxnet into enhance_quantization_api_1
@ThomasDelteil Comments addressed, Please take a look at again:) |
@mxnet-label-bot add [MKLDNN, Doc] |
@aaronmarkham could you help take a review for the new document? |
@ThomasDelteil Would you mind to take a review again? |
Will do, at a conference this week, limited bandwidth but next week I'll have some availability to look into quantization again and get back to you on the different email threads as well, apologies for the delay! |
Sure :) Have a good trip on AMLC. Thanks in advance. |
@ThomasDelteil Could you please review this PR once you have time? Thanks! |
@ThomasDelteil do you have a chance to review this week? |
@ciyongch @ZhennanQin @ElaineBao please take a review and test in local. |
docs look good to me. |
@ThomasDelteil we are going to merge this PR in 24 hours if no further comments since other improvements depend on this. |
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
Merging now. We're continually improving the quantization flow so any suggestions and feedbacks are highly appreciated. |
* enhance api and new tutorial * Update MKLDNN_QUANTIZATION.md update * fix lint * modify pics * skip test * add quantize layer in graph * update * remove center css flag * change requantize color * fix markdown pics * change to use png * Update MKLDNN_QUANTIZATION.md update * enable ipython script * fix png * fix lint * Update MKLDNN_QUANTIZATION.md * change title * trigger * use lower case * some typo * some typo * use dmlc web data * trigger * trigger
Description
Create a MKL-DNN specific user-level api
quantize_model_mkldnn
which combines fusion and quantization.Enable
resnet50_v1b
quantized model.Split
quantize_model
API into three parts to make it flexible for users to integrate quantization flow into their project:1)
quantize_graph
: quantize fp32 model to int8 model w/o calibration and return a collector for collecting calibration information in the next step.2)[outside api]: users need only add a few lines together with mod.forward for collecting calibration information.
3)
calib_graph
: generate calibrated model based on filled collector.Draft a tutorial to introduce How to quantize custom models for production-level inference with MKL-DNN backend.
@pengzhao-intel @TaoLv @ZhennanQin @ciyongch
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments