Adjust computeLRWorkDim() to work with Accelerate.framework (#56847)
Summary:
According to `vecLib.framework/Headers/clapack.h` Accelerate.framework's LAPACK implementation is based on 3.2.1, and so LRWORK should be computed using following formula (from
```
*> If JOBZ = 'N', LRWORK >= 7*min(M,N).
*> Otherwise,
*> LRWORK >= min(M,N)*max(5*min(M,N)+7,2*max(M,N)+2*min(M,N)+1)
```
Found while looking at test_linalg.py crashes on M1, but would have happen on x86 as well, if Pytorch+Accelerate framework are to be tested on x86_64
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56847
Reviewed By: albanD
Differential Revision: D27983352
Pulled By: malfet
fbshipit-source-id: f757c515c85b32c1e09d00a91bc20fe4b390a75a