diff --git a/deps/blas.mk b/deps/blas.mk index 7a73282fd0ee8..68271f32e1cf3 100644 --- a/deps/blas.mk +++ b/deps/blas.mk @@ -95,12 +95,17 @@ OPENBLAS_BUILD_OPTS += MAKE_NB_JOBS=0 ifneq ($(USE_BINARYBUILDER_OPENBLAS), 1) $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-winexit.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/source-extracted - cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ - patch -p1 -f < $(SRCDIR)/patches/openblas-winexit.patch - echo 1 > $@ + cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ + patch -p1 -f < $(SRCDIR)/patches/openblas-winexit.patch + echo 1 > $@ + +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-ofast-power.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-winexit.patch-applied + cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ + patch -p1 -f < $(SRCDIR)/patches/openblas-ofast-power.patch + echo 1 > $@ -$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-winexit.patch-applied - echo 1 > $@ +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-ofast-power.patch-applied + echo 1 > $@ $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-compiled: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured echo $(MAKE) -C $(dir $<) $(OPENBLAS_BUILD_OPTS) # echo first, so we only print the error message below in a failure case diff --git a/deps/patches/openblas-ofast-power.patch b/deps/patches/openblas-ofast-power.patch new file mode 100644 index 0000000000000..3d777eb2c8f7a --- /dev/null +++ b/deps/patches/openblas-ofast-power.patch @@ -0,0 +1,33 @@ + Makefile.power | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile.power b/Makefile.power +index 24d8aa8a..e53a243a 100644 +--- a/Makefile.power ++++ b/Makefile.power +@@ -11,20 +11,20 @@ endif + + ifeq ($(CORE), POWER9) + ifeq ($(USE_OPENMP), 1) +-COMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp ++COMMON_OPT += -mcpu=power9 -mtune=power9 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp + FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp + else +-COMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -malign-power -fno-fast-math ++COMMON_OPT += -mcpu=power9 -mtune=power9 -mvsx -malign-power -fno-fast-math + FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -malign-power -fno-fast-math + endif + endif + + ifeq ($(CORE), POWER8) + ifeq ($(USE_OPENMP), 1) +-COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp ++COMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp + FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp + else +-COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -fno-fast-math ++COMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -malign-power -fno-fast-math + FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math + endif + endif +