mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

setting OMP_NUM_THREADS doesn't improve performance with MKL2017

Open patricianing opened this issue 9 years ago • 1 comments

I am trying to enable multi-threading by setting the OMP_NUM_THREADS environment variable. The prediction time is improved when I use mxnet built with openblas, however it has no effects when I use mxnet built with MKL. Anyone knows why? And what is the correct way to turn on multi-threading with MKL? Thanks!

patricianing avatar Oct 28 '17 03:10 patricianing

MKL does multithreading internally (also based on openmp, but not controlled by above environment variable). It has its own internal mechanism for controlling thread numbers, where the default is to use maximum number. So in essence: When you link with MKL, all MKL calls are anyway maximally threaded internally.

asmushetzel avatar Jan 04 '18 14:01 asmushetzel