Skip to content

Commit ce954c6

Browse files
williamwen42AlannaBurkesvekars
authored
Fix typo in torch.compile tutorial (#3735)
Fixes #3729 --------- Co-authored-by: Alanna Burke <[email protected]> Co-authored-by: Svetlana Karslioglu <[email protected]>
1 parent 3f73d96 commit ce954c6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

intermediate_source/torch_compile_tutorial.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#
2828
# For an end-to-end example on a real model, check out our `end-to-end torch.compile tutorial <https://pytorch.org/tutorials/intermediate/torch_compile_full_example.html>`__.
2929
#
30-
# To troubleshoot issues and to gain a deeper understanding of how to apply ``torch.compile`` to your code, check out `the torch.compile programming model <https://docs.pytorch.org/docs/main/compile/programming_model.html>`__.
30+
# To troubleshoot issues and to gain a deeper understanding of how to apply ``torch.compile`` to your code, check out `the torch.compile programming model <https://docs.pytorch.org/docs/stable/user_guide/torch_compiler/compile/programming_model.html>`__.
3131
#
3232
# **Contents**
3333
#
@@ -379,7 +379,7 @@ def false_branch(y):
379379
# NOTE: torch.cond doesn't allow aliased outputs
380380
return y.clone()
381381

382-
x = cond(b.sum() < 0, true_branch, false_branch, (b,))
382+
b = cond(b.sum() < 0, true_branch, false_branch, (b,))
383383
return x * b
384384

385385

@@ -394,7 +394,7 @@ def false_branch(y):
394394
# `the torch.export tutorial <https://pytorch.org/tutorials/intermediate/torch_export_tutorial.html>`__
395395
# for more details on ``torch.export``.
396396
#
397-
# Check out our `section on graph breaks in the torch.compile programming model <https://docs.pytorch.org/docs/main/compile/programming_model.graph_breaks_index.html>`__
397+
# Check out our `section on graph breaks in the torch.compile programming model <https://docs.pytorch.org/docs/stable/user_guide/torch_compiler/compile/programming_model.graph_breaks_index.html>`__
398398
# for tips on how to work around graph breaks.
399399

400400
######################################################################
@@ -405,7 +405,7 @@ def false_branch(y):
405405
# Are you looking for tips on how to best use ``torch.compile``?
406406
# Or maybe you simply want to learn more about the inner workings of ``torch.compile``?
407407
#
408-
# Check out `the torch.compile programming model <https://docs.pytorch.org/docs/main/compile/programming_model.html>`__.
408+
# Check out `the torch.compile programming model <https://docs.pytorch.org/docs/stable/user_guide/torch_compiler/compile/programming_model.html>`__.
409409

410410
######################################################################
411411
# Conclusion
@@ -417,6 +417,6 @@ def false_branch(y):
417417
#
418418
# For an end-to-end example on a real model, check out our `end-to-end torch.compile tutorial <https://pytorch.org/tutorials/intermediate/torch_compile_full_example.html>`__.
419419
#
420-
# To troubleshoot issues and to gain a deeper understanding of how to apply ``torch.compile`` to your code, check out `the torch.compile programming model <https://docs.pytorch.org/docs/main/compile/programming_model.html>`__.
420+
# To troubleshoot issues and to gain a deeper understanding of how to apply ``torch.compile`` to your code, check out `the torch.compile programming model <https://docs.pytorch.org/docs/stable/user_guide/torch_compiler/compile/programming_model.html>`__.
421421
#
422422
# We hope that you will give ``torch.compile`` a try!

0 commit comments

Comments
 (0)