LU solve uses cuBLAS and cuSOLVER for matrices with dim > 1024 (#61815)
Summary:
This PR builds off of https://github.com/pytorch/pytorch/issues/59148 and modifies the `lu_solve` routine to avoid MAGMA for `b` or `lu_data` matrices with any dimension > 1024, since MAGMA has a bug when dealing with such matrices (https://bitbucket.org/icl/magma/issues/19/dgesv_batched-dgetrs_batched-fails-for).
Fixes https://github.com/pytorch/pytorch/issues/36921
Fixes https://github.com/pytorch/pytorch/issues/61929
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61815
Reviewed By: anjali411
Differential Revision: D30199618
Pulled By: ngimel
fbshipit-source-id: 06870793f697e9c35aaaa8254b8a8b1a38bd3aa9