-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[Quant] Move parts of BackendConfig tutorial #2169
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
Conversation
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.
For the tutorial example, it would be good to lay out a step by step guide to user as well, start with a scenario, e.g. user have a backend that they want to implement quantized linear and quantized conv2d_relu operator, how they figure out the BackendConfig step by step.
e.g. 1. decide the list of quantized operators in the backend 2. write down the reference pattern for each quantized operator 3. for each operator, write the BackendPatternConfig based on the reference pattern of the quantized operator, and what types of fusions they will need etc. 4. combine BackendPatternConfig and get a BackendConfig object 5. write custom qconfig mapping 6. use it in prepare and convert
some of pieces are already there in the tutorial, but it might be better to just list the steps more explicitly, similar to https://github.com/pytorch/tutorials/blob/main/prototype_source/fx_graph_mode_ptq_static.rst
423782e
to
993c809
Compare
Sounds good. I reorganized them based on your suggestion. |
Summary: This commit moves the API specification and the Data Type Restriction sections to the docstrings. See pytorch/pytorch#91999. This commit also reorganizes the end-to-end example to make it easier to follow. Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo
993c809
to
dca242e
Compare
Hi @svekars, can you help me merge this? Thanks. |
Summary: This commit moves the API specification and the Data
Type Restriction sections to the docstrings. See
pytorch/pytorch#91999. This commit also
reorganizes the end-to-end example to make it easier to follow.
Reviewers: jerryzh168, vkuzo
Subscribers: jerryzh168, vkuzo