Fixed the size of the workspace array in functions calling LAPACK (#53909)
Summary:
The size of the workspace array should be max(1, lwork) according to LAPACK documentation. We got away with this previously because we tested only MKL which does a nice thing returning lwork >= 1.
Fixes https://github.com/pytorch/pytorch/issues/53454
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53909
Reviewed By: heitorschueroff
Differential Revision: D27017025
Pulled By: mruberry
fbshipit-source-id: 040a8cfb4bfb98db47d0b117938856d9483b20fb