Add cuSOLVER path for torch.linalg.lstsq (#57317)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57317
This PR implements QR-based least squares solver using geqrf, ormqr, and
triangular_solve operations.
Internal code of triangular_solve was fixed to handle correctly larger
sized rectangular arrays.
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D28312683
Pulled By: mruberry
fbshipit-source-id: dc8ae837a5fb0685d85c8733a47d7d25dc46443a