Skip to content

Commit 84e406f

Browse files
nirajkamaliupaikov-amd
authored andcommitted
Fix deprecated amp APIs in docs (pytorch#154553)
Update usage of deprecated amp APIs. Fixes pytorch/tutorials#3331 Pull Request resolved: pytorch#154553 Approved by: https://github.com/Skylion007
1 parent 70611a1 commit 84e406f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/amp.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ As shown in the CPU example section of :class:`torch.autocast`, "automatic mixed
2626
datatype of ``torch.bfloat16`` only uses :class:`torch.autocast`.
2727

2828
.. warning::
29-
``torch.cuda.amp.autocast(args...)`` and ``torch.cpu.amp.autocast(args...)`` will be deprecated. Please use ``torch.autocast("cuda", args...)`` or ``torch.autocast("cpu", args...)`` instead.
30-
``torch.cuda.amp.GradScaler(args...)`` and ``torch.cpu.amp.GradScaler(args...)`` will be deprecated. Please use ``torch.GradScaler("cuda", args...)`` or ``torch.GradScaler("cpu", args...)`` instead.
29+
``torch.cuda.amp.autocast(args...)`` and ``torch.cpu.amp.autocast(args...)`` is deprecated. Please use ``torch.amp.autocast("cuda", args...)`` or ``torch.amp.autocast("cpu", args...)`` instead.
30+
``torch.cuda.amp.GradScaler(args...)`` and ``torch.cpu.amp.GradScaler(args...)`` is deprecated. Please use ``torch.amp.GradScaler("cuda", args...)`` or ``torch.amp.GradScaler("cpu", args...)`` instead.
3131

3232
:class:`torch.autocast` and :class:`torch.cpu.amp.autocast` are new in version `1.10`.
3333

0 commit comments

Comments
 (0)