Mathnet.Numerics suddenly requires CUDA DLL

261 Views Asked by At

I maintain a .Net Framework 4.0 application (yes, I know) that depends on Mathnet.Numerics 3.11. Recently I started getting DllNotFoundException, saying that I lack MathNet.Numerics.CUDA.dll, when I call either Matrix<T>.Solve(Vector) or DenseMatrix.QR(). I reverted to older versions and found the problem persists. This is crippling for the application, and I'm really hoping to find out what I can do to make it work again. (Separately, I do have a project underway to rewrite the application in .Net 6, but that will not be done soon.)

I did find this GitHub issue which is not encouraging.

Is there a .Net Framework 4.0 version of MathNet.Numerics.CUDA.dll available somewhere? That would probably be the simplest solution, although I suspect it may be hardware dependent.

1

There are 1 best solutions below

0
Grault On

Just upgrade MathNet.Numerics to 3.20.2 (the latest release within major version 3) and the problem goes away. It appears that the implementation was changed to package the native BLAS providers within the main DLL rather than requiring a separate DLL for each one.