-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Improve Range update for Relu/Clip #21251
Comments
If you need to fuse operator in a custom way, you can use this tool: https://onnxscript.ai/tutorial/rewriter/rewrite_patterns.html (you should install the development version). |
i do not necessarily need a custom op, rather a way to specify convolution and relu should not have different scales as this can introduce noise. although it would be good to have a standard fused op like conv-relu. any reason this is not supported yet? |
Upon further investigation, the issue is for symmetric quantization only. For some reason, the current code does not assign output range of clip/relu to the input range. We do not need entire range as it will be discarded after the clip/relu layer. The current limitation introduces issues for backend which support fused conv-relu + symmetric activations. This should be fixed by my PR #21573 Pls. review @xadupre @yufenglee and let me know if this makes sense. Thanks! |
Closed by #21573 |
How do we specify fused operator patterns like (conv+relu) in the quantization config? I see such options are available in pytorch but not in onnx static_quantize.
Right now I see different scales at output of conv and relu which is not suitable for us as it will require additional requantize step.
Thanks!
The text was updated successfully, but these errors were encountered: