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 .
Release files for mkl-umath 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 1.6 MB
Release files / mkl_umath-0.5.0-0-cp314-cp314-win_amd64.whl
| Download URL | mkl_umath-0.5.0-0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 186.6 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a9272e3a750c00f91285f5aee7d59618cfdde892f2f908cce647d1e1771cff57
|
|
BLAKE2b-256 checksum How to use checksums |
0df0963e1b6bc98cbe279323fc2de519530e8142efeb15fe6e58ee623b82c64e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | mkl_umath-0.5.0-0-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 134.1 kB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
02610b24155c3204e8abfcd1c0cc391f0e3f1cfe908f2237e9160d75f0934258
|
|
BLAKE2b-256 checksum How to use checksums |
17ff6ba74cef4027afe39b143407bdb7dcfb90e768f9fb02d132973921e62f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp313-cp313-win_amd64.whl
| Download URL | mkl_umath-0.5.0-0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 186.4 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b2b19723f615c0954810a3857676fee6d85c2eef12c42369f358203a1439e55e
|
|
BLAKE2b-256 checksum How to use checksums |
fce0e131abf476db83d8a97cb68c5eaea4bf1ae73120242b0bc0507cf2af00f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | mkl_umath-0.5.0-0-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 134.2 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f9f685910626dee20c6b81f82ba55d948ac233cf9f105427641adfbb3979969e
|
|
BLAKE2b-256 checksum How to use checksums |
0925fc124fc2047338d6f3ae764479ee5e4d5164402312dcb033aedfc81bac4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp312-cp312-win_amd64.whl
| Download URL | mkl_umath-0.5.0-0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 186.6 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5f1727a0e3e24526dd6db3b0744a2b65197f3d63ebd6964a8a6981d5b3762743
|
|
BLAKE2b-256 checksum How to use checksums |
f2c1a855c0aab11fca4d6c6b8ba3a133bd98bb766868274478e6a4558b4eeb7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | mkl_umath-0.5.0-0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 134.7 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
181fcc7c2ad1d687082ede39672607a742d0dd20ca74a3658d341d9310df5459
|
|
BLAKE2b-256 checksum How to use checksums |
d75be6263ed826210be639f627ae74b7dd8af25f55d9e39375724e102b7cc96c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp311-cp311-win_amd64.whl
| Download URL | mkl_umath-0.5.0-0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 186.5 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5c0a61b105e7c810b6b3b30df9ccf9f5e2d5fb682cbf07a88b46c882a0799f66
|
|
BLAKE2b-256 checksum How to use checksums |
9fd09476f6a93754a7c78d5fbaf8e1db7d500b3e053dbf61d967bcce4f19b11e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | mkl_umath-0.5.0-0-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 135.0 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
61baae959aed3fad7c7266013be0b70e47d022d31350945a5b4ab2d888656b42
|
|
BLAKE2b-256 checksum How to use checksums |
8c37a236705d617303401af1105b8666a59b43f5d317eb33b407b30829d17f10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp310-cp310-win_amd64.whl
| Download URL | mkl_umath-0.5.0-0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 187.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
56a4b8beb63758137fa536954f2e6f86a1ad0a746737cd647f1b0089f32fcc69
|
|
BLAKE2b-256 checksum How to use checksums |
f3198eed5f2bf3ef8cd2f32400174b11f8864fdab00b9c00b15e8cc58cd21bd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / mkl_umath-0.5.0-0-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | mkl_umath-0.5.0-0-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 135.2 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
dd1a946c5cdee3a2b87a95a7bbeb8e0acf56d21ca454f5e556dddb70bbf3a533
|
|
BLAKE2b-256 checksum How to use checksums |
d45eedffc3a06c6fd5477606a391d41b067dc4b6dab59080f948755518a152c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|