From 82dafaab8cc15dee5304a2dc5a6df77701e43109 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 28 2020 08:52:01 +0000 Subject: import openblas-0.3.3-5.el8 --- diff --git a/SOURCES/openblas-0.3.3-izamax-s390x.patch b/SOURCES/openblas-0.3.3-izamax-s390x.patch new file mode 100644 index 0000000..b41cee9 --- /dev/null +++ b/SOURCES/openblas-0.3.3-izamax-s390x.patch @@ -0,0 +1,13 @@ +diff --git a/kernel/zarch/izamax.c b/kernel/zarch/izamax.c +index 216c341..6cde691 100644 +--- a/kernel/zarch/izamax.c ++++ b/kernel/zarch/izamax.c +@@ -185,7 +185,7 @@ static BLASLONG ziamax_kernel_16_TUNED(BLASLONG n, FLOAT *x, FLOAT *maxf) { + "vsteg %%v6,%[maxf],0 \n\t" + "vmnlg %%v1,%%v5,%%v7 \n\t" + "vlgvg %[index],%%v1,0 \n\t" +- "j 3 \n\t" ++ "j 3f \n\t" + "2: \n\t" + "wfchdb %%v16,%%v26,%%v6 \n\t" + "vsel %%v1,%%v5,%%v7,%%v16 \n\t" diff --git a/SOURCES/openblas-0.3.3-power9.patch b/SOURCES/openblas-0.3.3-power9.patch new file mode 100644 index 0000000..4b3d046 --- /dev/null +++ b/SOURCES/openblas-0.3.3-power9.patch @@ -0,0 +1,57 @@ +diff --git a/cpuid_power.c b/cpuid_power.c +index 6c7baef..388ea18 100644 +--- a/cpuid_power.c ++++ b/cpuid_power.c +@@ -56,6 +56,7 @@ + #define CPUTYPE_CELL 6 + #define CPUTYPE_PPCG4 7 + #define CPUTYPE_POWER8 8 ++#define CPUTYPE_POWER9 9 + + char *cpuname[] = { + "UNKNOWN", +@@ -66,7 +67,8 @@ char *cpuname[] = { + "POWER6", + "CELL", + "PPCG4", +- "POWER8" ++ "POWER8", ++ "POWER9" + }; + + char *lowercpuname[] = { +@@ -78,7 +80,8 @@ char *lowercpuname[] = { + "power6", + "cell", + "ppcg4", +- "power8" ++ "power8", ++ "power9" + }; + + char *corename[] = { +@@ -90,6 +93,7 @@ char *corename[] = { + "POWER6", + "CELL", + "PPCG4", ++ "POWER8", + "POWER8" + }; + +@@ -120,6 +124,7 @@ int detect(void){ + if (!strncasecmp(p, "POWER6", 6)) return CPUTYPE_POWER6; + if (!strncasecmp(p, "POWER7", 6)) return CPUTYPE_POWER6; + if (!strncasecmp(p, "POWER8", 6)) return CPUTYPE_POWER8; ++ if (!strncasecmp(p, "POWER9", 6)) return CPUTYPE_POWER8; + if (!strncasecmp(p, "Cell", 4)) return CPUTYPE_CELL; + if (!strncasecmp(p, "7447", 4)) return CPUTYPE_PPCG4; + +@@ -148,7 +153,7 @@ int id; + id = __asm __volatile("mfpvr %0" : "=r"(id)); + switch ( id >> 16 ) { + case 0x4e: // POWER9 +- return return CPUTYPE_POWER8; ++ return CPUTYPE_POWER8; + break; + case 0x4d: + case 0x4b: // POWER8/8E diff --git a/SPECS/openblas.spec b/SPECS/openblas.spec index 90a77b5..ff30d9d 100644 --- a/SPECS/openblas.spec +++ b/SPECS/openblas.spec @@ -15,7 +15,7 @@ Name: openblas Version: 0.3.3 -Release: 2%{?dist} +Release: 5%{?dist} Summary: An optimized BLAS library based on GotoBLAS2 Group: Development/Libraries License: BSD @@ -35,6 +35,10 @@ Patch4: openblas-0.3.3-noopt.patch Patch5: openblas-0.2.20-asmflags.patch # Remove optimization pragmas on ppc64le Patch6: openblas-0.2.20-power-optimize.patch +# Fix izamax on s390x +Patch7: openblas-0.3.3-izamax-s390x.patch +# Detect POWER9 as POWER8 +Patch8: openblas-0.3.3-power9.patch BuildRequires: gcc BuildRequires: gcc-gfortran @@ -238,6 +242,8 @@ cd OpenBLAS-%{version} %patch4 -p1 -b .noopt %patch5 -p1 -b .asmflags %patch6 -p1 -b .power-optimize +%patch7 -p1 -b .izamax-s390x +%patch8 -p1 -b .power9 # Fix source permissions find -name \*.f -exec chmod 644 {} \; @@ -375,6 +381,9 @@ TARGET="TARGET=POWER8 DYNAMIC_ARCH=0" %ifarch aarch64 TARGET="TARGET=ARMV8 DYNAMIC_ARCH=0" %endif +%ifarch s390x +TARGET="TARGET=Z13 DYNAMIC_ARCH=0" +%endif %if 0%{?rhel} == 5 # Gfortran too old to recognize -frecursive @@ -680,6 +689,18 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig %endif %changelog +* Fri Nov 22 2019 Nikola Forró - 0.3.3-5 +- Detect POWER9 as POWER8 + related: #1752241 + +* Wed Nov 20 2019 Nikola Forró - 0.3.3-4 +- Add tests and enable gating + related: #1752241 + +* Tue Sep 24 2019 Nikola Forró - 0.3.3-3 +- Fix izamax on s390x + resolves: #1752241 + * Wed Nov 07 2018 Nikola Forró - 0.3.3-2 - Fix i686-x86_64 multilib difference related: #1627890