1diff --git a/src/common/dnnl_thread.hpp b/src/common/dnnl_thread.hpp 2index 342bc3b00..0b9190f9c 100644 3--- a/src/common/dnnl_thread.hpp 4+++ b/src/common/dnnl_thread.hpp 5@@ -104,10 +104,11 @@ inline int dnnl_get_max_threads() { 6 def_max_threads 7 = (int)dnnl::impl::cpu::platform::get_max_threads_to_use(); 8 assert(def_max_threads > 0); 9- // Use the default value if the threadpool-provided is outside the range 10- // [1, def_max_threads] 11- return tp ? std::min(std::max(1, tp->get_num_threads()), def_max_threads) 12- : def_max_threads; 13+ 14+ // Make user responsible for number of threads provided at execution time. 15+ // This relates to the fact that the library may identify `def_max_threads` 16+ // incorrectly for a platform. 17+ return tp ? std::max(1, tp->get_num_threads()) : def_max_threads; 18 } 19 inline int dnnl_in_parallel() { 20 using namespace dnnl::impl::threadpool_utils; 21