Git Product home page Git Product logo

mkl.net's People

Contributors

alloncm avatar anthonylloyd avatar atlemann avatar delreluca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mkl.net's Issues

Memory leak when using MatrixSolve with direct matrix input

We seen a constant increasing memory usage when used MatrixSolve from our code. The below example show how we used the library which cause an extra Matrix allocated and never freed (Ea in the evaluate method as that got a copy of A which never freed).

int n = 400;
matrix ax = new matrix(n, n);
matrix b = new matrix(n, 1);
for (int i = 0; i < 10000; i++)
{
      MatrixSolve solve = new MatrixSolve(ax, b);
      matrix result = solve.Evaluate();
      result.Dispose();
}
ax.Dispose();
b.Dispose();

After this point we have 10000 extra 400*400 double array in the pool which never returned.
Is there a better way to use this method with direct matrix input?

Unable to load DLL 'mkl_rt.dll'

Hi,

I'm probably missing something obvious but for example MKLNET.Vml.Asin(Values, Result1); results in:

System.DllNotFoundException
HResult=0x80131524
Message=Unable to load DLL 'mkl_rt.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
Source=MKL.NET
StackTrace:
at MKLNET.Vml.vdAsin(Int32 n, Double[] a, Double[] r)
at MKLNET.Vml.Asin(Double[] a, Double[] r)

I've add MKL.NET + Matrix + Optimization + Statistics and the only native dependency seems to be MKL.NET.Native.dll.
Should mkl_rt.dll be distributed with your package or is it something I have to install separately?

Cannot use dfti functions with windows-x64 runtime

Hi, I am having the following issue where one of the DLLs is not being built.

Using MKL.NET with the following versions:

MKL.NET 1.4.0
MKL.NET.Matrix 1.0.0
MKL.NET.win-x64 2022.0.0.115

I've been able to do some matrix and vector operations with no worries, but calling in to the C API does not work.

System.DllNotFoundException: Unable to load DLL 'MKL.NET.Native.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
   at MKLNET.Dfti.ComputeForwardInplace(Int32 n, Complex[] x_inout)
   at MKLNET.Dfti.ComputeForward(Complex[] x_inout)
   at Filtering.Fft.Resample(Double[] xs, Int32 num)

I have tried building Debug & Release for x64 & any-cpu targets.

I'm sorry if this turns out to be a stupid question, I just can't find any documentation for how to fix it myself.

Thanks.

Size of runtime packages

Hi,

First of all: thank you for your work on this great library! I am currently toying around with it and so far I do really enjoy using it!

I am currently working on some .Net CLI tools which reference the MKL.Net core package as well as the windows and/or linux runtime and I noticed that their size (runtimes) is rather large. This has the effect, that any CLI tool using the linux runtime is >250mb in size and can therefore not be hosted on nuget.org.

Unfortunately, dependencies can not be included into cli tools by reference, but are included upon build, so the only workaround I can come up with is to shrink the size of the referenced runtimes. Do you think it would be possible to do so?

Other than that, I wondered whats the rational behind MKL.NET.linux-x64.b, which is referenced by the linux runtime.

Cheers

Intel's IPP library

Just an idea, since you already have a build pipeline in place for packaging cross-platform libraries (and maybe for generating the P/Invoke boilerplate, although maybe that is handcrafted?)

We've had good experiences with Intel's other library IPP (Integrated Performance Primitives), it offers some functionality that MKL lacks like vector-scalar binary operations (e.g. add constant to vector), threshold operations and more.

It might be out of scope for this project, just tell me what you think. I might be able to contribute some P/Invoke definitions if you're interested, subject to my employer's permission.

Spline

Would it be possible to access to Spline1D in the future ?

Support 2D FFT

As far as I can tell there is only 1D fft support.

Any chance of 2D being supported in a future release?

Cant find mkl_malloc

