Skip to content

Commit adef1ed

Browse files
committed
added note about apple accelerate to get and set num threads docstring
1 parent e7da19f commit adef1ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/blas.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ Set the number of threads the BLAS library should use equal to `n::Integer`.
128128
129129
Also accepts `nothing`, in which case julia tries to guess the default number of threads.
130130
Passing `nothing` is discouraged and mainly exists for historical reasons.
131+
132+
!!! note
133+
Some BLAS libraries, such as Apple Accelerate, cannot be configured to use a fixed number of threads.
134+
For these backends, `set_num_threads()` is a no-op. See also [`get_num_threads`](@ref).
131135
"""
132136
set_num_threads(nt::Integer)::Nothing = lbt_set_num_threads(Int32(nt))
133137
function set_num_threads(::Nothing)
@@ -147,6 +151,10 @@ Get the number of threads the BLAS library is using.
147151
148152
!!! compat "Julia 1.6"
149153
`get_num_threads` requires at least Julia 1.6.
154+
155+
!!! note
156+
Some BLAS libraries, such as Apple Accelerate, cannot be configured to use a fixed number of threads.
157+
For these backends, `get_num_threads()` always returns `1`. See also [`set_num_threads`](@ref).
150158
"""
151159
get_num_threads()::Int = lbt_get_num_threads()
152160

0 commit comments

Comments
 (0)