Skip to content

Commit 0146260

Browse files
authored
Merge branch 'main' into sycl_extension/zzq
2 parents 52450c4 + 9bacf0b commit 0146260

File tree

9 files changed

+25
-62
lines changed

9 files changed

+25
-62
lines changed

.ci/docker/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# --extra-index-url https://download.pytorch.org/whl/cu117/index.html # Use this to run/publish tutorials against the latest binaries during the RC stage. Comment out after the release. Each release verify the correct cuda version.
22
# Refer to ./jenkins/build.sh for tutorial build instructions.
33

4-
54
# Sphinx dependencies
65
sphinx==7.2.6
76
sphinx-gallery==0.19.0
@@ -16,6 +15,7 @@ pypandoc==1.15
1615
pandocfilters==1.5.1
1716
markdown==3.8.2
1817

18+
1919
# PyTorch Theme
2020
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
2121

beginner_source/dist_overview.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PyTorch Distributed Overview
22
============================
3-
**Author**: `Will Constable <https://github.com/wconstab/>`_
3+
**Author**: `Will Constable <https://github.com/wconstab/>`_, `Wei Feng <https://github.com/weifengpy>`_
44

55
.. note::
66
|edit| View and edit this tutorial in `github <https://github.com/pytorch/tutorials/blob/main/beginner_source/dist_overview.rst>`__.
@@ -26,7 +26,7 @@ Parallelism APIs
2626
These Parallelism Modules offer high-level functionality and compose with existing models:
2727

2828
- `Distributed Data-Parallel (DDP) <https://pytorch.org/docs/stable/generated/torch.nn.parallel.DistributedDataParallel.html>`__
29-
- `Fully Sharded Data-Parallel Training (FSDP) <https://pytorch.org/docs/stable/fsdp.html>`__
29+
- `Fully Sharded Data-Parallel Training (FSDP2) <https://pytorch.org/docs/stable/distributed.fsdp.fully_shard.html>`__
3030
- `Tensor Parallel (TP) <https://pytorch.org/docs/stable/distributed.tensor.parallel.html>`__
3131
- `Pipeline Parallel (PP) <https://pytorch.org/docs/main/distributed.pipelining.html>`__
3232

@@ -74,11 +74,11 @@ When deciding what parallelism techniques to choose for your model, use these co
7474

7575
* See also: `Getting Started with Distributed Data Parallel <../intermediate/ddp_tutorial.html>`__
7676

77-
#. Use `FullyShardedDataParallel (FSDP) <https://pytorch.org/docs/stable/fsdp.html>`__ when your model cannot fit on one GPU.
77+
#. Use `FullyShardedDataParallel (FSDP2) <https://pytorch.org/docs/stable/distributed.fsdp.fully_shard.html>`__ when your model cannot fit on one GPU.
7878

79-
* See also: `Getting Started with FSDP <https://pytorch.org/tutorials/intermediate/FSDP_tutorial.html>`__
79+
* See also: `Getting Started with FSDP2 <https://pytorch.org/tutorials/intermediate/FSDP_tutorial.html>`__
8080

81-
#. Use `Tensor Parallel (TP) <https://pytorch.org/docs/stable/distributed.tensor.parallel.html>`__ and/or `Pipeline Parallel (PP) <https://pytorch.org/docs/main/distributed.pipelining.html>`__ if you reach scaling limitations with FSDP.
81+
#. Use `Tensor Parallel (TP) <https://pytorch.org/docs/stable/distributed.tensor.parallel.html>`__ and/or `Pipeline Parallel (PP) <https://pytorch.org/docs/main/distributed.pipelining.html>`__ if you reach scaling limitations with FSDP2.
8282

8383
* Try our `Tensor Parallelism Tutorial <https://pytorch.org/tutorials/intermediate/TP_tutorial.html>`__
8484

deep-dive.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ and speed.
3434
:header: Profiling PyTorch
3535
:card_description: Learn how to profile a PyTorch application
3636
:link: beginner/profiler.html
37+
:image: _static/img/thumbnails/cropped/pytorch-logo.png
3738
:tags: Profiling
3839

3940
.. customcarditem::

distributed.rst

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ There are a few ways you can perform distributed training in
1212
PyTorch with each method having their advantages in certain use cases:
1313

1414
* `DistributedDataParallel (DDP) <#learn-ddp>`__
15-
* `Fully Sharded Data Parallel (FSDP) <#learn-fsdp>`__
15+
* `Fully Sharded Data Parallel (FSDP2) <#learn-fsdp>`__
1616
* `Tensor Parallel (TP) <#learn-tp>`__
1717
* `Device Mesh <#device-mesh>`__
1818
* `Remote Procedure Call (RPC) distributed training <#learn-rpc>`__
@@ -60,28 +60,18 @@ Learn DDP
6060

6161
.. _learn-fsdp:
6262

63-
Learn FSDP
63+
Learn FSDP2
6464
----------
6565

6666
.. grid:: 3
6767

6868
.. grid-item-card:: :octicon:`file-code;1em`
69-
Getting Started with FSDP
69+
Getting Started with FSDP2
7070
:link: https://pytorch.org/tutorials/intermediate/FSDP_tutorial.html?utm_source=distr_landing&utm_medium=FSDP_getting_started
7171
:link-type: url
7272

7373
This tutorial demonstrates how you can perform distributed training
74-
with FSDP on a MNIST dataset.
75-
+++
76-
:octicon:`code;1em` Code
77-
78-
.. grid-item-card:: :octicon:`file-code;1em`
79-
FSDP Advanced
80-
:link: https://pytorch.org/tutorials/intermediate/FSDP_advanced_tutorial.html?utm_source=distr_landing&utm_medium=FSDP_advanced
81-
:link-type: url
82-
83-
In this tutorial, you will learn how to fine-tune a HuggingFace (HF) T5
84-
model with FSDP for text summarization.
74+
with FSDP2 on a transformer model
8575
+++
8676
:octicon:`code;1em` Code
8777

@@ -196,7 +186,6 @@ Custom Extensions
196186
intermediate/ddp_tutorial
197187
intermediate/dist_tuto
198188
intermediate/FSDP_tutorial
199-
intermediate/FSDP_advanced_tutorial
200189
intermediate/TCPStore_libuv_backend
201190
intermediate/TP_tutorial
202191
intermediate/pipelining_tutorial

ecosystem.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ to production deployment.
5454
:card_description: This tutorial covers how to run quantized and fused models on a Raspberry Pi 4 at 30 fps.
5555
:image: _static/img/thumbnails/cropped/realtime_rpi.png
5656
:link: intermediate/realtime_rpi.html
57-
:tags: TorchScript,Model-Optimization,Image/Video,Quantization,Ecosystem
57+
:tags: Model-Optimization,Image/Video,Quantization,Ecosystem
5858

5959
.. End of tutorial card section
6060
.. -----------------------------------------

index.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -666,13 +666,6 @@ Welcome to PyTorch Tutorials
666666
:link: intermediate/FSDP_tutorial.html
667667
:tags: Parallel-and-Distributed-Training
668668

669-
.. customcarditem::
670-
:header: Advanced Model Training with Fully Sharded Data Parallel (FSDP1)
671-
:card_description: Explore advanced model training with Fully Sharded Data Parallel package.
672-
:image: _static/img/thumbnails/cropped/Getting-Started-with-FSDP.png
673-
:link: intermediate/FSDP_advanced_tutorial.html
674-
:tags: Parallel-and-Distributed-Training
675-
676669
.. customcarditem::
677670
:header: Introduction to Libuv TCPStore Backend
678671
:card_description: TCPStore now uses a new server backend for faster connection and better scalability.

intermediate_source/FSDP_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Getting Started with Fully Sharded Data Parallel (FSDP2)
44
**Author**: `Wei Feng <https://github.com/weifengpy>`__, `Will Constable <https://github.com/wconstab>`__, `Yifan Mao <https://github.com/mori360>`__
55

