Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Package implementing NumPy's UFuncs based on SVML and MKL VML

License

Notifications You must be signed in to change notification settings

IntelPython/mkl_umath

Repository files navigation

Conda package OpenSSF Scorecard

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 following command:

   python -m pip install --i 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 --i 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/


Building

Intel(R) C compiler and Intel(R) OneAPI Math Kernel Library (OneMKL) are required to build mkl_umath from source.

If these are installed as part of a oneAPI installation, the following packages must also be installed into the environment

  • cmake
  • ninja
  • cython
  • scikit-build
  • numpy

If build dependencies are to be installed with Conda, the following packages must be installed from the Intel(R) channel

  • mkl-devel
  • dpcpp_linux-64 (or dpcpp_win-64 for Windows)
  • numpy-base

then the remaining dependencies

  • cmake
  • ninja
  • cython
  • scikit-build

and for mkl-devel and dpcpp_linux-64 in a Conda environment, MKLROOT environment variable must be set On Linux

export MKLROOT=$CONDA_PREFIX

On Windows

set MKLROOT=%CONDA_PREFIX%

If using oneAPI, it must be activated in the environment

On Linux

source ${ONEAPI_ROOT}/setvars.sh

On Windows

call "%ONEAPI_ROOT%\setvars.bat"

finally, execute

CC=icx pip install --no-build-isolation --no-deps .