Skip to content

Commit

Permalink
Use 512 NUM_THREADS for OpenBLAS (#42584)
Browse files Browse the repository at this point in the history
* Use 4096 NUM_THREADS for OpenBLAS
In line with https://github.com/JuliaPackaging/Yggdrasil/blob/master/O/OpenBLAS/common.jl

* Fix

* Use fewer max threads
  • Loading branch information
ViralBShah authored Oct 12, 2021
1 parent cb9acf5 commit 5a14037
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions deps/openblas.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,7 @@ ifeq ($(OPENBLAS_USE_THREAD), 1)
OPENBLAS_BUILD_OPTS += USE_THREAD=1
OPENBLAS_BUILD_OPTS += GEMM_MULTITHREADING_THRESHOLD=50
# Maximum number of threads for parallelism
ifneq ($(ARCH),x86_64)
# Assume we can't address much memory to spawn many threads
# It is also unlikely that 32-bit architectures have too many cores
OPENBLAS_BUILD_OPTS += NUM_THREADS=8
else ifeq ($(OS),WINNT)
# Windows seems unable to handle very many
OPENBLAS_BUILD_OPTS += NUM_THREADS=16
else ifeq ($(OS),Darwin)
# This should suffice for the largest macs
OPENBLAS_BUILD_OPTS += NUM_THREADS=16
else
# On linux, try to provision for the largest possible machine currently
OPENBLAS_BUILD_OPTS += NUM_THREADS=16
endif
OPENBLAS_BUILD_OPTS += NUM_THREADS=512
else
OPENBLAS_BUILD_OPTS += USE_THREAD=0
endif
Expand Down

0 comments on commit 5a14037

Please sign in to comment.