Torch SVD computation on mps has a large error compared to cpu

I’ve tested running singular value decomposition on a large random matrix on both mps and cpu. I used the frobenius norm of the original matrix subtracted from the matrix assembled from the SVD components and discovered that when the device is mps the norm is much much larger than the norm for cpu

CPU

MPS

Hi,

Thanks for the report. I’m not sure why this warning is not an error right now…
Could you open an issue on github with these code samples please?

@albanD opened an issue here: Torch SVD computation on mps has a large error compared to cpu · Issue #78099 · pytorch/pytorch · GitHub

1 Like