[MPS] Orthonormalize null-space U columns in svd_jacobi by malfet · Pull Request #196139 · pytorch/pytorch · GitHub
Skip to content

[MPS] Orthonormalize null-space U columns in svd_jacobi - #196139

Open
malfet wants to merge 2 commits into
gh/malfet/1036/basefrom
gh/malfet/1036/head
Open

[MPS] Orthonormalize null-space U columns in svd_jacobi#196139
malfet wants to merge 2 commits into
gh/malfet/1036/basefrom
gh/malfet/1036/head

Conversation

@malfet

@malfet malfet commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

The native Jacobi SVD forms U as (A V)_j / sigma_j, which collapses to zero for sigma_j at the noise floor, so rank-deficient inputs got a non-orthonormal U (U^H U != I) even though A = U S V^H still held. Replace those null columns with an orthonormal completion of the emitted columns (simd-group-parallel Gram-Schmidt of canonical vectors, like gesdd). Full-rank inputs are unaffected since the completion loop has zero trip count.

The ill-conditioned tiny-sigma accuracy reported in the same issue is a separate fp32 limitation of one-sided Jacobi and is not touched here.

Fixes #196112

Authored with assistance from Claude Code.

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

@pytorch-bot pytorch-bot Bot added ciflow/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels Sep 6, 2026
[ghstack-poisoned]
malfet added a commit that referenced this pull request Sep 6, 2026
The native Jacobi SVD forms U as (A V)_j / sigma_j, which collapses to zero for sigma_j at the noise floor, so rank-deficient inputs got a non-orthonormal U (U^H U != I) even though A = U S V^H still held. Replace those null columns with an orthonormal completion of the emitted columns (simd-group-parallel Gram-Schmidt of canonical vectors, like gesdd). Full-rank inputs are unaffected since the completion loop has zero trip count.

The ill-conditioned tiny-sigma accuracy reported in the same issue is a separate fp32 limitation of one-sided Jacobi and is not touched here.

Fixes #196112

Authored with assistance from Claude Code.

ghstack-source-id: 14cda04
Pull-Request: #196139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) open source release notes: mps Release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants