Wie kann ich Openblas mit MathNet.Numerics verwenden?C#

Ein Treffpunkt für C#-Programmierer
Guest
 Wie kann ich Openblas mit MathNet.Numerics verwenden?

Post by Guest »

Ich habe OpenBLAS mit Conda unter Windows installiert.
Meine package.config lautet wie folgt:

Code: Select all









< /code>
using System;
using MathNet.Numerics;
using MathNet.Numerics.Providers.LinearAlgebra;

class Program
{
static void Main()
{
// Configure MathNet to use OpenBLAS
LinearAlgebraControl.UseNativeOpenBLAS();

// Verify which provider is currently in use
Console.WriteLine($"CUDA available: {Control.TryUseNativeCUDA()}");
Console.WriteLine($"OpenBLAS available: {Control.TryUseNativeOpenBLAS()}");
Console.WriteLine($"MKL available: {Control.TryUseNativeMKL()}");
Console.WriteLine($"Current linear algebra provider: {LinearAlgebraControl.Provider}");

// Test matrix multiplication
var A = MathNet.Numerics.LinearAlgebra.Matrix.Build.Random(1000, 1000);
var B = MathNet.Numerics.LinearAlgebra.Matrix.Build.Random(1000, 1000);
var C = A * B;

Console.WriteLine($"Matrix multiplication result: {C.RowCount}x{C.ColumnCount}");
}
}
< /code>
However I am getting the following error:
System.NotSupportedException
HResult=0x80131515
Message=OpenBLAS Native Provider not found.
Source=
StackTrace:


Inner Exception 1:
DllNotFoundException: Unable to load DLL 'libMathNetNumericsOpenBLAS': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
< /code>
I thought libMathNetNumericsOpenBLAS.dll
ist Teil von mathNet.numerics.openblas.win , aber ich habe mich geirrt. P>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post