How to make MxNet use only specific CPU cores


#1

Hello everyone! My question could be a little strange but I’ll try anyway.
What I have:
Windows 7, mxnet-1.3.0 with MKL and without GPU.
What I want:
I want to set MxNet model a specific CPU core to run. For example: I have an Intel CPU with 4 cores and a CNN classifier. I want to say: “Use for predictions core #1, and DONT use another cores because my application need them for another tasks”.
What I have already done:
I have set this envs:
MXNET_CPU_NNPACK_NTHREADS=1
MXNET_CPU_PRIORITY_NTHREADS=1
MXNET_CPU_WORKER_NTHREADS=1
MXNET_ENABLE_OPERATOR_TUNING=0
MXNET_ENGINE_TYPE=NaiveEngine
MXNET_MP_WORKER_NTHREADS=1
Any ideas how to do that? Thanks.


#2

MKL library should respect OMP_NUM_THREADS. Have you tried that?


#3

Not yet! So, shall I put OMP_NUM_THREADS=1?


#4

Setting it to 1 should limit MKL to one thread.