Accepting request 1294543 from science

OBS-URL: https://build.opensuse.org/request/show/1294543
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/blis?expand=0&rev=4
This commit is contained in:
2025-07-21 18:00:09 +00:00
committed by Git OBS Bridge
6 changed files with 183 additions and 5 deletions
+15
View File
@@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Jul 10 13:59:11 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 2.0:
* Long list of changes, see %_docdir/blis-devel/ReleaseNotes.md
or online <https://github.com/flame/blis/releases/tag/2.0>.
- Fix some incorrect/unnecessary hashbangs.
- Use fdupes to link duplicate files.
- Add patches, taken from upstream commits and rebased, to fix
builds against GCC 15:
* blis-gcc15-disable-slp-tree-vectorization.patch
(gh#flame/blis#874).
* blis-gcc15-unnecessary-openmp-include.patch
(gh#flame/blis#875).
-------------------------------------------------------------------
Wed Jan 29 23:41:03 UTC 2025 - Eyad Issa <eyadlorenzo@gmail.com>
+11 -2
View File
@@ -31,12 +31,17 @@
%define sover 4
%define shlib lib%{name}%{sover}
Name: blis
Version: 1.1
Version: 2.0
Release: 0
Summary: BLAS-like Library Instantiation Software Framework
License: BSD-3-Clause
URL: https://github.com/flame/blis
Source: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM blis-gcc15-disable-slp-tree-vectorization.patch gh#flame/blis#874 badshah400@gmail.com -- As a temporary fix for building with GCC 15, disable slp-tree-vectorization in affected files; rebased from upstream commit
Patch0: blis-gcc15-disable-slp-tree-vectorization.patch
# PATCH-FIX-UPSTREAM blis-gcc15-unnecessary-openmp-include.patch gh#flame/blis#875 badshah400@gmail.com -- Remove unnecessary OpenMP include; rebased from upstream commit
Patch1: blis-gcc15-unnecessary-openmp-include.patch
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
@@ -80,7 +85,8 @@ intensive operations. BLIS is written in ISO C99.
This package provides the headers and devel files for %{name}.
%prep
%autosetup
%autosetup -p1
sed -Ei '1{\@#!/usr/bin/env python@d}' build/flatten-headers.py
%build
export CFLAGS="%{optflags}"
@@ -100,10 +106,13 @@ export CFLAGS="%{optflags}"
%install
%make_install
sed -Ei '1{s@/usr/bin/env bash@%{_bindir}/bash@}' %{buildroot}%{_datadir}/blis/configure-plugin
# Manually remove rpath from pkgconfig file
sed -i "s/\-Wl,\-rpath.* //g" %{buildroot}%{_datadir}/pkgconfig/blis.pc
%fdupes %{buildroot}%{_datadir}/blis/
%check
pushd testsuite
./test_libblis.x
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:847c035809b8994c077ade737a4813601db96c4cf0d903d08ba6a9b8ee0fe03e
size 15706349
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08bbebd77914a6d1a43874ae5ec2f54fe6a77cba745f2532df28361b0f1ad1b3
size 15751849
@@ -0,0 +1,93 @@
From 36effd70b6a323856d98b17dda9cc3afd181b658 Mon Sep 17 00:00:00 2001
From: Devin Matthews <damatthews@smu.edu>
Date: Tue, 24 Jun 2025 15:38:15 -0500
Subject: [PATCH] Apply temporary fix for gcc 15. (#874)
Details:
- As reported in #845, gcc 15 fails to build the haswell
gemmsup kernels due to the use of rbp.
- As a temporary fix, disable slp-tree-vectorization in just
the affected files.
- Thanks @loveshack for reporting and @chillenb for the suggested
fix.
- Eventually, the kernels should be rewritten to avoid using rbp.
---
CREDITS | 1 +
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c | 7 +++++++
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c | 7 +++++++
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c | 7 +++++++
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c | 7 +++++++
5 files changed, 29 insertions(+)
Index: blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c
===================================================================
--- blis-2.0.orig/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c
+++ blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c
@@ -40,6 +40,13 @@
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
+// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
+// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
+// make sure the compiler isn't clang since it also confusingly defines __GNUC__
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
+#pragma GCC optimize("-fno-tree-slp-vectorize")
+#endif
+
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT
Index: blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c
===================================================================
--- blis-2.0.orig/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c
+++ blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c
@@ -40,6 +40,13 @@
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
+// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
+// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
+// make sure the compiler isn't clang since it also confusingly defines __GNUC__
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
+#pragma GCC optimize("-fno-tree-slp-vectorize")
+#endif
+
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT
Index: blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c
===================================================================
--- blis-2.0.orig/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c
+++ blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c
@@ -40,6 +40,13 @@
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
+// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
+// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
+// make sure the compiler isn't clang since it also confusingly defines __GNUC__
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
+#pragma GCC optimize("-fno-tree-slp-vectorize")
+#endif
+
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT
Index: blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c
===================================================================
--- blis-2.0.orig/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c
+++ blis-2.0/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c
@@ -40,6 +40,13 @@
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
+// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
+// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
+// make sure the compiler isn't clang since it also confusingly defines __GNUC__
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
+#pragma GCC optimize("-fno-tree-slp-vectorize")
+#endif
+
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT
@@ -0,0 +1,61 @@
From 843a5e8d394d126ed370da523d2c09d7e12b582d Mon Sep 17 00:00:00 2001
From: Devin Matthews <damatthews@smu.edu>
Date: Tue, 24 Jun 2025 16:46:23 -0500
Subject: [PATCH] Remove unnecessary OpenMP include. (#875)
Details:
- Previously, `<omp.h>` was included in `bli_thrcomm_openmp.h` so that the framework
could access the necessary OpenMP functions.
- As @melven reported (#873), this causes issues when `blis.h` is included in C++ code since
the `<omp.h>` include happens with `extern "C"`.
- Move the include from the header to the necessary .c files so that it does not "pollute" `blis.h`.
---
CREDITS | 1 +
frame/3/bli_l3_decor.c | 4 ++++
frame/thread/bli_thrcomm_openmp.c | 4 ++--
frame/thread/bli_thrcomm_openmp.h | 2 --
frame/thread/bli_thread_openmp.c | 2 ++
kernels/bgq/1/bli_dotv_bgq_int.c | 2 ++
6 files changed, 11 insertions(+), 4 deletions(-)
Index: blis-2.0/frame/3/bli_l3_decor.c
===================================================================
--- blis-2.0.orig/frame/3/bli_l3_decor.c
+++ blis-2.0/frame/3/bli_l3_decor.c
@@ -39,6 +39,10 @@
#include <omp.h>
#endif
+#ifdef BLIS_ENABLE_OPENMP
+#include <omp.h>
+#endif
+
struct l3_decor_params_s
{
const obj_t* a;
Index: blis-2.0/frame/thread/bli_thread_openmp.c
===================================================================
--- blis-2.0.orig/frame/thread/bli_thread_openmp.c
+++ blis-2.0/frame/thread/bli_thread_openmp.c
@@ -38,6 +38,8 @@
#include <omp.h>
+#include <omp.h>
+
void bli_thread_launch_openmp( dim_t n_threads, thread_func_t func, const void* params )
{
const timpl_t ti = BLIS_OPENMP;
Index: blis-2.0/kernels/bgq/1/bli_dotv_bgq_int.c
===================================================================
--- blis-2.0.orig/kernels/bgq/1/bli_dotv_bgq_int.c
+++ blis-2.0/kernels/bgq/1/bli_dotv_bgq_int.c
@@ -36,6 +36,8 @@
#include <omp.h>
+#include <omp.h>
+
void bli_ddotv_bgq_int
(
conj_t conjx,