Skip to content

Convert docs/source/notes/numerical_accuracy.rst to MyST Markdown - #183341

Closed
akshayavb99 wants to merge 5 commits into
pytorch:mainfrom
akshayavb99:convert-notes-numerical-accuracy-rst-to-myst
Closed

akshayavb99 wants to merge 5 commits into
pytorch:mainfrom
akshayavb99:convert-notes-numerical-accuracy-rst-to-myst

Conversation

@akshayavb99

Copy link
Copy Markdown

Converts docs/source/notes/numerical_accuracy.rst in rST format to docs/source/notes/numerical_accuracy.md in MyST Markdown format.
Closes #182497
Part of PyTorch Docathon 2026.

cc @svekars @sekyondaMeta @AlannaBurke

@pytorch-bot

pytorch-bot Bot commented May 11, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/183341

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure

As of commit e38ded0 with merge base 18f91e0 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@akshayavb99

Copy link
Copy Markdown
Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label May 11, 2026
@akshayavb99

Copy link
Copy Markdown
Author

@pytorchbot label "docathon-2026"

@pytorch-bot pytorch-bot Bot added the docathon-2026 PyTorch Docathon H1 2026 label May 11, 2026
@sekyondaMeta

Copy link
Copy Markdown
Contributor

@claude

@claude

claude Bot commented May 11, 2026 •

Copy link
Copy Markdown

Claude finished @sekyondaMeta's task in 3m 11s —— View job


Review of PR #183341

  • Gather context and understand the PR changes
  • Review the converted Markdown file for correctness
  • Check for any issues with the rST to MyST conversion
  • Post review feedback

Overall the conversion looks good — formatting, code blocks, tables, and inline code are all handled well. However, there are a few cross-reference issues that will break existing links:


Issue 1 (Critical): Missing fp16_on_mi200 label

The original RST file defines .. _fp16_on_mi200: which is referenced in many places across the codebase:

  • torch/_torch_docs.py:196
  • torch/nn/modules/conv.py (6 references)
  • torch/nn/modules/rnn.py (2 references)
  • torch/nn/modules/linear.py:58

All these files use :ref:\different precision<fp16_on_mi200>`` to link to this section. The converted file does not include this label. You need to add it before the AMD MI200 section heading:

(fp16_on_mi200)=

## Reduced Precision FP16 and BF16 GEMMs and Convolutions on AMD Instinct MI200 devices

Issue 2 (Critical): Missing Linear Algebra Stability label

The original has .. _Linear Algebra Stability: which is referenced by:

  • docs/source/linalg.md:10 — {ref}\Linear Algebra Stability``
  • torch/linalg/__init__.py:701 — :ref:\Linear Algebra Numerical Stability``

The converted file uses (linear-algebra-torchlinalg)= instead. This needs to be changed to preserve the existing cross-reference target:

(Linear Algebra Stability)=

## Linear algebra (`torch.linalg`)

Issue 3 (Medium): Incorrect cross-reference targets for linalg solvers/inverses

At line 87, the file references:

{ref}`linalg solvers <linalg-solvers>` and {ref}`linalg inverses <linalg-inverses>`

But the actual labels in docs/source/linalg.md are defined with spaces (not hyphens):

(linalg solvers)=
(linalg inverses)=

These should be:

{ref}`linalg solvers <linalg solvers>` and {ref}`linalg inverses <linalg inverses>`

Issue 4 (Minor): Missing blank line after (bf16reducedprecision)= label

At line 142-143, the label runs directly into the text without a blank line separator:

(bf16reducedprecision)=
A similar flag exists for BF16 GEMM operations...

Should be:

(bf16reducedprecision)=

A similar flag exists for BF16 GEMM operations...

Summary

The conversion is well done overall — the table, code blocks, lists, and {meth}/{func}/{ref} role conversions all look correct. The main issues are the missing/renamed cross-reference labels that will break existing links from docstrings and other doc pages. Once these are addressed, this should be good to merge.

