mxnet
mxnet copied to clipboard
setting OMP_NUM_THREADS doesn't improve performance with MKL2017
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!
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.