This commit is contained in:
Susi Lehtola 2020-09-18 11:21:12 +02:00
parent dc5c41fc4e
commit 6ba14f0bda
2 changed files with 41 additions and 2 deletions

View File

@ -0,0 +1,34 @@
diff -up OpenBLAS-0.3.10/kernel/power/zdot.c.ppc64le OpenBLAS-0.3.10/kernel/power/zdot.c
--- OpenBLAS-0.3.10/kernel/power/zdot.c.ppc64le 2020-06-14 22:03:04.000000000 +0200
+++ OpenBLAS-0.3.10/kernel/power/zdot.c 2020-09-18 11:18:16.102180677 +0200
@@ -94,8 +94,11 @@ FLOAT _Complex CNAME(BLASLONG n, FLOAT *
if ( n <= 0 )
{
+ /*
__real__ result = 0.0 ;
__imag__ result = 0.0 ;
+ */
+ result = OPENBLAS_MAKE_COMPLEX_FLOAT(0.0,0.0);
return(result);
}
@@ -149,12 +152,17 @@ FLOAT _Complex CNAME(BLASLONG n, FLOAT *
}
#if !defined(CONJ)
+ /*
__real__ result = dot[0] - dot[1];
__imag__ result = dot[2] + dot[3];
+ */
+ result = OPENBLAS_MAKE_COMPLEX_FLOAT(dot[0]-dot[1],dot[2]+dot[3]);
#else
+ /*
__real__ result = dot[0] + dot[1];
__imag__ result = dot[2] - dot[3];
-
+ */
+ result = OPENBLAS_MAKE_COMPLEX_FLOAT(dot[0]+dot[1],dot[2]-dot[3]);
#endif
return(result);

View File

@ -15,7 +15,7 @@
Name: openblas
Version: 0.3.10
Release: 5%{?dist}
Release: 6%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
License: BSD
URL: https://github.com/xianyi/OpenBLAS/
@ -34,7 +34,8 @@ Patch5: https://github.com/xianyi/OpenBLAS/pull/2672.patch
Patch6: https://github.com/xianyi/OpenBLAS/pull/2784.patch
# Supply the proper flags to the test makefile
Patch3: openblas-0.3.7-tests.patch
# Fix zdotc on ppc64le (BZ #1878449)
Patch7: openblas-0.3.10-zdot-ppc64le.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -250,6 +251,7 @@ cd OpenBLAS-%{version}
%patch5 -p1 -b .fewcpus
%patch6 -p1 -b .bfloat16
%patch3 -p1 -b .tests
%patch7 -p1 -b .ppc64le
# Fix source permissions
find -name \*.f -exec chmod 644 {} \;
@ -655,6 +657,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%endif
%changelog
* Fri Sep 18 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.3.10-6
- Fix incorrect result of cblas_zdotc_sub on ppc64le (BZ #1878449).
* Sat Aug 29 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.3.10-5
- Fix unresolved bfloat16 datatype (BZ #1873667).