diff --git a/stdlib/LinearAlgebra/src/LinearAlgebra.jl b/stdlib/LinearAlgebra/src/LinearAlgebra.jl index e8c2de0ac056a..86e07e118c708 100644 --- a/stdlib/LinearAlgebra/src/LinearAlgebra.jl +++ b/stdlib/LinearAlgebra/src/LinearAlgebra.jl @@ -583,7 +583,11 @@ function __init__() Base.at_disable_library_threading(() -> BLAS.set_num_threads(1)) if !haskey(ENV, "OPENBLAS_NUM_THREADS") - BLAS.set_num_threads(max(1, Sys.CPU_THREADS ÷ 2)) + @static if Sys.isapple() && Base.BinaryPlatforms.arch(Base.BinaryPlatforms.HostPlatform()) == "aarch64" + BLAS.set_num_threads(max(1, Sys.CPU_THREADS)) + else + BLAS.set_num_threads(max(1, Sys.CPU_THREADS ÷ 2)) + end end end