trunk/666b41fe6f33957e2ade4bd9b82f35d67857867f: [MPS] Fix SVD normalization for small singular values (#200536)
- PyTorch: 2203 events in the last 90 days
- PyTorch: 2174th Release in the last 90 days
- Previous: earlier the same day · trunk/605260d09526b2fad33658892a8eab2750665041
What happened
Fix MPS SVD dropping valid singular vectors below an absolute epsilon, causing incorrect pseudoinverses and least-squares solutions. Reproducer: import torch for device in ("cpu", "mps"): eye = torch.eye(4, dtype=torch.float32, device=device) a = 1e-8 * eye print(device, "pinv:", torch.linalg.pinv(a).cpu()) print(device, "lstsq:", torch.linalg.lstsq(a, eye).solution.cpu()) output on main: cpu pinv: tensor([[10000000…
Summary assembled by rule from the sources below