Closed kwea123 closed 5 years ago
mkl is already included in the Anaconda package. The numpy package in Anaconda will call mkl for parallel matrix multiplication acceleration, and I found this will cause low-efficiency problem for the multi-process dataloader due to too many threads. mkl.set_num_threads(1)
is used to disable parallel in mkl library to improve efficiency.
You can remove import mkl; mkl.set_num_threads(1)
if you find there is no such problem on your machine.
I didn't install Anaconda so this package doesn't exist by default.
Yes, I removed those two lines, but I also had to set --num_threads
to 0
(which is by default 8
) to avoid the shared memory limit (I'm using docker). In case some other people encounters this problem in the future, you could propably add this solution to readme.
Hi, in your readme, I didn't see any instruction for installing
mkl
package. This error occurs when I tried to runmain_stereo.py
, wheremkl
is imported and used on the second and third lines.Can you clarify how to install it correctly? I tried
pip install mkl
and the installation runs successfully, but theImportError
persists. Other than installing the package, I found a solution which is commenting out themkl
part, and manually set--num_threads
to0
to avoid the shared memory limit. Perhaps you can add this workaround to your readme. Thank you.