[MXNET-677] int8 quantization does not work on toy mnist dataset #11756
Comments
Just an update: When I install
I compiled mxnet with debug symbols and built from source with
|
@reminisce Hi, is there a slack channel I can join for discussion about this bug? I can't seem to get quantization working at all. (Even the examples segfault for me) |
@OneRaynyDay From the error message, it seems that you quantized the model using a version of MXNet, but ran inference with the quantized model using an older version than that. Were you able to run the example here: It seems that an invitation for you to join the slack channel has been sent out. Let us know if you don't have it. Thanks. |
Hi @reminisce , thanks for the response. I have not received a slack invitation to With regards to the example, I could not run it. It segfaults in the same way. I also suspect that it may be a versioning issue, but I don't believe it to be the reason because in jupyter, I quantized the model and ran inference in the same notebook(so therefore in the same mxnet version) and it segfaults. Update: I was able to run the examples correctly on a specific configuration: I ran single cpu(0) as ctx in OS X and the segfault still occurs. |
CPU quantization was implemented by Intel engineers. I've already informed them offline and they will take this forward. You are right, the invitation to the slack channel has not been sent out yet. You should be able to receive that soon. |
Thank you. I have also found out the reason for the failure, and it is not related to CPU quantization. We should discuss more about this in the slack channel. It is a very strange issue. |
@OneRaynyDay we have successfully run MNIST in our local with the quantization flow. |
@xinyu-intel: do you need help addressing this issue ? |
@access2rohit hi, i'm working in progress on this. |
hi @OneRaynyDay have you resolved your problem? I have the same error: [17:16:31] src/executor/attach_op_execs_pass.cc:336: Neither FCompute nor FComputeEx registered _contrib_quantized_conv Segmentation fault: 11 Stack trace returned 10 entries: I ran in OSX, and ctx=cpu. |
@bettyeats Hi, it is because you're using |
For CPU, you can build with MKLDNN. Native CPU quantization is not implemented. |
@xinyu-intel @PatricZhao is there work to support
|
@ThomasDelteil the fused version of convolution can work with INT8 in here Please try to run models with https://github.com/apache/incubator-mxnet/blob/master/example/quantization/imagenet_gen_qsym_mkldnn.py |
@ThomasDelteil add this line |
Closing this issue for now. Please feel free to reopen if you come across this again |
Link to JIRA ticket issue
The reproducible repository is linked here.
Description
Currently, airbnb is using the quantization extensions of mxnet to boost inference time on several convolutional neural network models. However, it has been difficult to achieve. The most complicated bugs lie in the intersection between the python and C++ interface, like the ones that crash jupyter kernels and are hard to run pdb on.
Airbnb currently extensively uses gluon models and are not planning to move to Module models any time soon for training, but it seems that creating a quantized Module model solely for inference is useful. Please refer to the repository for a minimum reproducible example.
Error & Stacktrace
Environment info (Required)
The text was updated successfully, but these errors were encountered: