Skip to content

Commit 5aedfa2

Browse files
committed
Fixed formatting
1 parent 935c6c0 commit 5aedfa2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

recipes_source/recipes/tuning_guide.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ def fused_gelu(x):
128128
###############################################################################
129129
# Enable channels_last memory format for computer vision models
130130
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131-
# PyTorch 1.5 introduced support for `channels_last` memory format for
131+
# PyTorch 1.5 introduced support for ``channels_last`` memory format for
132132
# convolutional networks. This format is meant to be used in conjunction with
133133
# `AMP <https://pytorch.org/docs/stable/amp.html>`_ to further accelerate
134134
# convolutional neural networks with
135135
# `Tensor Cores <https://www.nvidia.com/en-us/data-center/tensor-cores/>`_.
136136
#
137-
# Support for `channels_last` is experimental, but it's expected to work for
137+
# Support for ``channels_last`` is experimental, but it's expected to work for
138138
# standard computer vision models (e.g. ResNet-50, SSD). To convert models to
139-
# `channels_last` format follow
139+
# ``channels_last`` format follow
140140
# `Channels Last Memory Format Tutorial <https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html>`_.
141141
# The tutorial includes a section on
142142
# `converting existing models <https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html#converting-existing-models>`_.
@@ -321,10 +321,10 @@ def fused_gelu(x):
321321
# every training step, it's only required to perform all-reduce after the last
322322
# call to backward, just before the execution of the optimizer.
323323
#
324-
# `DistributedDataParallel` provides
324+
# ``DistributedDataParallel`` provides
325325
# `no_sync() <https://pytorch.org/docs/stable/generated/torch.nn.parallel.DistributedDataParallel.html#torch.nn.parallel.DistributedDataParallel.no_sync>`_
326326
# context manager which disables gradient all-reduce for particular iteration.
327-
# `no_sync()` should applied to first ``N-1`` iterations of gradient
327+
# ``no_sync()`` should applied to first ``N-1`` iterations of gradient
328328
# accumulation, the last iteration should follow the default execution and
329329
# perform the required gradient all-reduce.
330330

@@ -333,8 +333,8 @@ def fused_gelu(x):
333333
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
334334
# `torch.nn.parallel.DistributedDataParallel <https://pytorch.org/docs/stable/generated/torch.nn.parallel.DistributedDataParallel.html#torch.nn.parallel.DistributedDataParallel>`_
335335
# with ``find_unused_parameters=True`` uses the order of layers and parameters
336-
# from constructors to build buckets for `DistributedDataParallel` gradient
337-
# all-reduce. `DistributedDataParallel` overlaps all-reduce with the backward
336+
# from constructors to build buckets for ``DistributedDataParallel`` gradient
337+
# all-reduce. ``DistributedDataParallel`` overlaps all-reduce with the backward
338338
# pass. All-reduce for a particular bucket is asynchronously triggered only when
339339
# all gradients for parameters in a given bucket are available.
340340
#

0 commit comments

Comments
 (0)