Make torch.linalg.svdvals differentiable (#57188)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57188
`torch.linalg.svdvals` now supports autograd. This is achieved by
computing the singular vectors internally if input requires grad,
otherwise the vectors are not computed and the operation is faster.
Test Plan: Imported from OSS
Reviewed By: mrshenli
Differential Revision: D28199709
Pulled By: albanD
fbshipit-source-id: cf39cf40965c606927db5331ce16743178fa711f