julia
d0d895e9 - jl_cpu_threads: exclude big.LITTLE efficency cores (#42099)

Commit
4 years ago
jl_cpu_threads: exclude big.LITTLE efficency cores (#42099) * jl_cpu_threads: exclude big.LITTLE efficency cores On big.LITTLE systems, we generally only want to spawn as many threads/tasks as there are performance cores. By default, we want to leave the efficiency cores alone, as they may end up choking on the heavy workloads we are likely to schedule. Even something as simple as starting `julia` and initializing OpenBLAS on each thread can cause a system-wide latency spike as the efficiency cores struggle to chew through the momentary workload. To fix this, we attempt to identify when we are running on a big.LITTLE system (the only one currently widely supported is the Apple M1), and we subtract out the known number of efficiency cores. Once macOS 12 is released, we will be able to use the official API for enumerating the perflevels of the available cores, demonstrated in this PR to pytorch's cpuinfo repository [0]. [0] https://github.com/pytorch/cpuinfo/blob/8ab2db2d405436f1014ed603021545b3b6b6f1ae/src/arm/mach/init.c#L161-L163 * whitespace
Author
Parents
Loading