Skip to content
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

I'm dying to know how to implement the int8 winograd in conv3x3s1 #369

Closed
BUG1989 opened this issue Dec 21, 2018 · 9 comments
Closed

I'm dying to know how to implement the int8 winograd in conv3x3s1 #369

BUG1989 opened this issue Dec 21, 2018 · 9 comments
Assignees
Labels

Comments

@BUG1989
Copy link

BUG1989 commented Dec 21, 2018

I find the mkl-dnn has been supported the int8 winograd in convolution.
Is there any paper to introduce how to quantization winograd.

Thanks a lot!

@vpirogov
Copy link
Member

@BUG1989, there's a section in documentation describing quantization approach Intel MKL-DNN supports. The same approach is applied to Winograd convolution algorithm.

@vpirogov
Copy link
Member

Summoning @tprimak or @nshustrov to comment on the nuances of the implementation.

@nshustrov
Copy link
Contributor

@BUG1989, the implementation of int8 winograd convolution in MLK-DNN does not require special quantization. The approach to quantization of input data and weights is the same with quantization used for direct int8 convolution with unsigned int8 input and signed int8 weights. All needed data adjustment happens in the weights reorder and transformation of input and output data.

@BUG1989
Copy link
Author

BUG1989 commented Dec 28, 2018

I see. Thank you very much for your help.And the quantize of weights before or after winograd transformation ?

@vpirogov
Copy link
Member

Quantization is independent on the Winograd algorithm itself. We apply the same quantization scheme and the same parameters for all convolution implementations, including direct, GEMM and Winograd.

@BUG1989
Copy link
Author

BUG1989 commented Feb 1, 2019

Thank you very much for your advice. I have realized it in other opensource project.I have implemented the int8 winograd F(2,3) in arm platform and it has the same accuracy as original int8 conv3x3s1 : )
ncnn pr
P.S. : ncnn is a high-performance neural network inference framework optimized for the mobile platform

@BUG1989 BUG1989 closed this as completed Feb 1, 2019
@xiaoweiChen
Copy link

@BUG1989 can show the opensource project name or address, which you find int8 winograd in it?

@BUG1989
Copy link
Author

BUG1989 commented Apr 29, 2019

@xiaoweiChen
https://github.com/Tencent/ncnn/blob/master/src/layer/x86/convolution_3x3_int8.h

The detail codes,please see the two functions:

  • conv3x3s1_winograd23_transform_kernel_int8_sse
  • conv3x3s1_winograd23_int8_sse

@xiaoweiChen
Copy link

@BUG1989 Thanks for your sharing. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants