Skip to content

Commit

Permalink
[quant][pt2e] Add documentation for pt2 export static quant
Browse files Browse the repository at this point in the history
Summary:
att

Test Plan:
visual inspection

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 97a24667438a72af607809cbfd6141d99f49ada8
Pull Request resolved: #2504
  • Loading branch information
jerryzh168 committed Jul 27, 2023
1 parent c32ad93 commit f18b014
Show file tree
Hide file tree
Showing 4 changed files with 475 additions and 124 deletions.
2 changes: 1 addition & 1 deletion prototype_source/fx_graph_mode_ptq_static.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ of the observers for activation and weight. ``QConfigMapping`` contains mapping
qconfig_mapping = (QConfigMapping()
.set_global(qconfig_opt) # qconfig_opt is an optional qconfig, either a valid qconfig or None
.set_object_type(torch.nn.Conv2d, qconfig_opt) # can be a callable...
.set_object_type("torch.nn.functional.add", qconfig_opt) # ...or a string of the class name
.set_object_type("reshape", qconfig_opt) # ...or a string of the method name
.set_module_name_regex("foo.*bar.*conv[0-9]+", qconfig_opt) # matched in order, first match takes precedence
.set_module_name("foo.bar", qconfig_opt)
.set_module_name_object_type_order()
Expand Down
13 changes: 10 additions & 3 deletions prototype_source/prototype_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,19 @@ Prototype features are not available as part of binary distributions like PyPI o
:tags: Debugging,Quantization

.. customcarditem::
:header: Quantization in PyTorch 2.0 Export Tutorial
:card_description: Learn how to use the Quantization in PyTorch 2.0 Export.
:header: How to Write a Quantizer for PyTorch 2.0 Export Quantization
:card_description: Learn how to implement a Quantizer for PT2.0 Export Quantization
:image: ../_static/img/thumbnails/cropped/generic-pytorch-logo.png
:link: ../prototype/quantization_in_pytorch_2_0_export_tutorial.html
:link: ../prototype/pt2e_quantizer.html
:tags: Quantization

.. customcarditem::
:header: PyTorch 2.0 Export Post Training Static Quantization
:card_description: Learn how to use Post Training Static Quantization in PyTorch 2.0 Export.
:image: ../_static/img/thumbnails/cropped/generic-pytorch-logo.png
:link: ../prototype/pt2e_quant_ptq_static.html
:tags: Quantization

.. Mobile
.. customcarditem::
Expand Down
Loading

0 comments on commit f18b014

Please sign in to comment.