mkl_umath
mkl_umath._ufuncs exposes Intel® OneAPI Math Kernel Library (OneMKL)
powered version of loops used in the patched version of NumPy, that used to be included in
Intel® Distribution for Python*.
Patches were factored out per community feedback (NEP-36).
mkl_umath started as a part of Intel® Distribution for Python* optimizations to NumPy, and is now being released
as a stand-alone package. It can be installed into conda environment using:
conda install -c https://software.repos.intel.com/python/conda mkl_umath
To install mkl_umath PyPI package please use the following command:
python -m pip install --index-url https://software.repos.intel.com/python/pypi --extra-index-url https://pypi.org/simple mkl_umath
If command above installs NumPy package from the PyPI, please use the following command to install Intel optimized NumPy wheel package from Intel PyPI Cloud:
python -m pip install --index-url https://software.repos.intel.com/python/pypi --extra-index-url https://pypi.org/simple mkl_umath numpy==<numpy_version>
where <numpy_version> should be the latest version from https://software.repos.intel.com/python/conda/.
Patching Mechanisms
mkl_umath provides convenient patch methods to enable MKL-accelerated
umath operations in NumPy with or without modifying your code.
CLI Quickstart
Persistent patch (all Python sessions)
# Install
python -m mkl_umath --patch install
# Status (exit code: 0 = installed, 1 = not installed)
python -m mkl_umath --patch status
# Remove
python -m mkl_umath --patch uninstall
Verify patch state
python -c "import mkl_umath; print(f'mkl_umath.is_patched(): {mkl_umath.is_patched()}')"
One-shot patch (single command only)
# Script
python -m mkl_umath --with-numpy-patch my_script.py
# Pytest
python -m mkl_umath --with-numpy-patch -m pytest tests/
# One-liner
python -m mkl_umath --with-numpy-patch -c "import mkl_umath; print(f\"mkl_umath.is_patched(): {mkl_umath.is_patched()}\")"
# Non-Python command
python -m mkl_umath --with-numpy-patch -- <command> [args...]
Programmatic Quickstart
import mkl_umath
import numpy
mkl_umath.patch_numpy_umath()
print(mkl_umath.is_patched())
# run your accelerated numpy workloads here!
mkl_umath.restore_numpy_umath()
import mkl_umath
import numpy
with mkl_umath.mkl_umath():
# run your accelerated workloads here!
pass
Building from source
A C compiler, Intel® oneAPI Math Kernel Library (oneMKL), and NumPy are required
to build mkl_umath from source.
Executing
CC=icx python -m pip install .
will pull in the required build dependencies, including mkl-devel and numpy, and build mkl_umath.
If you already have mkl and numpy installed (from your system or a conda environment)
and want to reuse them instead of pulling fresh copies into an isolated build, first
install the build dependencies:
pip install meson-python ninja cmake cython numpy mkl-devel
then build against the existing installation with:
CC=icx pip install --no-build-isolation --no-deps .
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkl_umath-0.5.0-0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 186.6 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9272e3a750c00f91285f5aee7d59618cfdde892f2f908cce647d1e1771cff57
|
|
| MD5 |
da54a4546451822f71a8c632c80fb011
|
|
| BLAKE2b-256 |
0df0963e1b6bc98cbe279323fc2de519530e8142efeb15fe6e58ee623b82c64e
|
File details
Details for the file mkl_umath-0.5.0-0-cp314-cp314-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp314-cp314-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 134.1 kB
- Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02610b24155c3204e8abfcd1c0cc391f0e3f1cfe908f2237e9160d75f0934258
|
|
| MD5 |
7a80a98f30b50ea0f6b1fe0ef8aa7b19
|
|
| BLAKE2b-256 |
17ff6ba74cef4027afe39b143407bdb7dcfb90e768f9fb02d132973921e62f1b
|
File details
Details for the file mkl_umath-0.5.0-0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 186.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b19723f615c0954810a3857676fee6d85c2eef12c42369f358203a1439e55e
|
|
| MD5 |
094dc4e86ca4034f7410df9aa72636a2
|
|
| BLAKE2b-256 |
fce0e131abf476db83d8a97cb68c5eaea4bf1ae73120242b0bc0507cf2af00f8
|
File details
Details for the file mkl_umath-0.5.0-0-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 134.2 kB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9f685910626dee20c6b81f82ba55d948ac233cf9f105427641adfbb3979969e
|
|
| MD5 |
88c0703e9ae3e6cab165b4c154648373
|
|
| BLAKE2b-256 |
0925fc124fc2047338d6f3ae764479ee5e4d5164402312dcb033aedfc81bac4b
|
File details
Details for the file mkl_umath-0.5.0-0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 186.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f1727a0e3e24526dd6db3b0744a2b65197f3d63ebd6964a8a6981d5b3762743
|
|
| MD5 |
9122fda8ce0a142ef37ab68a93ce2cbd
|
|
| BLAKE2b-256 |
f2c1a855c0aab11fca4d6c6b8ba3a133bd98bb766868274478e6a4558b4eeb7b
|
File details
Details for the file mkl_umath-0.5.0-0-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 134.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
181fcc7c2ad1d687082ede39672607a742d0dd20ca74a3658d341d9310df5459
|
|
| MD5 |
92aff18dd1eba5ada37915194da4e901
|
|
| BLAKE2b-256 |
d75be6263ed826210be639f627ae74b7dd8af25f55d9e39375724e102b7cc96c
|
File details
Details for the file mkl_umath-0.5.0-0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 186.5 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c0a61b105e7c810b6b3b30df9ccf9f5e2d5fb682cbf07a88b46c882a0799f66
|
|
| MD5 |
6bd41be95c267706bfef0272c8e3ef46
|
|
| BLAKE2b-256 |
9fd09476f6a93754a7c78d5fbaf8e1db7d500b3e053dbf61d967bcce4f19b11e
|
File details
Details for the file mkl_umath-0.5.0-0-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 135.0 kB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61baae959aed3fad7c7266013be0b70e47d022d31350945a5b4ab2d888656b42
|
|
| MD5 |
2d92cee174921b1fbd7bf5f58f6d9420
|
|
| BLAKE2b-256 |
8c37a236705d617303401af1105b8666a59b43f5d317eb33b407b30829d17f10
|
File details
Details for the file mkl_umath-0.5.0-0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 187.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56a4b8beb63758137fa536954f2e6f86a1ad0a746737cd647f1b0089f32fcc69
|
|
| MD5 |
4ef351367d9fa99ad336605253a7bf7c
|
|
| BLAKE2b-256 |
f3198eed5f2bf3ef8cd2f32400174b11f8864fdab00b9c00b15e8cc58cd21bd0
|
File details
Details for the file mkl_umath-0.5.0-0-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mkl_umath-0.5.0-0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 135.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd1a946c5cdee3a2b87a95a7bbeb8e0acf56d21ca454f5e556dddb70bbf3a533
|
|
| MD5 |
73db269995e3834ba5ebec4cda06ac91
|
|
| BLAKE2b-256 |
d45eedffc3a06c6fd5477606a391d41b067dc4b6dab59080f948755518a152c5
|