Skip to content

Commit 70faa9f

Browse files
authored
Merge pull request #5756 from OpenMathLib/issue5267
Work around miscompilation of the AVX512 ?GEMM kernels by Windows LLVM
2 parents 172f41c + c59578f commit 70faa9f

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

kernel/x86_64/KERNEL.SKYLAKEX

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
include $(KERNELDIR)/KERNEL.HASWELL
22

3+
ifeq ($(C_COMPILER)$(OSNAME), CLANGWINNT)
4+
SGEMMKERNEL = sgemm_kernel_16x4_skylakex.S
5+
STRMMKERNEL = sgemm_kernel_16x4_skylakex.S
6+
else
37
SGEMMKERNEL = sgemm_kernel_16x4_skylakex_3.c
48
STRMMKERNEL = sgemm_kernel_16x4_skylakex_2.c
9+
endif
510
SGEMMINCOPY = ../generic/gemm_ncopy_16.c
611
SGEMMITCOPY = sgemm_tcopy_16_skylakex.c
712
SGEMMONCOPY = sgemm_ncopy_4_skylakex.c
@@ -20,8 +25,13 @@ SGEMM_SMALL_K_B0_TN = sgemm_small_kernel_tn_skylakex.c
2025
SGEMM_SMALL_K_TT = sgemm_small_kernel_tt_skylakex.c
2126
SGEMM_SMALL_K_B0_TT = sgemm_small_kernel_tt_skylakex.c
2227

28+
ifeq ($(C_COMPILER)$(OSNAME), CLANGWINNT)
29+
DGEMMKERNEL = dgemm_kernel_16x2_skylakex.S
30+
DTRMMKERNEL = dgemm_kernel_16x2_skylakex.S
31+
else
2332
DGEMMKERNEL = dgemm_kernel_16x2_skylakex.c
2433
DTRMMKERNEL = dgemm_kernel_16x2_skylakex.c
34+
endif
2535
DGEMMINCOPY = ../generic/gemm_ncopy_16.c
2636
DGEMMITCOPY = dgemm_tcopy_16_skylakex.c
2737
DGEMMONCOPY = ../generic/gemm_ncopy_2.c
@@ -41,8 +51,13 @@ DGEMM_SMALL_K_B0_TT = dgemm_small_kernel_tt_skylakex.c
4151
SGEMM_BETA = sgemm_beta_skylakex.c
4252
DGEMM_BETA = dgemm_beta_skylakex.c
4353

54+
ifeq ($(C_COMPILER)$(OSNAME), CLANGWINNT)
55+
CGEMMKERNEL = cgemm_kernel_8x2_haswell.c
56+
ZGEMMKERNEL = zgemm_kernel_4x2_haswell.c
57+
else
4458
CGEMMKERNEL = cgemm_kernel_8x2_skylakex.c
4559
ZGEMMKERNEL = zgemm_kernel_4x2_skylakex.c
60+
endif
4661

4762
CASUMKERNEL = casum.c
4863
ZASUMKERNEL = zasum.c

test/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_helper.ps1
6666
"$ErrorActionPreference = \"Stop\"\n"
6767
"Get-Content $args[1] | & $args[0]\n"
6868
"If ((Get-Content $args[2] | %{$_ -match \"FATAL\"}) -contains $true) {\n"
69-
"echo Error\n"
69+
"echo Error in $args[1]:\n"
70+
"Get-Content $args[2] \n"
7071
"exit 1\n"
7172
"} else {\n"
7273
"exit 0\n"

0 commit comments

Comments
 (0)