Skip to content

Commit

Permalink
fix amp doc
Browse files Browse the repository at this point in the history
ghstack-source-id: ae2957d91375f4f3a10d7faebe5442b24337c21b
Pull Request resolved: #125673
  • Loading branch information
guangyey committed May 15, 2024
1 parent 470723f commit 21eca78
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/source/amp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Automatic Mixed Precision package - torch.amp

.. Both modules below are missing doc entry. Adding them here for now.
.. This does not add anything to the rendered page
.. py:module:: torch.cpu.amp
.. py:module:: torch.cuda.amp
.. automodule:: torch.amp
.. currentmodule:: torch.amp
Expand Down Expand Up @@ -40,9 +38,11 @@ For CUDA and CPU, APIs are also provided separately:

Autocasting
^^^^^^^^^^^
.. currentmodule:: torch.amp.autocast_mode
.. autosummary::
:toctree: generated
:nosignatures:

.. autofunction:: is_autocast_available
is_autocast_available

.. currentmodule:: torch

Expand Down Expand Up @@ -394,6 +394,8 @@ regardless of whether autocast is enabled.

.. This module needs to be documented. Adding here in the meantime
.. for tracking purposes
.. py:module:: torch.cpu.amp
.. py:module:: torch.cuda.amp
.. py:module:: torch.amp.autocast_mode
.. py:module:: torch.cpu.amp.autocast_mode
.. py:module:: torch.cuda.amp.autocast_mode
Expand Down

0 comments on commit 21eca78

Please sign in to comment.