Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

mkl_set_num_threads() doesn't work

Korolev__Roman
Beginner
368 Views

Hello everyone!

I am using MxNet library with MKL support. I need my mxnet predictor use only one thread for calculations. For this purpose I used OMP_NUM_THREADS = 1 environment variable. So it works fine for me. Then I read in MKL documentation that there is a special function mkl_set_num_threads() for that and that it's equivalent to OMP_NUM_THREADS. So I removed this env variable and called mkl_set_num_threads() instead before creating and using predictor. But there was no effect - my predictor still used more than one thread for calculations and it looks like he ignored this function. Maybe I don't know something. Any ideas? Thanks.

0 Kudos
0 Replies
Reply