# general preparation
python -m pip install -U pip setuptools wheel
python -m pip install -U pybind11 numpy
sudo apt install -y build-essential
# install package
python setup.py installBefore running the benchmark, you need to configure openmp to make sure each thread will be bind to each physical CPU core.
All we need to do is to simply export some environment variables:
# env
export OMP_NUM_THREADS=<your physical CPU core> # 8 recommended
export OMP_PLACES=cores # mapping to physical cores
export OMP_PROC_BIND=spread # spread to different places
export OMP_DYNAMIC=FALSE # disallow dynamic changing threadsThen running the benchmark:
python main.pyFor more details, ref:
