File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,11 @@ function __init__()
40
40
# Ensure that OpenBLAS does not grab a huge amount of memory at first,
41
41
# since it instantly allocates scratch buffer space for the number of
42
42
# threads it thinks it needs to use.
43
- if ! haskey (ENV , " OPENBLAS_NUM_THREADS" )
43
+ # X-ref: https://github.com/xianyi/OpenBLAS/blob/c43ec53bdd00d9423fc609d7b7ecb35e7bf41b85/README.md#setting-the-number-of-threads-using-environment-variables
44
+ # X-ref: https://github.com/JuliaLang/julia/issues/45434
45
+ if ! haskey (ENV , " OPENBLAS_NUM_THREADS" ) &&
46
+ ! haskey (ENV , " GOTO_NUM_THREADS" ) &&
47
+ ! haskey (ENV , " OMP_NUM_THREADS" )
44
48
# We set this to `1` here, and then LinearAlgebra will update
45
49
# to the true value in its `__init__()` function.
46
50
ENV [" OPENBLAS_NUM_THREADS" ] = " 1"
You can’t perform that action at this time.
0 commit comments