You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/11/10 00:10:23 UTC

[GitHub] lookenwu closed pull request #8604: set number of real cores - 1

lookenwu closed pull request #8604: set number of real cores - 1
URL: https://github.com/apache/incubator-mxnet/pull/8604
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/io/iter_image_det_recordio.cc b/src/io/iter_image_det_recordio.cc
index 4e80d5d531..8aac6154b4 100644
--- a/src/io/iter_image_det_recordio.cc
+++ b/src/io/iter_image_det_recordio.cc
@@ -249,7 +249,7 @@ inline void ImageDetRecordIOParser<DType>::Init(
   #pragma omp parallel
   {
     // be conservative, set number of real cores - 1
-    maxthread = std::max(omp_get_num_procs() - 1, 1);
+    maxthread = std::max(omp_get_num_procs() / 2 - 1, 1);
   }
   param_.preprocess_threads = std::min(maxthread, param_.preprocess_threads);
   #pragma omp parallel num_threads(param_.preprocess_threads)


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services