anirudh2290 commented on a change in pull request #13606: Complimentary gluon
DataLoader improvements
URL: https://github.com/apache/incubator-mxnet/pull/13606#discussion_r240914759
##########
File path: src/initialize.cc
##########
@@ -57,13 +57,18 @@ class LibraryInitializer {
Engine::Get()->Start();
},
[]() {
- // Make children single threaded since they are typically workers
- dmlc::SetEnv("MXNET_CPU_WORKER_NTHREADS", 1);
- dmlc::SetEnv("OMP_NUM_THREADS", 1);
+ // Conservative thread management for multiprocess workers
+ const size_t mp_worker_threads =
dmlc::GetEnv("MXNET_MP_WORKER_NTHREADS", 1);
+ const size_t mp_omp_threads = dmlc::GetEnv("MXNET_MP_OMP_NUM_THREADS",
1);
Review comment:
libgomp doesnt play well with fork:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52303 . Which means user using
libgomp and increasing the num threads can run into a deadlock.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services