What's the optimal setting for JULIA_NUM_THREADS on a Macbook Pro M1 Max

with Total Numbers of Cores: 10 (8 performance and 2 efficiency)?

Is it 10? 8? 20? 16?

8 threads is probably the best, on the normal M1 4 threads is best, so I imagine 8 is what works

If I start Julia with --thread=auto it picks 6.

:roll_eyes:

navid:~/ $ /Users/navid/julia/julia --threads=auto
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0-DEV.1449 (2022-02-04)
 _/ |\__'_|_|_|\__'_|  |  Commit 9c5d7ff446 (2 days old master)
|__/                   |

julia> Base.Threads.nthreads()
6
1 Like

auto currently sets N to the number of local CPU threads but this might change in the future

The future is now? :slight_smile:

The future is now, since there are cpus with efficiency cores and performance cores, but the issue in the OP was a bug.