I have an cython optimized speed program but still slowed. I want to know whether my cython program is using OpenBLAS or MKL (link openblas / mkl library)? How to know that?
It is not different as to see which dlls/shared libraries are used by a process. Start python and import your cython-module:
import my_cython_module
Python will now dynamically load your module and all shared libraries which are needed for you module, that means also MKL or BLAS.
On Linux:
pgrep python
cat /proc/<PID>/maps
On Windows:
Now, if you have both (blas and mkl) loaded, which might be the case, I guess you have to run the calculation and to look at the call stack by using a debugger to be sure.
Most of the time, your cython module wont be linked directly against MKL/BLAS but via numpy. In this case it, as it was shown in the link to a question provided by DavidW, you can just look it up via:
>>> numpy.show_config()
lapack_opt_info:
libraries = ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.