Thanks for your answer.
I understand that in the end, Lapack is used.
For the simple inversion, PyTorch is using getrf (see here 2) and for the Moore-Penrose pseudo inverse, it’s using LU decomposition with SVD, but using gesdd as you point out from the docs.
Maybe Intel does more optimization on their higher end CPUs, but how comes the simple matrix inversion takes so much longer on the Xeon then?
If I believe this benchmark 1
the Xeon should be way faster, and it is in fact slower in my benchmark, so it’s a bit confusing.
Also confusing is the fact that comparatively, statsmodel OLS, which uses a pseudo inverse algorithm using svd also implemented using the Lapack gesdd, is also slower on the Xeon, so the gesdd can’t seem to explain the difference here.
I’m going to try to benchmark the tensordot operation and see if it makes a difference, but that should be a pretty trivial operation.