Math Kernel Library

Last updated
Intel oneAPI Math Kernel Library
Developer(s) Intel
Initial releaseNovember 1994;30 years ago (1994-11)
Stable release
2024.2 / June 14, 2024;13 months ago (2024-06-14) [1]
Written in C/C++, DPC++, Fortran
Operating system Microsoft Windows, Linux
Platform CPU [2]

GPU

Type Library and framework
License freeware under ISSL [3] [4]
Website www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html   OOjs UI icon edit-ltr-progressive.svg

Intel oneAPI Math Kernel Library (Intel oneMKL), formerly known as Intel Math Kernel Library, is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPACK, sparse solvers, fast Fourier transforms, and vector math. [5] [6]

Contents

The library supports x86 CPUs and Intel GPUs [2] and is available for Windows and Linux operating systems. [5] [6] [7]

Intel oneAPI Math Kernel Library is not to be confused with the oneAPI Math Library (oneMath), formerly known as oneMKL Interfaces, which is an open-source wrapper library that allows DPC++ applications to call oneMKL routines that can be offloaded to multiple hardware architectures and vendors defined during runtime. [8]

History and licensing

Intel launched the oneAPI Math Kernel Library in November 1994, and called it Intel BLAS Library. [9] In 1996, the library was renamed to Intel Math Kernel Library until April 2020, when intel oneMKL has become part of oneAPI initiative to support multiple hardware architectures, holding the current name Intel oneAPI Math Kernel Library.

The library is available as part of oneAPI Toolkits and in a standalone form, free of charge under the terms of Intel Simplified Software License [3] which allow redistribution. [10] Commercial support for Intel oneMKL is available when purchased as part of oneAPI Base Toolkit.

Following Apple’s transition away from x86 CPUs, Intel oneMKL last release available for macOS is the version 2023.2.2 and it is scheduled for removal by the end of 2024.

Performance and vendor lock-in

MKL and other programs generated by the Intel C++ Compiler and the Intel DPC++ Compiler improve performance with a technique called function multi-versioning: a function is compiled or written for many of the x86 instruction set extensions, and at run-time a "master function" uses the CPUID instruction to select a version most appropriate for the current CPU. However, as long as the master function detects a non-Intel CPU, it almost always chooses the most basic (and slowest) function to use, regardless of what instruction sets the CPU claims to support. This has netted the system a nickname of "cripple AMD" routine since 2009. [11] As of 2020, Intel's MKL remains the numeric library installed by default along with many pre-compiled mathematical applications on Windows (such as NumPy, SymPy). [12] [13] Although relying on the MKL, MATLAB implemented a workaround starting with Release 2020a which ensures full support for AVX2 by the MKL also for non Intel (AMD) CPUs. [14]

Details

Functional categories

Intel oneMKL has the following functional categories: [15]

Once, oneMKL included Deep Neural Network functions, but they were removed in version 2020 as a spin-off that originated the open-source Intel oneAPI Deep Neural Network Library. [16]

See also

References

  1. "Intel® Math Kernel Library Release Notes and New Features". software.intel.com.
  2. 1 2 Intel® oneAPI Math Kernel Library (oneMKL) | Intel® Software
  3. 1 2 "Intel Simplified Software License".
  4. "OneMKL — oneAPI Specification 1.1-rev-1 documentation".
  5. 1 2 "Intel Math Kernel Library".
  6. 1 2 "Intel Math Kernel Library (MKL)".
  7. "MKL - Intel Math Kernel Library". 23 April 2012.
  8. "oneapi-src/oneMKL". oneAPI-SRC. 19 March 2021. oneMKL interfaces are an open-source implementation of the oneMKL Data Parallel C++ (DPC++) interface according to the oneMKL specification. It works with multiple devices (backends) using device-specific libraries underneath.
  9. "Intel Math Kernel Library, Reference Manual, Version Information" (PDF). c. 2004. p. ii. Retrieved July 25, 2024.
  10. "Intel Math Kernel Library Licensing FAQ".
  11. Agner Fog. "Agner's CPU blog - Intel's "cripple AMD" function".
  12. "Comment chain in: r/matlab - How-To force Matlab to use a fast codepath on AMD Ryzen/TR CPUs - up to 250% performance gains". reddit. 31 March 2020. Retrieved 2020-06-06.
  13. "High-Performance Computing Center Stuttgart - Knowledge Base - Libraries(Hawk)" . Retrieved 2020-06-06.
  14. "Crippled No Longer: Matlab Now Runs on AMD CPUs at Full Speed - ExtremeTech". www.extremetech.com. 31 March 2020. Retrieved 2020-10-29.
  15. admin (2019-11-14). "Developer Reference for Intel® Math Kernel Library - C". software.intel.com. Retrieved 2019-11-27.
  16. "Transitioning from Intel MKL-DNN to oneDNN". Intel. Retrieved 25 July 2024.