Skip to content

Create torch_compile_conv_bn_fuser tutorial adapted from fx_conv_bn_fuser #3458

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

Merged
merged 5 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .jenkins/validate_tutorials_built.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"beginner_source/examples_autograd/polynomial_autograd",
"beginner_source/examples_autograd/polynomial_custom_function",
"intermediate_source/mnist_train_nas", # used by ax_multiobjective_nas_tutorial.py
"intermediate_source/fx_conv_bn_fuser",
"intermediate_source/torch_compile_conv_bn_fuser",
"intermediate_source/_torch_export_nightly_tutorial", # does not work on release
"advanced_source/usb_semisup_learn", # fails with CUDA OOM error, should try on a different worker
"prototype_source/fx_graph_mode_ptq_dynamic",
Expand Down
16 changes: 8 additions & 8 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,6 @@ Welcome to PyTorch Tutorials

.. Code Transformations with FX

.. customcarditem::
:header: Building a Convolution/Batch Norm fuser in FX
:card_description: Build a simple FX pass that fuses batch norm into convolution to improve performance during inference.
:image: _static/img/thumbnails/cropped/Deploying-PyTorch-in-Python-via-a-REST-API-with-Flask.png
:link: intermediate/fx_conv_bn_fuser.html
:tags: FX

.. customcarditem::
:header: Building a Simple Performance Profiler with FX
:card_description: Build a simple FX interpreter to record the runtime of op, module, and function calls and report statistics
Expand Down Expand Up @@ -583,6 +576,13 @@ Welcome to PyTorch Tutorials
:link: intermediate/torch_compile_tutorial.html
:tags: Model-Optimization

.. customcarditem::
:header: Building a Convolution/Batch Norm fuser in torch.compile
:card_description: Build a simple pattern matcher pass that fuses batch norm into convolution to improve performance during inference.
:image: _static/img/thumbnails/cropped/generic-pytorch-logo.png
:link: intermediate/torch_compile_conv_bn_fuser.html
:tags: Model-Optimization

.. customcarditem::
:header: Inductor CPU Backend Debugging and Profiling
:card_description: Learn the usage, debugging and performance profiling for ``torch.compile`` with Inductor CPU backend.
Expand Down Expand Up @@ -950,7 +950,6 @@ Additional Resources
:hidden:
:caption: Code Transforms with FX

intermediate/fx_conv_bn_fuser
intermediate/fx_profiling_tutorial

.. toctree::
Expand Down Expand Up @@ -1001,6 +1000,7 @@ Additional Resources
intermediate/nvfuser_intro_tutorial
intermediate/ax_multiobjective_nas_tutorial
intermediate/torch_compile_tutorial
intermediate/torch_compile_conv_bn_fuser
intermediate/compiled_autograd_tutorial
intermediate/inductor_debug_cpu
intermediate/scaled_dot_product_attention_tutorial
Expand Down
262 changes: 0 additions & 262 deletions intermediate_source/fx_conv_bn_fuser.py

This file was deleted.

3 changes: 0 additions & 3 deletions intermediate_source/fx_profiling_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ def summary(self, should_sort : bool = False) -> str:
#
# * ``MaxPool2d`` takes up the most time. This is a known issue:
# https://github.com/pytorch/pytorch/issues/51393
# * BatchNorm2d also takes up significant time. We can continue this
# line of thinking and optimize this in the Conv-BN Fusion with FX
# `tutorial <https://pytorch.org/tutorials/intermediate/fx_conv_bn_fuser.html>`_.
#
#
# Conclusion
Expand Down
Loading