Skip to content

Commit aaa7f66

Browse files
authored
Merge branch 'main' into beginner-dcgan-face-typo-fix
2 parents abaa604 + be1e924 commit aaa7f66

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Here is how you can create a new tutorial (for a detailed description, see [CONT
2424

2525
1. Create a Python file. If you want it executed while inserted into documentation, save the file with the suffix `tutorial` so that the file name is `your_tutorial.py`.
2626
2. Put it in one of the `beginner_source`, `intermediate_source`, `advanced_source` directory based on the level of difficulty. If it is a recipe, add it to `recipes_source`. For tutorials demonstrating unstable prototype features, add to the `prototype_source`.
27-
2. For Tutorials (except if it is a prototype feature), include it in the `toctree` directive and create a `customcarditem` in [index.rst](./index.rst).
28-
3. For Tutorials (except if it is a prototype feature), create a thumbnail in the [index.rst file](https://github.com/pytorch/tutorials/blob/main/index.rst) using a command like `.. customcarditem:: beginner/your_tutorial.html`. For Recipes, create a thumbnail in the [recipes_index.rst](https://github.com/pytorch/tutorials/blob/main/recipes_source/recipes_index.rst)
27+
3. For Tutorials (except if it is a prototype feature), include it in the `toctree` directive and create a `customcarditem` in [index.rst](./index.rst).
28+
4. For Tutorials (except if it is a prototype feature), create a thumbnail in the [index.rst file](https://github.com/pytorch/tutorials/blob/main/index.rst) using a command like `.. customcarditem:: beginner/your_tutorial.html`. For Recipes, create a thumbnail in the [recipes_index.rst](https://github.com/pytorch/tutorials/blob/main/recipes_source/recipes_index.rst)
2929

3030
If you are starting off with a Jupyter notebook, you can use [this script](https://gist.github.com/chsasank/7218ca16f8d022e02a9c0deb94a310fe) to convert the notebook to Python file. After conversion and addition to the project, please make sure that section headings and other things are in logical order.
3131

beginner_source/introyt/modelsyt_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def forward(self, sentence):
342342
# the 6x6 input.
343343
#
344344
# **Normalization layers** re-center and normalize the output of one layer
345-
# before feeding it to another. Centering the and scaling the intermediate
345+
# before feeding it to another. Centering and scaling the intermediate
346346
# tensors has a number of beneficial effects, such as letting you use
347347
# higher learning rates without exploding/vanishing gradients.
348348
#

prototype_source/pt2e_quant_ptq_x86_inductor.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Prerequisites
88

99
- `PyTorch 2 Export Post Training Quantization <https://pytorch.org/tutorials/prototype/pt2e_quant_ptq.html>`_
1010
- `TorchInductor and torch.compile concepts in PyTorch <https://pytorch.org/tutorials/intermediate/torch_compile_tutorial.html>`_
11+
- `Inductor C++ Wrapper concepts <https://pytorch.org/tutorials/prototype/inductor_cpp_wrapper_tutorial.html>`_
1112

1213
Introduction
1314
^^^^^^^^^^^^^^
@@ -161,7 +162,18 @@ After these steps, we finished running the quantization flow and we will get the
161162
3. Lower into Inductor
162163
------------------------
163164

164-
After we get the quantized model, we will further lower it to the inductor backend.
165+
After we get the quantized model, we will further lower it to the inductor backend. The default Inductor wrapper
166+
generates Python code to invoke both generated kernels and external kernels. Additionally, Inductor supports
167+
C++ wrapper that generates pure C++ code. This allows seamless integration of the generated and external kernels,
168+
effectively reducing Python overhead. In the future, leveraging the C++ wrapper, we can extend the capability
169+
to achieve pure C++ deployment. For more comprehensive details about C++ Wrapper in general, please refer to the
170+
dedicated tutorial on `Inductor C++ Wrapper Tutorial <https://pytorch.org/tutorials/prototype/inductor_cpp_wrapper_tutorial.html>`_.
171+
172+
::
173+
174+
# Optional: using the C++ wrapper instead of default Python wrapper
175+
import torch._inductor.config as config
176+
config.cpp_wrapper = True
165177

166178
::
167179

0 commit comments

Comments
 (0)