Check the availability of MAGMA / cuSOLVER when setting the Linalg backend. (#69826)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69826
This simplifies the logic needed to handle the defaultBackend flag in linalg functions.
cc ngimel jianyuh nikitaved pearu mruberry walterddr IvanYashchuk xwang233 Lezcano
Test Plan: Imported from OSS
Reviewed By: mikaylagawarecki, ngimel
Differential Revision: D33751984
Pulled By: mruberry
fbshipit-source-id: 6963820be38d4f2d82ebb5196dfcccf034ad6784
(cherry picked from commit 49c81220160062a05bc10a25d487a1f14a2959cd)