openblas/Define-sbgemm_r-to-fix-DYNAMIC_ARCH-builds.patch

33 lines
1.1 KiB
Diff
Raw Normal View History

Accepting request 966356 from home:eeich:branches:science - Build PPC64LE libraries with the lastest gcc available to take advantage of instruction sets in later CPUs used in the CPU specific kernels (jsc#SLE-18143, bsc#1197721). For fortran use the stock compiler to avoid compatibility issues between different versions of libfortran. This is relevant for Leap/SLE only. It may be dropped once gcc < 10 is no longer supported. - Do the same for x86_64 on SLE to make sure Cooperlake support is built properly. - Remove: * Do-not-attempt-to-check-host-CPU-if-TARGET-is-set.patch * Create-independent-kernel-Makfile-configuration-when-building-DYNAMIC_ARCH.patch * For-DYNAMIC_ARCH-don-t-use-sbgemm_r-as-parameter.c-doesn-t-get-build.patch Instead, add from upstream: * Define-sbgemm_r-to-fix-DYNAMIC_ARCH-builds.patch * Remove-extraneous-and-wrong-definition-of-sbgemm_r-on-x86_64.patch * Fix-checks-for-AVX512-and-atomics.patch * Revert-AVX512-capability-check-from-PR-1980-moved-to-build.patch * Use-CC-and-full-command-line-instead-of-hard-coding-gcc-for-AVX512-checking.patch * Utilize-compiler-AVX512-capability-info-from-c_check-when-building-getarch.patch BLAS/LAPACK implementation (boo#1177260). 'openblas-common-devel' will provide the removed 'openblas-devel-headers' while the arch specific 'preferred' flavor will provide the removed 'openblas-devel'. OBS-URL: https://build.opensuse.org/request/show/966356 OBS-URL: https://build.opensuse.org/package/show/science/openblas?expand=0&rev=131
2022-04-01 07:59:26 +00:00
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Fri Feb 25 10:04:00 2022 +0100
Subject: Define sbgemm_r to fix DYNAMIC_ARCH builds
Patch-mainline: Not yet
Git-repo: https://github.com/xianyi/OpenBLAS
Git-commit: d9894f45d30e82fd1491ae38477a1fcd79faeed1
References:
Signed-off-by: Egbert Eich <eich@suse.de>
---
kernel/setparam-ref.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c
index fe796be6..a81b32dd 100644
--- a/kernel/setparam-ref.c
+++ b/kernel/setparam-ref.c
@@ -1824,6 +1824,13 @@ static void init_parameter(void) {
fprintf(stderr, "L2 = %8d DGEMM_P .. %d\n", l2, TABLE_NAME.dgemm_p);
#endif
+#if BUILD_BFLOAT16==1
+ TABLE_NAME.sbgemm_r = (((BUFFER_SIZE -
+ ((TABLE_NAME.sbgemm_p * TABLE_NAME.sbgemm_q * 4 + TABLE_NAME.offsetA
+ + TABLE_NAME.align) & ~TABLE_NAME.align)
+ ) / (TABLE_NAME.sbgemm_q * 4) - 15) & ~15);
+#endif
+
#if BUILD_SINGLE==1
TABLE_NAME.sgemm_r = (((BUFFER_SIZE -
((TABLE_NAME.sgemm_p * TABLE_NAME.sgemm_q * 4 + TABLE_NAME.offsetA