Skip to content

Commit 9a44439

Browse files
authored
Create torch_compile_conv_bn_fuser tutorial adapted from fx_conv_bn_fuser (#3458)
1 parent c1cd7ab commit 9a44439

File tree

5 files changed

+301
-274
lines changed

5 files changed

+301
-274
lines changed

.jenkins/validate_tutorials_built.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"beginner_source/examples_autograd/polynomial_autograd",
2424
"beginner_source/examples_autograd/polynomial_custom_function",
2525
"intermediate_source/mnist_train_nas", # used by ax_multiobjective_nas_tutorial.py
26-
"intermediate_source/fx_conv_bn_fuser",
26+
"intermediate_source/torch_compile_conv_bn_fuser",
2727
"intermediate_source/_torch_export_nightly_tutorial", # does not work on release
2828
"advanced_source/usb_semisup_learn", # fails with CUDA OOM error, should try on a different worker
2929
"prototype_source/fx_graph_mode_ptq_dynamic",

index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,6 @@ Welcome to PyTorch Tutorials
348348

349349
.. Code Transformations with FX
350350
351-
.. customcarditem::
352-
:header: Building a Convolution/Batch Norm fuser in FX
353-
:card_description: Build a simple FX pass that fuses batch norm into convolution to improve performance during inference.
354-
:image: _static/img/thumbnails/cropped/Deploying-PyTorch-in-Python-via-a-REST-API-with-Flask.png
355-
:link: intermediate/fx_conv_bn_fuser.html
356-
:tags: FX
357-
358351
.. customcarditem::
359352
:header: Building a Simple Performance Profiler with FX
360353
:card_description: Build a simple FX interpreter to record the runtime of op, module, and function calls and report statistics
@@ -583,6 +576,13 @@ Welcome to PyTorch Tutorials
583576
:link: intermediate/torch_compile_tutorial.html
584577
:tags: Model-Optimization
585578

579+
.. customcarditem::
580+
:header: Building a Convolution/Batch Norm fuser in torch.compile
581+
:card_description: Build a simple pattern matcher pass that fuses batch norm into convolution to improve performance during inference.
582+
:image: _static/img/thumbnails/cropped/generic-pytorch-logo.png
583+
:link: intermediate/torch_compile_conv_bn_fuser.html
584+
:tags: Model-Optimization
585+
586586
.. customcarditem::
587587
:header: Inductor CPU Backend Debugging and Profiling
588588
:card_description: Learn the usage, debugging and performance profiling for ``torch.compile`` with Inductor CPU backend.
@@ -950,7 +950,6 @@ Additional Resources
950950
:hidden:
951951
:caption: Code Transforms with FX
952952

953-
intermediate/fx_conv_bn_fuser
954953
intermediate/fx_profiling_tutorial
955954

956955
.. toctree::
@@ -1001,6 +1000,7 @@ Additional Resources
10011000
intermediate/nvfuser_intro_tutorial
10021001
intermediate/ax_multiobjective_nas_tutorial
10031002
intermediate/torch_compile_tutorial
1003+
intermediate/torch_compile_conv_bn_fuser
10041004
intermediate/compiled_autograd_tutorial
10051005
intermediate/inductor_debug_cpu
10061006
intermediate/scaled_dot_product_attention_tutorial

intermediate_source/fx_conv_bn_fuser.py

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

intermediate_source/fx_profiling_tutorial.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,6 @@ def summary(self, should_sort : bool = False) -> str:
216216
#
217217
# * ``MaxPool2d`` takes up the most time. This is a known issue:
218218
# https://github.com/pytorch/pytorch/issues/51393
219-
# * BatchNorm2d also takes up significant time. We can continue this
220-
# line of thinking and optimize this in the Conv-BN Fusion with FX
221-
# `tutorial <https://pytorch.org/tutorials/intermediate/fx_conv_bn_fuser.html>`_.
222219
#
223220
#
224221
# Conclusion

0 commit comments

Comments
 (0)