@svekars

svekars commented May 11, 2026

Copy link
Copy Markdown
Collaborator

…y.md

- Add missing (fp16_on_mi200)= anchor before the AMD MI200 section,
  referenced by torch/_torch_docs.py, torch/nn/modules/conv.py (x6),
  torch/nn/modules/rnn.py (x2), and torch/nn/modules/linear.py

- Restore (Linear Algebra Stability)= anchor (was incorrectly renamed
  to linear-algebra-torchlinalg), referenced by linalg.md and
  torch/linalg/__init__.py

- Fix {ref} targets for linalg solvers/inverses to use spaces instead
  of hyphens to match label definitions in linalg.md:
  <linalg-solvers> -> <linalg solvers>
  <linalg-inverses> -> <linalg inverses>

- Add blank line after (bf16reducedprecision)= for correct MyST parsing
@akshayavb99

Copy link
Copy Markdown
Author

Fixed errors listed in PR review
New commit for fixes - 82c9876

cc @svekars

@svekars

svekars commented May 12, 2026

Copy link
Copy Markdown
Collaborator

@svekars svekars added the easy label for easy docathon tasks label May 12, 2026
Wrap the rST hyperlink target in `{eval-rst}` with `:noindex:` option
to prevent duplicate label registration while maintaining local
cross-references within the document.
@akshayavb99

Copy link
Copy Markdown
Author

Added :noindex: with {eval-rst} to the fp16reducedprecision hyperlink to notes/numerical_accuracy.md based on suggested fix

cc @svekars

Place `{eval-rst}` with `:noindex:` for `fp16reducedprecision`
hyperlink before the required heading
`Reduced Precision Reduction for FP16 and BF16 GEMMs`
@akshayavb99

Copy link
Copy Markdown
Author

Place the noindex with hyperlink in correct location

Place {eval-rst} with :noindex: for fp16reducedprecision hyperlink before the required heading Reduced Precision Reduction for FP16 and BF16 GEMMs

cc @svekars

@svekars

svekars commented May 13, 2026

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -f "Docs only change"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

jeffdaily added a commit that referenced this pull request May 14, 2026
Conflict resolution:
- docs/source/notes/numerical_accuracy.rst was deleted by upstream (#183341)
  and replaced with numerical_accuracy.md (MyST conversion). Reapplied the
  TF32-on-MI300 section as MyST and appended it to the .md file. Kept the
  tf32_on_mi300 anchor name so :ref: from hip.rst still resolves.
- test/test_linalg.py: kept with_ieee_matmul_precision (used at line 797);
  dropped runOnRocmArch (upstream PR #183474 removed both
  @runOnRocmArch(MI300_ARCH) decorators). lintrunner -a then removed the
  newly-unused MI300_ARCH import.

Authored by Claude.
Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
…torch#183341)

Converts docs/source/notes/numerical_accuracy.rst in rST format to docs/source/notes/numerical_accuracy.md in MyST Markdown format.
Closes pytorch#182497
Part of PyTorch Docathon 2026.

Pull Request resolved: pytorch#183341
Approved by: https://github.com/svekars
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…torch#183341)

Converts docs/source/notes/numerical_accuracy.rst in rST format to docs/source/notes/numerical_accuracy.md in MyST Markdown format.
Closes pytorch#182497
Part of PyTorch Docathon 2026.

Pull Request resolved: pytorch#183341
Approved by: https://github.com/svekars
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…torch#183341)

Converts docs/source/notes/numerical_accuracy.rst in rST format to docs/source/notes/numerical_accuracy.md in MyST Markdown format.
Closes pytorch#182497
Part of PyTorch Docathon 2026.

Pull Request resolved: pytorch#183341
Approved by: https://github.com/svekars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docathon-2026 PyTorch Docathon H1 2026 easy label for easy docathon tasks Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docathon] Convert notes/numerical_accuracy.rst from rST to MyST Markdown

5 participants