Skip to content

Commit

Permalink
Add patch to work around OpenBLAS v0.3.5 SkylakeX problems
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Jan 9, 2019
1 parent c9e5a6a commit 915deef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deps/blas.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 > $@

Expand Down
22 changes: 22 additions & 0 deletions deps/patches/openblas-skylakexdgemm.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 915deef

Please sign in to comment.