Skip to content

Commit 58f5bf5

Browse files
committed
Fix export tutorial
1 parent a18358d commit 58f5bf5

4 files changed

Lines changed: 2 additions & 17 deletions

File tree

.jenkins/validate_tutorials_built.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"intermediate_source/dqn_with_rnn_tutorial", #not working on 2.8 release reenable after 3514
2424
"intermediate_source/mnist_train_nas", # used by ax_multiobjective_nas_tutorial.py
2525
"intermediate_source/torch_compile_conv_bn_fuser",
26-
"intermediate_source/_torch_export_nightly_tutorial", # does not work on release
2726
"advanced_source/usb_semisup_learn", # fails with CUDA OOM error, should try on a different worker
2827
"unstable_source/gpu_direct_storage", # requires specific filesystem + GPUDirect Storage to be set up
2928
"recipes_source/recipes/tensorboard_with_pytorch",

conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ def wrapper(*args, **kwargs):
181181
"# https://docs.pytorch.org/tutorials/beginner/colab\n"
182182
"%matplotlib inline"
183183
),
184-
"ignore_pattern": r"_torch_export_nightly_tutorial.py",
185184
"pypandoc": {
186185
"extra_args": ["--mathjax", "--toc"],
187186
"filters": [".jenkins/custom_pandoc_filter.py"],

intermediate_source/torch_export_nightly_tutorial.rst

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

intermediate_source/torch_export_tutorial.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -843,10 +843,7 @@ def forward(self, x):
843843
print(torch.ops.aten.add_.Tensor._schema.is_mutable)
844844

845845
######################################################################
846-
# This generic IR can be used to train in eager PyTorch Autograd. This IR can be
847-
# more explicitly reached through the API ``torch.export.export_for_training``,
848-
# which was introduced in PyTorch 2.5, but calling ``torch.export.export``
849-
# should produce the same graph as of PyTorch 2.6.
846+
# This generic IR can be used to train in eager PyTorch Autograd.
850847

851848
class DecompExample(torch.nn.Module):
852849
def __init__(self) -> None:
@@ -859,7 +856,7 @@ def forward(self, x):
859856
x = self.bn(x)
860857
return (x,)
861858

862-
ep_for_training = torch.export.export_for_training(DecompExample(), (torch.randn(1, 1, 3, 3),))
859+
ep_for_training = torch.export.export(DecompExample(), (torch.randn(1, 1, 3, 3),))
863860
print(ep_for_training.graph)
864861

865862
######################################################################

0 commit comments

Comments
 (0)