From c662b0b70a3cd69af2c2472ed7e3c9808677dc3e Mon Sep 17 00:00:00 2001 From: CBL-Mariner-Bot <75509084+CBL-Mariner-Bot@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:22:35 -0800 Subject: [PATCH] Upgrade openblas to 0.3.26 in Mariner 3.0 (#7679) Co-authored-by: Nan Liu Co-authored-by: Nan Liu <108544011+liunan-ms@users.noreply.github.com> --- SPECS/openblas/No-Fortran-Build.patch | 2 +- .../openblas-0.2.15-constructor.patch | 19 ------- .../openblas-0.3.21-sbgemm-test.patch | 55 ------------------- SPECS/openblas/openblas.signatures.json | 6 +- SPECS/openblas/openblas.spec | 31 +++++------ cgmanifest.json | 4 +- 6 files changed, 21 insertions(+), 96 deletions(-) delete mode 100644 SPECS/openblas/openblas-0.2.15-constructor.patch delete mode 100644 SPECS/openblas/openblas-0.3.21-sbgemm-test.patch diff --git a/SPECS/openblas/No-Fortran-Build.patch b/SPECS/openblas/No-Fortran-Build.patch index 3ec2ae0efd..34aceb4c93 100644 --- a/SPECS/openblas/No-Fortran-Build.patch +++ b/SPECS/openblas/No-Fortran-Build.patch @@ -11,4 +11,4 @@ diff -ru OpenBLAS-0.3.9-orig/Makefile OpenBLAS-0.3.9/Makefile + include ./Makefile.system - BLASDIRS = interface driver/level2 driver/level3 driver/others + BLASDIRS = interface driver/level2 driver/level3 driver/others \ No newline at end of file diff --git a/SPECS/openblas/openblas-0.2.15-constructor.patch b/SPECS/openblas/openblas-0.2.15-constructor.patch deleted file mode 100644 index 6b6a092586..0000000000 --- a/SPECS/openblas/openblas-0.2.15-constructor.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up OpenBLAS-0.2.15/driver/others/memory.c.priority OpenBLAS-0.2.15/driver/others/memory.c ---- OpenBLAS-0.2.15/driver/others/memory.c.priority 2015-10-27 21:44:50.000000000 +0100 -+++ OpenBLAS-0.2.15/driver/others/memory.c 2016-01-13 21:12:01.862225898 +0100 -@@ -146,8 +146,15 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF - #define CONSTRUCTOR __attribute__ ((constructor)) - #define DESTRUCTOR __attribute__ ((destructor)) - #else -+#if __GNUC__ && INIT_PRIORITY && ((GCC_VERSION >= 40300) || (CLANG_VERSION >= 20900)) - #define CONSTRUCTOR __attribute__ ((constructor(101))) - #define DESTRUCTOR __attribute__ ((destructor(101))) -+#elif __GNUC__ && INIT_PRIORITY -+#define CONSTRUCTOR __attribute__ ((constructor)) -+#define DESTRUCTOR __attribute__ ((destructor)) -+#else -+#define CONSTRUCTOR -+#define DESTRUCTOR - #endif - - #ifdef DYNAMIC_ARCH diff --git a/SPECS/openblas/openblas-0.3.21-sbgemm-test.patch b/SPECS/openblas/openblas-0.3.21-sbgemm-test.patch deleted file mode 100644 index 3a21470d0d..0000000000 --- a/SPECS/openblas/openblas-0.3.21-sbgemm-test.patch +++ /dev/null @@ -1,55 +0,0 @@ -Fixing FTBFS on power: -https://bugzilla.redhat.com/show_bug.cgi?id=2120974 - -Upstream issue: https://github.com/xianyi/OpenBLAS/issues/3738 -Upstream fix: https://github.com/xianyi/OpenBLAS/pull/3718 - -commit d9dc015cfc78fc32f555995a89d6957ef0184ea2 -Author: Martin Kroeker -Date: Mon Aug 8 14:52:10 2022 +0200 - - Use blasint for INTERFACE64 compatibility - -diff --git a/test/compare_sgemm_sbgemm.c b/test/compare_sgemm_sbgemm.c -index a2c358cf..d4b59145 100644 ---- a/test/compare_sgemm_sbgemm.c -+++ b/test/compare_sgemm_sbgemm.c -@@ -76,9 +76,9 @@ float16to32 (bfloat16_bits f16) - int - main (int argc, char *argv[]) - { -- int m, n, k; -+ blasint m, n, k; - int i, j, l; -- int x; -+ blasint x; - int ret = 0; - int loop = 100; - char transA = 'N', transB = 'N'; - -commit 3d338b57de1837f1e2264a1262a9ee9203f31c6c -Author: Martin Kroeker -Date: Mon Aug 8 17:09:45 2022 +0200 - - remove spurious loops - -diff --git a/test/compare_sgemm_sbgemm.c b/test/compare_sgemm_sbgemm.c -index d4b59145..276fecae 100644 ---- a/test/compare_sgemm_sbgemm.c -+++ b/test/compare_sgemm_sbgemm.c -@@ -112,7 +112,6 @@ main (int argc, char *argv[]) - &m, BB, &k, &beta, CC, &m); - for (i = 0; i < n; i++) - for (j = 0; j < m; j++) -- for (l = 0; l < k; l++) - if (fabs (CC[i * m + j] - C[i * m + j]) > 1.0) - ret++; - if (transA == 'N' && transB == 'N') -@@ -126,7 +125,6 @@ main (int argc, char *argv[]) - } - for (i = 0; i < n; i++) - for (j = 0; j < m; j++) -- for (l = 0; l < k; l++) - if (CC[i * m + j] != DD[i * m + j]) - ret++; - } diff --git a/SPECS/openblas/openblas.signatures.json b/SPECS/openblas/openblas.signatures.json index 8375d3c441..a099b1c78d 100644 --- a/SPECS/openblas/openblas.signatures.json +++ b/SPECS/openblas/openblas.signatures.json @@ -1,5 +1,5 @@ { - "Signatures": { - "openblas-0.3.21.tar.gz": "f36ba3d7a60e7c8bcc54cd9aaa9b1223dd42eaf02c811791c37e8ca707c241ca" - } + "Signatures": { + "openblas-0.3.26.tar.gz": "4e6e4f5cb14c209262e33e6816d70221a2fe49eb69eaf0a06f065598ac602c68" + } } diff --git a/SPECS/openblas/openblas.spec b/SPECS/openblas/openblas.spec index d53f822f70..6b8a171386 100644 --- a/SPECS/openblas/openblas.spec +++ b/SPECS/openblas/openblas.spec @@ -1,5 +1,5 @@ # Version of bundled lapack -%global lapackver 3.9.1 +%global lapackver 3.11.0 # Do we have execstack? %global execstack 1 %bcond_without cpp_thread_check @@ -20,27 +20,22 @@ Summary: An optimized BLAS library based on GotoBLAS2 # The same spec is also used on the EPEL branches, meaninng that some # "obsoleted" features are still kept in the spec. Name: openblas -Version: 0.3.21 -Release: 3%{?dist} -License: BSD +Version: 0.3.26 +Release: 1%{?dist} +License: BSD-3-Clause Vendor: Microsoft Corporation Distribution: Azure Linux -URL: https://github.com/xianyi/OpenBLAS/ -Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}/openblas-%{version}.tar.gz +URL: https://github.com/OpenMathLib/OpenBLAS/ +Source0: https://github.com/OpenMathLib/OpenBLAS/archive/v%{version}/openblas-%{version}.tar.gz # Use system lapack Patch0: openblas-0.2.15-system_lapack.patch # Drop extra p from threaded library name Patch1: openblas-0.2.5-libname.patch -# Don't use constructor priorities on too old architectures -Patch2: openblas-0.2.15-constructor.patch -# Fix SBGEMM test to work with INTERFACE64 -# patch imported from Fedora -Patch3: openblas-0.3.21-sbgemm-test.patch # Supply the proper flags to the test makefile # patch imported from Fedora -Patch4: openblas-0.3.11-tests.patch +Patch2: openblas-0.3.11-tests.patch # keep this patch to build from a containerized environment -Patch5: No-Fortran-Build.patch +Patch3: No-Fortran-Build.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gcc-gfortran @@ -197,9 +192,8 @@ cd OpenBLAS-%{version} %patch 0 -p1 -b .system_lapack %endif %patch 1 -p1 -b .libname -%patch 3 -p1 -b .sbgem -%patch 4 -p1 -b .tests -%patch 5 -p1 +%patch 2 -p1 -b .tests +%patch 3 -p1 # Fix source permissions find -name \*.f -exec chmod 644 {} \; @@ -561,6 +555,11 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig %{_libdir}/lib%{name}p64_.a %changelog +* Mon Feb 05 2024 Nan Liu - 0.3.26-1 +- Upgrade to 0.3.26 +- Update License to BSD-3-Clause +- Remove unneeded patch + * Wed Sep 20 2023 Jon Slobodzian - 0.3.21-3 - Recompile with stack-protection fixed gcc version (CVE-2023-4039) diff --git a/cgmanifest.json b/cgmanifest.json index b0d7a68f0e..4e70fb97ab 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -14993,8 +14993,8 @@ "type": "other", "other": { "name": "openblas", - "version": "0.3.21", - "downloadUrl": "https://github.com/xianyi/OpenBLAS/archive/v0.3.21/openblas-0.3.21.tar.gz" + "version": "0.3.26", + "downloadUrl": "https://github.com/OpenMathLib/OpenBLAS/archive/v0.3.26/openblas-0.3.26.tar.gz" } } },