Skip to content

Commit a6fd179

Browse files
jerryzh168facebook-github-bot
authored andcommitted
Quantization doc cleanups (#767)
Summary: . Differential Revision: D50107717
1 parent 79f331a commit a6fd179

File tree

6 files changed

+6
-77
lines changed

6 files changed

+6
-77
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Compared to the legacy Lite Interpreter, there are some major benefits:
4242
- [Exporting to ExecuTorch](/docs/website/docs/tutorials/exporting_to_executorch.md)
4343
- [EXIR Spec](/docs/website/docs/ir_spec/00_exir.md)
4444
- [Exporting manual](/docs/website/docs/export/00_export_manual.md)
45-
- [Quantization](/docs/website/docs/tutorials/quantization_flow.md)
4645
- [Delegate to a backend](/docs/website/docs/tutorials/backend_delegate.md)
4746
- [Profiling](/docs/website/docs/tutorials/profiling.md)
4847
- [ExecuTorch Google Colab](https://colab.research.google.com/drive/1m8iU4y7CRVelnnolK3ThS2l2gBo7QnAP#scrollTo=1o2t3LlYJQY5)

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Topics in this section will help you get started with ExecuTorch.
153153
:caption: Quantization
154154
:hidden:
155155

156-
quantization-custom-quantization
156+
quantization
157157

158158
.. toctree::
159159
:glob:

docs/source/quantization-custom-quantization.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/source/quantization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Quantization
2+
Quantization is specific to backend, and each backend will implement their own ``Quantizer`` that has its own APIs for modeling users to configure quantization. For an example of how XNNPACK quantization flow looks like and how to implement your own ``Quantizer``, please take a look at section ``Performing Quantization`` in [this doc](./tutorials_source/export-to-executorch-tutorial.md).

docs/source/tutorials_source/export-to-executorch-tutorial.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def f(x, y):
229229
#
230230
# Compared to
231231
# `FX Graph Mode Quantization <https://pytorch.org/tutorials/prototype/fx_graph_mode_ptq_static.html>`__,
232-
# we will need to call two new APIs: ``prepare_pt2e`` and ``compare_pt2e``
232+
# we will need to call two new APIs: ``prepare_pt2e`` and ``convert_pt2e``
233233
# instead of ``prepare_fx`` and ``convert_fx``. It differs in that
234234
# ``prepare_pt2e`` takes a backend-specific ``Quantizer`` as an argument, which
235235
# will annotate the nodes in the graph with information needed to quantize the
@@ -258,8 +258,7 @@ def f(x, y):
258258
######################################################################
259259
# More information on how to quantize a model, and how a backend can implement a
260260
# ``Quantizer`` can be found
261-
# `here <https://pytorch.org/tutorials/prototype/pt2e_quant_ptq_static.html>`__ .
262-
261+
# `here <https://pytorch.org/docs/main/quantization.html#prototype-pytorch-2-export-quantization>`__.
263262
######################################################################
264263
# Lowering to Edge Dialect
265264
# ------------------------
@@ -648,7 +647,7 @@ def forward(self, x):
648647
# ^^^^^^^^^^^^^^^
649648
#
650649
# - `torch.export Documentation <https://pytorch.org/docs/2.1/export.html>`__
651-
# - `Quantization Tutorial <https://pytorch.org/tutorials/prototype/pt2e_quant_ptq_static.html>`__
650+
# - `Quantization Documentation <https://pytorch.org/docs/main/quantization.html#prototype-pytorch-2-export-quantization>`__
652651
# - `IR Spec <../ir-exir.html>`__
653652
# - `Writing Compiler Passes + Partitioner Documentation <../compiler-custom-compiler-passes.html>`__
654653
# - `Backend Delegation Documentation <../compiler-delegate-and-partitioner.html>`__

docs/website/docs/tutorials/quantization_flow.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)