trunk/620cac79649a8e9aedb624229e1dfe54e180ced5: [MPS] Prescale Jacobi SVD by the largest entry (#200776)
- PyTorch: 2335 events in the last 90 days
- PyTorch: 2305th Release in the last 90 days
- Previous: earlier the same day · trunk/ac17c1b3afb20c2d41d8d57a117419686de9c34a
What happened
svd_jacobi forms the Gram terms as fp32 sums of squares and multiplies them, which underflows for entries below 1e-9 and overflows above 1e9. Since this was added by #195950 I'm attaching milestone for 2.15. This PR prescales it by a power of two, similar to what LAPACK does ( https://github.com/Reference-LAPACK/lapack/blob/v3.12.1/SRC/sgesdd.f#L597-L610 ). import torch A = torch . randn ( 8 , 8 ) for scale in ( 1e-…
Summary assembled by rule from the sources below