66
.. note::
7-
|edit| Check out the code in this tutorial from `pytorch/examples <https://github.com/pytorch/examples/tree/main/distributed/FSDP2>`_. FSDP1 will be deprecated. The old tutorial can be found `here <https://docs.pytorch.org/tutorials/intermediate/FSDP1_tutorial.html>`_.
7+
|edit| Check out the code in this tutorial from `pytorch/examples <https://github.com/pytorch/examples/tree/main/distributed/FSDP2>`_. FSDP1 is deprecated. FSDP1 tutorials are archived in `[1] <https://docs.pytorch.org/tutorials/intermediate/FSDP1_tutorial.html>`_ and `[2] <https://docs.pytorch.org/tutorials/intermediate/FSDP_advanced_tutorial.html>`_
88

99
How FSDP2 works
1010
--------------

prototype_source/prototype_index.rst

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Unstable
2-
--------
2+
========
3+
34
API unstable features are not available as part of binary distributions
45
like PyPI or Conda (except maybe behind run-time flags). To test these
56
features we would, depending on the feature, recommend building PyTorch
@@ -14,10 +15,7 @@ decide if we want to upgrade the level of commitment or to fail fast.
1415

1516
.. raw:: html
1617

17-
</div>
18-
</div>
19-
20-
<div id="tutorial-cards-container">
18+
<div id="tutorial-cards-container">
2119

2220
<nav class="navbar navbar-expand-lg navbar-light tutorials-nav col-12">
2321
<div class="tutorial-tags-container">
@@ -43,7 +41,7 @@ decide if we want to upgrade the level of commitment or to fail fast.
4341
.. customcarditem::
4442
:header: (prototype) Accelerating BERT with semi-structured (2:4) sparsity
4543
:card_description: Prune BERT to be 2:4 sparse and accelerate for inference.
46-
:image: _static/img/thumbnails/cropped/generic-pytorch-logo.png
44+
:image: ../_static/img/thumbnails/cropped/generic-pytorch-logo.png
4745
:link: prototype/semi_structured_sparse.html
4846
:tags: Model-Optimiziation
4947

@@ -160,21 +158,12 @@ decide if we want to upgrade the level of commitment or to fail fast.
160158

161159
.. End of tutorial card section
162160
163-
.. raw:: html
164-
165-
</div>
166-
167-
<div class="pagination d-flex justify-content-center"></div>
168-
169-
</div>
170-
171-
</div>
172-
173161
.. -----------------------------------------
174162
.. Page TOC
175163
.. -----------------------------------------
176164
177165
.. toctree::
166+
:maxdepth: 2
178167
:hidden:
179168

180169
/prototype/context_parallel

recipes_source/recipes_index.rst

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Recipes
2-
---------------------------------------------
3-
Recipes are bite-sized, actionable examples of how to use specific PyTorch features, different from our full-length tutorials.
2+
========
43

5-
.. raw:: html
4+
Recipes are bite-sized, actionable examples of
5+
how to use specific PyTorch features, different
6+
from our full-length tutorials.
67

7-
</div>
8-
</div>
8+
.. raw:: html
99

10-
<div id="tutorial-cards-container">
10+
<div id="tutorial-cards-container">
1111

1212
<nav class="navbar navbar-expand-lg navbar-light tutorials-nav col-12">
1313
<div class="tutorial-tags-container">
@@ -335,20 +335,11 @@ Recipes are bite-sized, actionable examples of how to use specific PyTorch featu
335335

336336
.. End of tutorial card section
337337
338-
.. raw:: html
339-
340-
</div>
341-
342-
<div class="pagination d-flex justify-content-center"></div>
343-
344-
</div>
345-
346-
</div>
347-
348338
.. -----------------------------------------
349339
.. Page TOC
350340
.. -----------------------------------------
351341
.. toctree::
342+
:maxdepth: 2
352343
:hidden:
353344

354345
/recipes/recipes/defining_a_neural_network

0 commit comments

Comments
 (0)