cjolivier01 commented on a change in pull request #7854: Basic CPU Kernel OMP 
selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r140080388
 
 

 ##########
 File path: src/engine/threaded_engine.h
 ##########
 @@ -293,6 +299,20 @@ class ThreadedEngine : public Engine {
     finished_cv_.notify_all();
   }
 
+  /*! \brief Return default OMP thread count. Currently, this is whatever OMP 
shows as number
+   * of procs
+   */
+  static int DefaultOMPThreadsPerWorker() {
+#ifdef _OPENMP
+    // TODO(cjolivier01): Programatically obtain hyperthreading count (if 
supported)
+    // Taking max including omp_get_max_threads() in case this implementation 
of OMP accounts for
+    // hyperthreading
+    return std::max(omp_get_max_threads(), omp_get_num_procs());
 
 Review comment:
   What's the current use-case for that?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to