ldl_factor fix magma version check (#77019)
The tests were failing for CUDA 11.6 environment because it is using MAGMA 2.6.1 and preprocessor macros were incorrectly checking the version.
Fixes #76961
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77019
Approved by: https://github.com/Lezcano, https://github.com/mruberry