Hi just found this awesome library and I cant find some mkl functions (especially mkl_malloc).
Does this library exposes all mkl functionality?
If so how does I find this function?
And if not can I access the native function and wrap in myself using this library (for the installation of mkl).

Thanks in advance.

Help calling Lapack.gesvd from C#

I am trying to use your package to do SVD on a large matrix. However, I am having trouble getting a simple matrix to execute. Here is the code:

            int m = 3; // Number of rows
            int n = 3; // Number of columns
            double[] a = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; // Input matrix
            double[] s = new double[Math.Min(m, n)]; // Singular values
            double[] u = new double[m * m]; // Left singular vectors
            double[] vt = new double[n * n]; // Right singular vectors
            double[] superb = new double[Math.Min(m, n) - 1]; // Array for additional information

            int info = MKLNET.Lapack.gesvd( MKLNET.Layout.ColMajor, 'A', 'A', m, n, a, n, s, u, m, vt, n, superb);

When the code executes the gesvd line - the program crashes. No error - just stops running.

Any idea on what I am doing wrong?
Thanks for the help!

Provide MKL functions for pointers

Hi,

First of all thanks for this library, it's really helpful to have the P/Invoke definitions available like this.

I wanted to ask whether it is possible to provide the MKL functions with double*,int signatures instead of double[]. Actually just making the original extern declarations public would be enough.

It would be really useful for example with pointers from memory-mapping or when I want to access only parts of an array.

Thanks and cheers

Cant execute buildNative.ps1 script

Hi,
I tried to build the project and in order to do so I executed the buildNative.ps1 script locally.
It seems like there is a problem unzipping some .nupkg files in the script.

The error massage:

PS D:\Documnets\projects\csharp\MKL.NET> .\buildNative.ps1
Expand-Archive : .nupkg is not a supported archive file format. .zip is the only supported archive file format.
At D:\Documnets\projects\csharp\MKL.NET\buildNative.ps1:11 char:5
+     Expand-Archive $filename "packages/$name"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (.nupkg:String) [Expand-Archive], IOException
    + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive

Im using:
Powershell version - 5.1.19041.906
Windows 10 Pro version 2004

My system info -

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19041 N/A Build 19041
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Organization:
Original Install Date:     8/21/2020, 9:05:38 PM
System Boot Time:          5/27/2021, 7:40:14 PM
System Manufacturer:       ASUS
System Model:              All Series
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 60 Stepping 3 GenuineIntel ~4001 Mhz
BIOS Version:              American Megatrends Inc. 2205, 2/12/2015
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume10
Input Locale:              en-us;English (United States)
Total Physical Memory:     16,323 MB
Available Physical Memory: 8,527 MB
Virtual Memory: Max Size:  25,027 MB
Virtual Memory: Available: 11,551 MB
Virtual Memory: In Use:    13,476 MB
Page File Location(s):     C:\pagefile.sys
Hotfix(s):                 12 Hotfix(s) Installed.
                           [01]: KB4601554
                           [02]: KB4559309
                           [03]: KB4561600
                           [04]: KB4570334
                           [05]: KB4577266
                           [06]: KB4577586
                           [07]: KB4580325
                           [08]: KB4586864
                           [09]: KB4593175
                           [10]: KB4598481
                           [11]: KB5003173
                           [12]: KB5003242
Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

mkl_rt.2.dll

The current DLL name is mkl_rt.2.dll. Theres no way to update the DLL variable that holds this without rebuilding.

#if LINUX
internal const string DLL = "libmkl_rt.so";
#elif OSX
internal const string DLL = "libmkl_rt.dylib";
#else
internal const string DLL = "mkl_rt.dll";
#endif

And its a FREAKING CONST So its baked in to the compile. Cant change it at runtime!!! whyyyyyy????

Your runtime nuget packages are old (2022) so I want to use the current MKL, so I would rather just be able to have path set up to it, but i cant change the damned DLL name in your library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.