Skip to content

A reasonable way to use MKL.

License

Unknown, MIT licenses found

Licenses found

Unknown
License.txt
MIT
License-CoreFX.txt
Notifications You must be signed in to change notification settings

GordenOu/MathKernel

Repository files navigation

MathKernel

Windows Ubuntu
Build Status Build Status

Makes the math routines in Intel Math Kernel Library available in .NET:

Linear Algebra

BLAS (Basic Linear Algebra Subprograms) routines with decent performance are essential to most .NET applications that involve numerical computation. Managed code performs quite well for some 1 dimensional operations but it won't be able to compete with heavily hand-optimized native libraries. Since OpenBLAS stopped releasing the binaries, MKL could be the only reasonable solution for a long time.

Vector Mathematical Functions

Single precision math functions are not yet available in the framework (#1551), these vector operations can partially solve the problem.

Statistics

We have Average, Min, Max and Aggregate methods in LINQ, and System.Random with a wrong implementation (#5974). If one needs high-quality statistic functions, a quick solution was to invoke std::mersenne_twister_engine in STL, now we may have a better option.

FFT

If I understand it correctly, MKL now comes with a more friendly license than FFTW.

DNN

Under investigation.

Status

  • BLAS
    • Level 1
    • Level 2
    • Level 3
  • Others

Preparation

  1. Build the solution.
  2. Install the Visual Studio Extension produced by ./Source/MathKernel.Analyzers.Vsix, so that the compiler can detect inconsistent duplications: Analyzer
  3. Install Math Kernel Library, or any software that redistributes MKL (e.g., Anaconda and Microsoft R Open). Depending on environment variable settings, one may need to copy the binaries (e.g., mkl_rt.dll) into ./Native/MKL/.

Design

To avoid compromising performance and generality, the level of abstraction should be just enough for argument validation and object lifetime management. This means the intended usage pattern is like

GEMM(1, A, B, 0, C)

instead of

C = A * B

or

A.Multiply(B, C)

This project ignores:

  • x86
  • Naming guidelines

About

A reasonable way to use MKL.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
License.txt
MIT
License-CoreFX.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages