openblas: backport version of fix from upstream

From this PR:
  https://github.com/OpenMathLib/OpenBLAS/pull/5442

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean
2025-09-22 09:42:46 +03:00
committed by Alexandru Ardelean
parent 5a688059e9
commit 087b985e07
3 changed files with 42 additions and 42 deletions

View File

@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=OpenBLAS
PKG_VERSION:=0.3.30
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=OpenBLAS-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/OpenMathLib/OpenBLAS/releases/download/v$(PKG_VERSION)/

View File

@@ -0,0 +1,41 @@
From cb6c4392a562e9b04299949bcfbd1fd9e5872c68 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Wed, 10 Sep 2025 22:44:14 +0200
Subject: [PATCH] Make GEMM3M parameters available on 32bit X86-GENERIC
---
param.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/param.h
+++ b/param.h
@@ -4046,8 +4046,6 @@ Until then, just keep it different than
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
-#define CGEMM3M_DEFAULT_UNROLL_N 2
-#define ZGEMM3M_DEFAULT_UNROLL_N 2
#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 2
@@ -4063,8 +4061,11 @@ Until then, just keep it different than
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
+#endif
#define CGEMM3M_DEFAULT_UNROLL_M 2
#define ZGEMM3M_DEFAULT_UNROLL_M 2
+#define CGEMM3M_DEFAULT_UNROLL_N 2
+#define ZGEMM3M_DEFAULT_UNROLL_N 2
#define CGEMM3M_DEFAULT_P 448
#define ZGEMM3M_DEFAULT_P 224
#define XGEMM3M_DEFAULT_P 112
@@ -4075,7 +4076,7 @@ Until then, just keep it different than
#define ZGEMM3M_DEFAULT_R 12288
#define XGEMM3M_DEFAULT_R 12288
-#endif
+
#ifdef ARCH_MIPS
#define SGEMM_DEFAULT_P 128

View File

@@ -1,41 +0,0 @@
--- a/param.h
+++ b/param.h
@@ -4179,5 +4179,38 @@ Until then, just keep it different than
#define SHUFPS_39 shufps $0x39,
#endif
+#if defined(ARCH_X86)
+#ifndef CGEMM3M_DEFAULT_R
+#define CGEMM3M_DEFAULT_R 12288
+#endif
+
+#ifndef CGEMM3M_DEFAULT_UNROLL_M
+#define CGEMM3M_DEFAULT_UNROLL_M 8
+#endif
+
+#ifndef CGEMM3M_DEFAULT_P
+#define CGEMM3M_DEFAULT_P 320
+#endif
+
+#ifndef CGEMM3M_DEFAULT_Q
+#define CGEMM3M_DEFAULT_Q 224
+#endif
+
+#ifndef ZGEMM3M_DEFAULT_R
+#define ZGEMM3M_DEFAULT_R 12288
+#endif
+
+#ifndef ZGEMM3M_DEFAULT_Q
+#define ZGEMM3M_DEFAULT_Q 224
+#endif
+
+#ifndef ZGEMM3M_DEFAULT_P
+#define ZGEMM3M_DEFAULT_P 224
+#endif
+
+#ifndef ZGEMM3M_DEFAULT_UNROLL_M
+#define ZGEMM3M_DEFAULT_UNROLL_M 4
+#endif
+#endif
#endif