Python CPU single thread configuration

I’m going to participate in submission limited to use CPU single thread. My implementation is in Python and I found that when import mxnet, a threadpool is created. After trying for a long time, I can only reach a threadpool with 8 threads with MXNET_ENGINE_TYPE=NaiveEngine and OMP_NUM_THREADS=1.
Is there a configuration to reach a threadpool with 1 thread?
Thank you.

You have to recompile MXNet with OPENMP=0. You can find some more information in this thread: https://github.com/apache/incubator-mxnet/issues/15275


I am aided!!
With MXNET_USE_OPERATOR_TUNING=0 MXNET_ENGINE_TYPE=NaiveEngine OMP_NUM_THREADS=1 , it works!!

1 Like