Skip to content

Commit

Permalink
fix(tools): upgrade broken OpenBLAS dependency
Browse files Browse the repository at this point in the history
This commit upgrade OpenBLAS from 0.2.19, which is now eight years out
of date, to 0.3.27. Note that OpenBLAS support is experimental in the
first place.

Fixes: #2228
  • Loading branch information
rreusser committed May 7, 2024
1 parent 44d752e commit 10eaba9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions deps/checksums/openblas_0_3_27_tar_gz/sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897
5 changes: 4 additions & 1 deletion tools/make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ deps_boost_version_slug := $(subst .,_,$(DEPS_BOOST_VERSION))
DEPS_BOOST_BUILD_OUT ?= $(DEPS_BUILD_DIR)/boost_$(deps_boost_version_slug)

# Define the OpenBLAS version:
DEPS_OPENBLAS_VERSION ?= 0.2.19
DEPS_OPENBLAS_VERSION ?= 0.3.27

# Generate a version slug:
deps_openblas_version_slug := $(subst .,_,$(DEPS_OPENBLAS_VERSION))
Expand Down Expand Up @@ -467,6 +467,9 @@ DEPS_OPENBLAS_NO_AVX ?= 1
# Specify whether to use Haswell optimizations if binutils is too old (e.g. RHEL6):
DEPS_OPENBLAS_NO_AVX2 ?= 1

# Specify whether to use 512-bit extensions to AVX instructions
DEPS_OPENBLAS_NO_AVX512 ?= 1

# Specify whether to compile CBLAS:
DEPS_OPENBLAS_NO_CBLAS ?= 0

Expand Down
10 changes: 7 additions & 3 deletions tools/make/lib/install/openblas.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# VARIABLES #

# Define the download URL:
DEPS_OPENBLAS_URL ?= https://github.com/xianyi/OpenBLAS/archive/v$(DEPS_OPENBLAS_VERSION).tar.gz
DEPS_OPENBLAS_URL ?= https://github.com/OpenMathLib/OpenBLAS/archive/v$(DEPS_OPENBLAS_VERSION).tar.gz

# Determine the basename for the download:
deps_openblas_basename := openblas_$(deps_openblas_version_slug).tar.gz
Expand Down Expand Up @@ -102,10 +102,14 @@ endif

# Allow disabling AVX for older `binutils`:
ifeq ($(DEPS_OPENBLAS_NO_AVX), 1)
DEPS_OPENBLAS_BUILD_OPTS += NO_AVX=1 NO_AVX2=1
DEPS_OPENBLAS_BUILD_OPTS += NO_AVX=1 NO_AVX2=1 NO_AVX512=1
else
ifeq ($(DEPS_OPENBLAS_NO_AVX2), 1)
DEPS_OPENBLAS_BUILD_OPTS += NO_AVX2=1
DEPS_OPENBLAS_BUILD_OPTS += NO_AVX2=1 NO_AVX512=1
else
ifeq ($(DEPS_OPENBLAS_NO_AVX512), 1)
DEPS_OPENBLAS_BUILD_OPTS += NO_AVX512=1
endif
endif
endif

Expand Down

0 comments on commit 10eaba9

Please sign in to comment.