NumPy uses libraries like BLAS, LAPACK, BLIS, or MKL to execute vector, matrix, and linear algebra operations. It’s acknowledged that Intel with MKL (Math Kernel Library) is quite more mature in this math operation than other libraries due to resources and experiences.
If you want to leverage Intel OneAPI MKL as backend for your Numpy, especially on Intel chip (or AMD if you want to try), here are a quick step for installation in Ubuntu (I use the latest ubuntu 23.04 Lunar Lobster).
First, download the required softwares
sudo apt install build-essential python3-pip python3 python3-dev libomp-dev
A context, libomp-dev will help you to avoid the error “Solve bmkl_intel_thread.so.2: undefined symbol: omp_get_num_procs” when importing the numpy libraries in the python interpreter.
Second, we will install the Intel Base-kit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=linux&distributions=aptpackagemanager.
Or follow the commands below