File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,10 @@ def _init_num_threads():
143143 # configured NumExpr as desired, so we emit info logs.
144144 if n_cores > MAX_THREADS :
145145 log .info ('Note: detected %d virtual cores but NumExpr set to maximum of %d, check "NUMEXPR_MAX_THREADS" environment variable.' % (n_cores , MAX_THREADS ))
146- if n_cores > 8 :
147- # The historical 'safety' limit .
148- log .info ('Note: NumExpr detected %d cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8 .' % n_cores )
149- n_cores = 8
146+ if n_cores > 16 :
147+ # Back in 2019, 8 threads would be considered safe for performance. We are in 2024 now, so adjusting .
148+ log .info ('Note: NumExpr detected %d cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 16 .' % n_cores )
149+ n_cores = 16
150150
151151 # Now we check for 'NUMEXPR_NUM_THREADS' or 'OMP_NUM_THREADS' to set the
152152 # actual number of threads used.
You can’t perform that action at this time.
0 commit comments