From 915deef604eaffa76b40d34796a7f560bc70c841 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 9 Jan 2019 01:52:25 -0500 Subject: [PATCH] Add patch to work around OpenBLAS v0.3.5 SkylakeX problems X-ref: https://github.com/JuliaLang/julia/pull/30583 X-ref: https://github.com/xianyi/OpenBLAS/issues/1955 --- deps/blas.mk | 7 ++++++- deps/patches/openblas-skylakexdgemm.patch | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 deps/patches/openblas-skylakexdgemm.patch diff --git a/deps/blas.mk b/deps/blas.mk index ff0f821ff99f6..86df41e16980f 100644 --- a/deps/blas.mk +++ b/deps/blas.mk @@ -94,7 +94,12 @@ OPENBLAS_BUILD_OPTS += MAKE_NB_JOBS=0 ifneq ($(USE_BINARYBUILDER_OPENBLAS), 1) -$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/source-extracted +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-skylakexdgemm.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/source-extracted + cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ + patch -p1 -f < $(SRCDIR)/patches/openblas-skylakexdgemm.patch + echo 1 > $@ + +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-skylakexdgemm.patch-applied perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' $(dir $<)/Makefile.system echo 1 > $@ diff --git a/deps/patches/openblas-skylakexdgemm.patch b/deps/patches/openblas-skylakexdgemm.patch new file mode 100644 index 0000000000000..f8b420f6b52c5 --- /dev/null +++ b/deps/patches/openblas-skylakexdgemm.patch @@ -0,0 +1,22 @@ +diff --git a/kernel/x86_64/KERNEL.SKYLAKEX b/kernel/x86_64/KERNEL.SKYLAKEX +index acc6356d..ad0f8973 100644 +--- a/kernel/x86_64/KERNEL.SKYLAKEX ++++ b/kernel/x86_64/KERNEL.SKYLAKEX +@@ -7,12 +7,12 @@ SGEMMITCOPY = sgemm_tcopy_16_skylakex.c + SGEMMONCOPY = sgemm_ncopy_4_skylakex.c + SGEMMOTCOPY = ../generic/gemm_tcopy_4.c + +-DGEMMKERNEL = dgemm_kernel_4x8_skylakex.c ++#DGEMMKERNEL = dgemm_kernel_4x8_skylakex.c + +-DGEMMINCOPY = dgemm_ncopy_8_skylakex.c +-DGEMMITCOPY = dgemm_tcopy_8_skylakex.c +-DGEMMONCOPY = dgemm_ncopy_8_skylakex.c +-DGEMMOTCOPY = dgemm_tcopy_8_skylakex.c ++#DGEMMINCOPY = dgemm_ncopy_8_skylakex.c ++#DGEMMITCOPY = dgemm_tcopy_8_skylakex.c ++#DGEMMONCOPY = dgemm_ncopy_8_skylakex.c ++#DGEMMOTCOPY = dgemm_tcopy_8_skylakex.c + + SGEMM_BETA = sgemm_beta_skylakex.c + DGEMM_BETA = dgemm_beta_skylakex.c