Showing results for 
Search instead for 
Did you mean: 

Newcomers Start Here

Journeyman III

Why is Numpy on AMD CPU and blis/libflame so much slower than using MKL?

I have an AMD Ryzen 2700x processor on Ubuntu 22.04, where, inside Conda env, I did the building from source of Numpy compiling with AOCC and following the instructions of the Numpy official guide.
From a comparison using a simple program that repeats the np.linalg.norm(), Numpy/MKL’s performance is about 100 times faster than Numpy/blis-libflame, while I would have expected AOCL to perform better than MKL.
Below is the configuration detail of both libraries and the building command:

./configure --enable-cblas --enable-threading=openmp --prefix=/home/aug/Aocl/blis_zen_mt --complex-return=intel CC=clang CXX=clang++ zen

./configure --enable-amd-aocc-flags --enable-ilp64 --prefix=/home/aug/Aocl/libflame2 CC=clang CXX=clang++ FC=flang FLIBS="-lflang"

building numpy from source:
CC=clang CXX=clang++ FC=flang FLIBS="-lflang" python -m pip install numpy --no-binary numpy -Csetup-args=-Duse-ilp64=true -Csetup-args=-Dblas=libblis -Csetup-args=-Dlapack=libflame --no-cache-dir --force-reinstall

Thanks for helping.

0 Replies