[Docathon] Convert cudnn_rnn_determinism.rst from rST to MyST Markdown#182701
[Docathon] Convert cudnn_rnn_determinism.rst from rST to MyST Markdown#182701gaurav0107 wants to merge 2 commits intopytorch:mainfrom
Conversation
Preparatory rename to preserve git history ahead of the rST -> MyST content conversion in the follow-up commit. Part of the Docathon h1-2025 track (pytorch#182462).
Converts the cuDNN RNN determinism note from rST to MyST syntax:
the ``.. warning::`` directive becomes a ``:::{warning}`` colon-fence
admonition, inline double-backtick literals collapse to single
backticks, and the trailing footnote-style hyperlink reference becomes
an inline Markdown link. No content changes.
The file was previously pulled into the ``nn.RNN`` and ``nn.LSTM`` class
docstrings in ``torch/nn/modules/rnn.py`` via ``.. include::``. Sphinx
parses the included file with the enclosing docstring's parser (rST),
so an MyST-syntax ``.md`` file can't be used the same way. Inline the
original rST warning into each docstring so doc rendering is unchanged
and the docs build doesn't break under ``-W``. The sibling
``.. include:: ../cudnn_persistent_rnn.rst`` is untouched.
Fixes pytorch#182462
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/182701
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit ac3f397 with merge base b007ef2 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
9634e52 to
ac3f397
Compare
|
@pytorchbot label "topic: not user facing" "module: docs" "topic: docs" "docathon-h1-2025" |
|
Claude finished @svekars's task in 2m 51s —— View job Review of PR #182701
Overall: The conversion is well-structured and the commit history approach (rename then convert) is good practice. The Issue: Orphaned
|
| ``batch_first`` argument is ignored for unbatched inputs. | ||
|
|
||
| .. include:: ../cudnn_rnn_determinism.rst | ||
| .. warning:: |
There was a problem hiding this comment.
the whole point of that file was to be able to reuse it. If .md doesn't load correctly, then we should leave .rst
Summary
Converts
docs/source/cudnn_rnn_determinism.rstto MyST Markdown as part of the Docathon h1-2025 track.Fixes #182462
Conversions
.. warning::->:::{warning}colon-fence admonition (matches the established pytorch convention used bydocs/source/storage.md,docs/source/masked.md,docs/source/fx.experimental.md)``CUDA_LAUNCH_BLOCKING=1``) -> single-backtick Markdown inline code (`CUDA_LAUNCH_BLOCKING=1`)`cuDNN 8 Release Notes`_plus.. _cuDNN 8 Release Notes: <url>) -> inline Markdown linkHistory preservation
The conversion is in two commits: first a pure
git mv(100% rename similarity), then the content conversion.git log --follow docs/source/cudnn_rnn_determinism.mdtraces back through the rename to the original 2020 addition (#40893). Verified locally.Scope note: why
torch/nn/modules/rnn.pyis in this PRThe old
docs/source/cudnn_rnn_determinism.rstwas pulled into two class docstrings via.. include:: ../cudnn_rnn_determinism.rst:torch/nn/modules/rnn.py:606(nn.RNN)torch/nn/modules/rnn.py:977(nn.LSTM)Sphinx parses
.. include::'d files with the enclosing document's parser. Docstrings are rST (conf.py:source_suffix = ".rst"), so an MyST-syntax.mdcannot substitute for the old.rstinclude target. After the rename, those two include directives would point at a non-existent path and fail thebuild-docs-python-falsejob, which runs with-W(warnings-as-errors, seedocs/Makefile).To keep the docstring output byte-identical and avoid breaking CI, the warning text is inlined directly into each of the two docstrings as a native
.. warning::block. The sibling.. include:: ../cudnn_persistent_rnn.rstis untouched because that.rstfile still exists (separate Docathon issue).Happy to split into two PRs (docs-only + rnn.py follow-up) if reviewers prefer a tighter scope.
Local verification
git log --followtraces through the rename commit..rstpath remain anywhere in the repo... include:: ../cudnn_rnn_determinism.rstreferences remain.lintrunner -a/spin lintwere not run locally (no pytorch build env on this machine); relying on CI.cc @svekars @sekyondaMeta @AlannaBurke