ArticleslgStudy

computer science

Math Kernel Library

Math Kernel Library is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Math Kernel Library rather than just read about it. In short: 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.

Key takeaways

  • Math Kernel Library belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Math Kernel Library to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Math Kernel Library from memory before moving on to harder problems.

Reference excerpt

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. The library supports x86 CPUs and Intel GPUs and is available for Windows and Linux operating systems. 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.

History and licensing Intel launched the oneAPI Math Kernel Library in November 1994, and called it Intel BLAS Library. 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 which allow redistribution. 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. 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). 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.

Details

Functional categories Intel oneMKL has the following functional categories:

Linear algebra: BLAS routines are vector-vector (Level 1), matrix-vector (Level 2) and matrix-matrix (Level 3) operations for real and complex single and double precision data. LAPACK consists of tuned LU, Cholesky and QR factorizations, eigenvalue and least squares solvers. MKL also includes Sparse BLAS, ScaLAPACK, Sparse Solver, Extended Eigensolver (FEAST, PARDISO), PBLAS and BLACS. MKL is even better at small dimensions than libxsmm. Since oneMKL uses standard interfaces for BLAS and LAPACK, the application which uses other implementations can get better performance on Intel and compatible processors by re-linking with MKL libraries. oneMKL includes a variety of Fast Fourier Transforms (FFTs) from 1D to multidimensional, complex to complex, real to complex, and real to real transforms of arbitrary lengths. Applications written with the open source FFTW can be easily ported to MKL by linking with interface wrapper libraries provided as part of MKL for easy migration. Cluster versions of LAPACK and FFTs are also available as part of MKL to take advantage of MPI parallelism in addition to single node parallelism from multithreading. Vector math functions include computationally intensive core mathematical operations for single and double precision real and complex data types. These are similar to libm functions from compiler libraries but operate on vectors rather than scalars to provide better performance. There are various controls for setting accuracy, error mode and denormalized number handling to customize the behavior of the routines. Statistics functions include random number generators and probability distributions, optimized for multicore processors. Also included are compute-intensive in and out-of-core routines to compute basic statistics, estimation of dependencies etc. Data fitting functions include splines (linear, quadratic, cubic, look-up, stepwise constant) for 1-dimensional interpolation that can be used in data analytics, geometric modeling and surface approximation applications. Partial Differential Equations Nonlinear Optimization Problem Solvers 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.

See also OneAPI (compute acceleration) List of numerical libraries Automatically Tuned Linear Algebra Software (ATLAS) GotoBLAS and OpenBLAS Integrated Performance Primitives Intel Cryptography Primitives Library Numerical Library Collection – by NEC for their vector processor

References

External links Official website Documentation oneMKL User Forum oneAPI oneMKL Specification oneMKL Benchmarks Suite

Worked examples

Example 1 — a first encounter with Math Kernel Library

Start with the simplest possible case. Write down what Math Kernel Library claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Math Kernel Library before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Math Kernel Library ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Math Kernel Library

In research
Math Kernel Library appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Math Kernel Library in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Math Kernel Library is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2003 software, C++ numerical libraries, Intel software, so understanding it makes those chapters shorter.
In everyday life
Look for Math Kernel Library outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Math Kernel Library” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Math Kernel Library in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Math Kernel Library means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Math Kernel Library out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Math Kernel Library in simple terms?

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.

Why does Math Kernel Library matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Math Kernel Library?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Math Kernel Library.

Tags

  • 2003 software
  • C++ numerical libraries
  • Intel software
  • Numerical software

Keep exploring