Skip to content

Add doc for Newton-Schulz orthogonalization quality - #309

Merged
skyw merged 9 commits into
mainfrom
skyw/ns_precision_primer
Oct 14, 2026
Merged

skyw merged 9 commits into
mainfrom
skyw/ns_precision_primer

Conversation

@skyw

@skyw skyw commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

skyw added 8 commits October 12, 2026 16:41
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
@skyw
skyw requested a review from mkhona-nvidia October 13, 2026 17:43
@copy-pr-bot

copy-pr-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Hao Wu <skyw@nvidia.com>
@skyw skyw added the docs-only With great power comes great responsibility. label Oct 13, 2026
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact]

The benchmark must satisfy the repository's GPU-wait rule before merging.

Findings

  1. P1 Python repeatedly waits for GPU ▶
  2. P2 Selected results disappear from plots ▶
  3. P2 Run setup is missing ▶

Summary

Adds a benchmark and primer comparing Newton–Schulz output with an FP64 polar reference.

  • A benchmark measures Newton–Schulz quality against a polar reference.
  • The Primer explains the Newton–Schulz quality comparison and shows its results.

The attached image could not be inspected because this model does not support image input.

Reviews (1) · Last reviewed commit: "fix license header" · Reviewed by Greptile

Comment thread benchmarks/newton_schulz_quality.py
Comment on lines +124 to +125
if coefficient in {"simple", "aol", "cans"}:
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Selected results disappear from plots

plot_results silently drops simple, aol, and cans, although --coefficients accepts and evaluates them. A valid run with --coefficients=simple --plot=... saves a plot with no curves. Plot every requested set, or make the filter explicit and reject selections that would produce an empty plot.

Suggested change
if coefficient in {"simple", "aol", "cans"}:
continue

Comment on lines +18 to +23
```bash
python -m benchmarks.newton_schulz_quality \
--precisions=highest,high,medium \
--steps=5,8,10,16 --spectra=gaussian,uniform,hilbert,logspace \
--output=/tmp/newton-schulz-quality.json \
--plot=/tmp/newton-schulz-quality.png

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Run setup is missing

The command needs setup instructions. The script requires torch.linalg.polar and says PyTorch 2.14 or newer, defaults to CUDA, and imports matplotlib for the requested plot. The lockfile selects PyTorch 2.8.0, and no dependency group declares matplotlib.

Explain how to prepare the environment and record the PyTorch version and GPU used for the published figure. Readers need these details to rerun and compare the results.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@skyw

skyw commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 3b734f3

@copy-pr-bot

copy-pr-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

/ok to test 3b734f3

@skyw, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@skyw
skyw enabled auto-merge (squash) October 13, 2026 18:22
@skyw

skyw commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 3b734f3

@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

/ok to test 3b734f3

@skyw, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@skyw

skyw commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 3b734f3

@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

/ok to test 3b734f3

@skyw, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@skyw

skyw commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 3b734f3

@github-actions

Copy link
Copy Markdown

Test Results

0 files   -    99  0 suites   - 200   0s ⏱️ - 2m 12s
0 tests  - 1 586  0 ✅  - 1 586  0 💤 ±0  0 ❌ ±0 
0 runs   - 3 811  0 ✅  - 3 811  0 💤 ±0  0 ❌ ±0 

Results for commit 3b734f3. ± Comparison against base commit 4ebce60.

@skyw
skyw disabled auto-merge October 14, 2026 16:03
@skyw
skyw merged commit 4bbed19 into main Oct 14, 2026
22 checks passed
@skyw
skyw deleted the skyw/ns_precision_primer branch October 14, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-only With great power comes great responsibility.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant