Update to 0.3.11.

This commit is contained in:
Susi Lehtola 2020-10-18 18:14:52 +02:00
parent 6ba14f0bda
commit 209524874e
7 changed files with 7 additions and 591 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@
/openblas-0.3.8.tar.gz
/openblas-0.3.9.tar.gz
/openblas-0.3.10.tar.gz
/openblas-0.3.11.tar.gz

View File

@ -1,89 +0,0 @@
From a2d13ea61183099c05aa31e23ef59e1411d77177 Mon Sep 17 00:00:00 2001
From: Marius Hillenbrand <mhillen@linux.ibm.com>
Date: Tue, 16 Jun 2020 14:40:50 +0200
Subject: [PATCH 1/2] Fix gcc version detection for zarch
Employ common variables for gcc version detection and fix the broken
check for gcc >= 5.2.
Fixes #2668
Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
---
Makefile.system | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/Makefile.system b/Makefile.system
index 8d78b420f..5738b14ec 100644
--- a/Makefile.system
+++ b/Makefile.system
@@ -282,9 +282,11 @@ endif
ifeq ($(C_COMPILER), GCC)
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4)
+GCCVERSIONEQ5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` = 5)
GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
+GCCMINORVERSIONGTEQ2 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 2)
GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7)
endif
@@ -570,20 +572,27 @@ ifeq ($(ARCH), zarch)
DYNAMIC_CORE = ZARCH_GENERIC
# Z13 is supported since gcc-5.2, gcc-6, and in RHEL 7.3 and newer
-GCC_GE_52 := $(subst 0,,$(shell expr `$(CC) -dumpversion` \>= "5.2"))
+ifeq ($(GCCVERSIONGT5), 1)
+ ZARCH_SUPPORT_Z13 := 1
+else ifeq ($(GCCVERSIONEQ5), 1)
+ifeq ($(GCCMINORVERSIONGTEQ2), 1)
+ ZARCH_SUPPORT_Z13 := 1
+endif
+endif
ifeq ($(wildcard /etc/redhat-release), /etc/redhat-release)
-RHEL_WITH_Z13 := $(subst 0,,$(shell source /etc/os-release ; expr $$VERSION_ID \>= "7.3"))
+ifeq ($(shell source /etc/os-release ; expr $$VERSION_ID \>= "7.3"), 1)
+ ZARCH_SUPPORT_Z13 := 1
+endif
endif
-ifeq ($(or $(GCC_GE_52),$(RHEL_WITH_Z13)), 1)
+ifeq ($(ZARCH_SUPPORT_Z13), 1)
DYNAMIC_CORE += Z13
else
$(info OpenBLAS: Not building Z13 kernels because gcc is older than 5.2 or 6.x)
endif
-GCC_MAJOR_GE_7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
-ifeq ($(GCC_MAJOR_GE_7), 1)
+ifeq ($(GCCVERSIONGTEQ7), 1)
DYNAMIC_CORE += Z14
else
$(info OpenBLAS: Not building Z14 kernels because gcc is older than 7.x)
From 23892917667d87072eef2f18b6120f5d3c029f90 Mon Sep 17 00:00:00 2001
From: Marius Hillenbrand <mhillen@linux.ibm.com>
Date: Tue, 16 Jun 2020 14:45:09 +0200
Subject: [PATCH 2/2] Makefile.system: remove duplicate variable GCCVERSIONGT5
... to bring unified gcc version detection with common variables to the
one remaining spot in Makefile.system.
Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
---
Makefile.system | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile.system b/Makefile.system
index 5738b14ec..63cdbccd8 100644
--- a/Makefile.system
+++ b/Makefile.system
@@ -606,7 +606,6 @@ ifneq ($(C_COMPILER), GCC)
DYNAMIC_CORE += POWER9
endif
ifeq ($(C_COMPILER), GCC)
-GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
ifeq ($(GCCVERSIONGT5), 1)
DYNAMIC_CORE += POWER9
else

View File

@ -1,90 +0,0 @@
From 478898b37a91836a39d046f8c70e26c6c9fc06c7 Mon Sep 17 00:00:00 2001
From: Marius Hillenbrand <mhillen@linux.ibm.com>
Date: Wed, 17 Jun 2020 16:08:48 +0200
Subject: [PATCH 1/2] cpp_thread_test/dgemv: cap concurrency to number of hw
threads on small systems
... instead of (number of hw threads - 4) to avoid invalid numbers on
smaller systems. Currently, systems with 4 or fewer CPUs (e.g., small CI
VMs) would fail the test. Fixes one of the issues discussed in #2668
Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
---
cpp_thread_test/dgemv_thread_safety.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp_thread_test/dgemv_thread_safety.cpp b/cpp_thread_test/dgemv_thread_safety.cpp
index 5411fec29..277594ff0 100644
--- a/cpp_thread_test/dgemv_thread_safety.cpp
+++ b/cpp_thread_test/dgemv_thread_safety.cpp
@@ -18,7 +18,7 @@ int main(int argc, char* argv[]){
uint32_t maxHwThreads = omp_get_max_threads();
if (maxHwThreads < 52)
- numConcurrentThreads = maxHwThreads -4;
+ numConcurrentThreads = maxHwThreads;
if (argc > 4){
std::cout<<"ERROR: too many arguments for thread safety tester"<<std::endl;
From de838c38ef9db98a635de1dcedeba8b578ec87b3 Mon Sep 17 00:00:00 2001
From: Marius Hillenbrand <mhillen@linux.ibm.com>
Date: Wed, 17 Jun 2020 16:15:44 +0200
Subject: [PATCH 2/2] cpp_thread_test/dgemv: fail early if concurrency is zero
The two test cases dgemv_tester and dgemm_tester accept the degree of
concurrency as command line argument (amongst others). Fail early if
value 0 has been specified, instead of later with less-clear symptoms.
Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
---
cpp_thread_test/cpp_thread_safety_common.h | 8 ++++++++
cpp_thread_test/dgemm_thread_safety.cpp | 2 ++
cpp_thread_test/dgemv_thread_safety.cpp | 2 ++
3 files changed, 12 insertions(+)
diff --git a/cpp_thread_test/cpp_thread_safety_common.h b/cpp_thread_test/cpp_thread_safety_common.h
index 60ab5bb2f..8005369a8 100644
--- a/cpp_thread_test/cpp_thread_safety_common.h
+++ b/cpp_thread_test/cpp_thread_safety_common.h
@@ -5,6 +5,14 @@ inline void pauser(){
std::getline(std::cin, dummy);
}
+void FailIfThreadsAreZero(uint32_t numConcurrentThreads) {
+ if(numConcurrentThreads == 0) {
+ std::cout<<"ERROR: Invalid parameter 0 for number of concurrent calls into OpenBLAS!"<<std::endl;
+ std::cout<<"CBLAS DGEMV thread safety test FAILED!"<<std::endl;
+ exit(-1);
+ }
+}
+
void FillMatrices(std::vector<std::vector<double>>& matBlock, std::mt19937_64& PRNG, std::uniform_real_distribution<double>& rngdist, const blasint randomMatSize, const uint32_t numConcurrentThreads, const uint32_t numMat){
for(uint32_t i=0; i<numMat; i++){
for(uint32_t j = 0; j < static_cast<uint32_t>(randomMatSize*randomMatSize); j++){
diff --git a/cpp_thread_test/dgemm_thread_safety.cpp b/cpp_thread_test/dgemm_thread_safety.cpp
index 1c5287524..104c64f2a 100644
--- a/cpp_thread_test/dgemm_thread_safety.cpp
+++ b/cpp_thread_test/dgemm_thread_safety.cpp
@@ -46,6 +46,8 @@ int main(int argc, char* argv[]){
std::cout<<"Number of concurrent calls into OpenBLAS : "<<numConcurrentThreads<<'\n';
std::cout<<"Number of testing rounds : "<<numTestRounds<<'\n';
std::cout<<"This test will need "<<(static_cast<uint64_t>(randomMatSize*randomMatSize)*numConcurrentThreads*3*8)/static_cast<double>(1024*1024)<<" MiB of RAM\n"<<std::endl;
+
+ FailIfThreadsAreZero(numConcurrentThreads);
std::cout<<"Initializing random number generator..."<<std::flush;
std::mt19937_64 PRNG = InitPRNG();
diff --git a/cpp_thread_test/dgemv_thread_safety.cpp b/cpp_thread_test/dgemv_thread_safety.cpp
index 277594ff0..20ea38138 100644
--- a/cpp_thread_test/dgemv_thread_safety.cpp
+++ b/cpp_thread_test/dgemv_thread_safety.cpp
@@ -47,6 +47,8 @@ int main(int argc, char* argv[]){
std::cout<<"Number of concurrent calls into OpenBLAS : "<<numConcurrentThreads<<'\n';
std::cout<<"Number of testing rounds : "<<numTestRounds<<'\n';
std::cout<<"This test will need "<<((static_cast<uint64_t>(randomMatSize*randomMatSize)*numConcurrentThreads*8)+(static_cast<uint64_t>(randomMatSize)*numConcurrentThreads*8*2))/static_cast<double>(1024*1024)<<" MiB of RAM\n"<<std::endl;
+
+ FailIfThreadsAreZero(numConcurrentThreads);
std::cout<<"Initializing random number generator..."<<std::flush;
std::mt19937_64 PRNG = InitPRNG();

View File

@ -1,363 +0,0 @@
From f5fcc5baec1c5aea7dbd7a2a8fdd41ae8b422a6e Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 15 Aug 2020 13:30:29 +0200
Subject: [PATCH 01/10] Add trivial gemm test for multithread consistency
---
cpp_thread_test/gemm64.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 cpp_thread_test/gemm64.cpp
diff --git a/cpp_thread_test/gemm64.cpp b/cpp_thread_test/gemm64.cpp
new file mode 100644
index 000000000..2c3442a2e
--- /dev/null
+++ b/cpp_thread_test/gemm64.cpp
@@ -0,0 +1,20 @@
+#include <iostream>
+#include <cblas.h>
+int main ( int argc, char* argv[] ) {
+ const long n = ((long)1 << 31) - 1;
+ std::cout << n <<std::endl;
+ float* A = new float[n];
+ float* B = new float[n];
+ float* C = new float[1];
+ for(long i =0; i <n; i++){
+ A[i] = 1;
+ B[i] = 1;
+
+ }
+ cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 1, 1, n, 1.0, A, n, B, 1, 0.0, C, 1);
+ std::cout << *C <<std::endl;
+ delete[] A;
+ delete[] B;
+ delete[] C;
+ return 0;
+}
From 47ce1dd08fc9c5e66b6ac22e68152a189eeac2c9 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 15 Aug 2020 13:31:28 +0200
Subject: [PATCH 02/10] Update gemm64.cpp
---
cpp_thread_test/gemm64.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpp_thread_test/gemm64.cpp b/cpp_thread_test/gemm64.cpp
index 2c3442a2e..df38416fa 100644
--- a/cpp_thread_test/gemm64.cpp
+++ b/cpp_thread_test/gemm64.cpp
@@ -1,5 +1,6 @@
#include <iostream>
-#include <cblas.h>
+#include "common.h"
+#include "cblas.h"
int main ( int argc, char* argv[] ) {
const long n = ((long)1 << 31) - 1;
std::cout << n <<std::endl;
From 6a93e3b2bae7d7979b1edd538d5d5972836900bb Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 15 Aug 2020 13:33:52 +0200
Subject: [PATCH 03/10] Add simple sgemm preicsion test
---
cpp_thread_test/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cpp_thread_test/Makefile b/cpp_thread_test/Makefile
index 81e3470ef..0dc7229d7 100644
--- a/cpp_thread_test/Makefile
+++ b/cpp_thread_test/Makefile
@@ -10,5 +10,9 @@ dgemm_tester : dgemv_tester
$(CXX) $(COMMON_OPT) -Wall -Wextra -Wshadow -fopenmp -std=c++11 dgemm_thread_safety.cpp ../libopenblas.a -lpthread -o dgemm_tester
./dgemm_tester
+gemm64 : gemm64
+ $(CXX) $(COMMON_OPT) -Wall -Wextra -Wshadow -fopenmp -std=c++11 gemm64.cpp ../libopenblas.a -lpthread -o gemm64
+ ./gemm64
+
clean ::
- rm -f dgemv_tester dgemm_tester
+ rm -f dgemv_tester dgemm_tester gemm64
From 37ac23e8a36049d875d01887b292ec11751fccc8 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 15 Aug 2020 13:38:05 +0200
Subject: [PATCH 04/10] Add simple MT sgemm precision test and INTERFACE64
build
---
.drone.yml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/.drone.yml b/.drone.yml
index b1c211d14..fb009d46e 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -190,3 +190,29 @@ steps:
- make -C ctest $COMMON_FLAGS
- make -C utest $COMMON_FLAGS
- make -C cpp_thread_test dgemm_tester
+ - make -C cpp_thread_test gemm64
+---
+kind: pipeline
+name: epyc_native_test_int64
+
+platform:
+ os: linux
+ arch: amd64
+
+steps:
+- name: Build and Test
+ image: ubuntu:18.04
+ environment:
+ CC: gcc
+ COMMON_FLAGS: 'USE_OPENMP=1 INTERFACE64=1'
+ commands:
+ - echo "MAKE_FLAGS:= $COMMON_FLAGS"
+ - apt-get update -y
+ - apt-get install -y make $CC gfortran perl python g++
+ - $CC --version
+ - make QUIET_MAKE=1 $COMMON_FLAGS
+ - make -C test $COMMON_FLAGS
+ - make -C ctest $COMMON_FLAGS
+ - make -C utest $COMMON_FLAGS
+ - make -C cpp_thread_test dgemm_tester
+ - make -C cpp_thread_test gemm64
From d57d503c150bb40e1478b88735818c1b76d64ed2 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 15 Aug 2020 14:46:26 +0200
Subject: [PATCH 05/10] Update Makefile
---
cpp_thread_test/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp_thread_test/Makefile b/cpp_thread_test/Makefile
index 0dc7229d7..0d78990eb 100644
--- a/cpp_thread_test/Makefile
+++ b/cpp_thread_test/Makefile
@@ -11,7 +11,7 @@ dgemm_tester : dgemv_tester
./dgemm_tester
gemm64 : gemm64
- $(CXX) $(COMMON_OPT) -Wall -Wextra -Wshadow -fopenmp -std=c++11 gemm64.cpp ../libopenblas.a -lpthread -o gemm64
+ $(CXX) $(COMMON_OPT) -I.. -Wall -Wextra -Wshadow -fopenmp -std=c++11 gemm64.cpp ../libopenblas.a -lpthread -o gemm64
./gemm64
clean ::
From 82f8a0aebabab6e81386b75b6f172abb692dd31c Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 15 Aug 2020 15:46:18 +0200
Subject: [PATCH 06/10] Update .drone.yml
---
.drone.yml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/.drone.yml b/.drone.yml
index fb009d46e..e8353eb5c 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -166,6 +166,32 @@ steps:
- make -C ctest $COMMON_FLAGS
- make -C utest $COMMON_FLAGS
- make -C cpp_thread_test dgemm_tester
+ - make -C cpp_thread_test gemm64
+---
+kind: pipeline
+name: arm64_native_test_int64
+
+platform:
+ os: linux
+ arch: arm64
+
+steps:
+- name: Build and Test
+ image: ubuntu:18.04
+ environment:
+ CC: gcc
+ COMMON_FLAGS: 'USE_OPENMP=1 INTERFACE64=1'
+ commands:
+ - echo "MAKE_FLAGS:= $COMMON_FLAGS"
+ - apt-get update -y
+ - apt-get install -y make $CC gfortran perl python g++
+ - $CC --version
+ - make QUIET_MAKE=1 $COMMON_FLAGS
+ - make -C test $COMMON_FLAGS
+ - make -C ctest $COMMON_FLAGS
+ - make -C utest $COMMON_FLAGS
+ - make -C cpp_thread_test dgemm_tester
+ - make -C cpp_thread_test gemm64
---
kind: pipeline
name: epyc_native_test
From 5ec8f716cf181b70352fa15a7beb45fc886312de Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Mon, 17 Aug 2020 15:19:40 +0200
Subject: [PATCH 07/10] revert
---
.drone.yml | 52 ----------------------------------------------------
1 file changed, 52 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index e8353eb5c..b1c211d14 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -166,32 +166,6 @@ steps:
- make -C ctest $COMMON_FLAGS
- make -C utest $COMMON_FLAGS
- make -C cpp_thread_test dgemm_tester
- - make -C cpp_thread_test gemm64
----
-kind: pipeline
-name: arm64_native_test_int64
-
-platform:
- os: linux
- arch: arm64
-
-steps:
-- name: Build and Test
- image: ubuntu:18.04
- environment:
- CC: gcc
- COMMON_FLAGS: 'USE_OPENMP=1 INTERFACE64=1'
- commands:
- - echo "MAKE_FLAGS:= $COMMON_FLAGS"
- - apt-get update -y
- - apt-get install -y make $CC gfortran perl python g++
- - $CC --version
- - make QUIET_MAKE=1 $COMMON_FLAGS
- - make -C test $COMMON_FLAGS
- - make -C ctest $COMMON_FLAGS
- - make -C utest $COMMON_FLAGS
- - make -C cpp_thread_test dgemm_tester
- - make -C cpp_thread_test gemm64
---
kind: pipeline
name: epyc_native_test
@@ -216,29 +190,3 @@ steps:
- make -C ctest $COMMON_FLAGS
- make -C utest $COMMON_FLAGS
- make -C cpp_thread_test dgemm_tester
- - make -C cpp_thread_test gemm64
----
-kind: pipeline
-name: epyc_native_test_int64
-
-platform:
- os: linux
- arch: amd64
-
-steps:
-- name: Build and Test
- image: ubuntu:18.04
- environment:
- CC: gcc
- COMMON_FLAGS: 'USE_OPENMP=1 INTERFACE64=1'
- commands:
- - echo "MAKE_FLAGS:= $COMMON_FLAGS"
- - apt-get update -y
- - apt-get install -y make $CC gfortran perl python g++
- - $CC --version
- - make QUIET_MAKE=1 $COMMON_FLAGS
- - make -C test $COMMON_FLAGS
- - make -C ctest $COMMON_FLAGS
- - make -C utest $COMMON_FLAGS
- - make -C cpp_thread_test dgemm_tester
- - make -C cpp_thread_test gemm64
From a8c6fb9e1ce4d6cb3d4e8a782f9c4c69469aae91 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Mon, 17 Aug 2020 15:20:16 +0200
Subject: [PATCH 08/10] revert
---
cpp_thread_test/Makefile | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/cpp_thread_test/Makefile b/cpp_thread_test/Makefile
index 0d78990eb..81e3470ef 100644
--- a/cpp_thread_test/Makefile
+++ b/cpp_thread_test/Makefile
@@ -10,9 +10,5 @@ dgemm_tester : dgemv_tester
$(CXX) $(COMMON_OPT) -Wall -Wextra -Wshadow -fopenmp -std=c++11 dgemm_thread_safety.cpp ../libopenblas.a -lpthread -o dgemm_tester
./dgemm_tester
-gemm64 : gemm64
- $(CXX) $(COMMON_OPT) -I.. -Wall -Wextra -Wshadow -fopenmp -std=c++11 gemm64.cpp ../libopenblas.a -lpthread -o gemm64
- ./gemm64
-
clean ::
- rm -f dgemv_tester dgemm_tester gemm64
+ rm -f dgemv_tester dgemm_tester
From 6bfc66663c4b3bbd2c5f7ac05a150d2c4bd94af4 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Mon, 17 Aug 2020 15:20:41 +0200
Subject: [PATCH 09/10] revert
---
cpp_thread_test/gemm64.cpp | 21 ---------------------
1 file changed, 21 deletions(-)
delete mode 100644 cpp_thread_test/gemm64.cpp
diff --git a/cpp_thread_test/gemm64.cpp b/cpp_thread_test/gemm64.cpp
deleted file mode 100644
index df38416fa..000000000
--- a/cpp_thread_test/gemm64.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <iostream>
-#include "common.h"
-#include "cblas.h"
-int main ( int argc, char* argv[] ) {
- const long n = ((long)1 << 31) - 1;
- std::cout << n <<std::endl;
- float* A = new float[n];
- float* B = new float[n];
- float* C = new float[1];
- for(long i =0; i <n; i++){
- A[i] = 1;
- B[i] = 1;
-
- }
- cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 1, 1, n, 1.0, A, n, B, 1, 0.0, C, 1);
- std::cout << *C <<std::endl;
- delete[] A;
- delete[] B;
- delete[] C;
- return 0;
-}
From aa286e301b3a4883970107eddb8f02744bdf2fc9 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Mon, 17 Aug 2020 15:32:14 +0200
Subject: [PATCH 10/10] Add typedef for bfloat16 if needed
---
openblas_config_template.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/openblas_config_template.h b/openblas_config_template.h
index 49aea1cab..9955e5c73 100644
--- a/openblas_config_template.h
+++ b/openblas_config_template.h
@@ -34,6 +34,10 @@ typedef long BLASLONG;
typedef unsigned long BLASULONG;
#endif
+#ifndef BFLOAT16
+typedef unsigned short bfloat16;
+#endif
+
#ifdef OPENBLAS_USE64BITINT
typedef BLASLONG blasint;
#else

View File

@ -1,34 +0,0 @@
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

@ -14,8 +14,8 @@
# "obsoleted" features are still kept in the spec.
Name: openblas
Version: 0.3.10
Release: 6%{?dist}
Version: 0.3.11
Release: 1%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
License: BSD
URL: https://github.com/xianyi/OpenBLAS/
@ -26,16 +26,8 @@ Patch0: openblas-0.2.15-system_lapack.patch
Patch1: openblas-0.2.5-libname.patch
# Don't use constructor priorities on too old architectures
Patch2: openblas-0.2.15-constructor.patch
# Fix broken detection for z13 support
Patch4: https://github.com/xianyi/OpenBLAS/pull/2669.patch
# Fix test suite failure for <= 4 CPUs
Patch5: https://github.com/xianyi/OpenBLAS/pull/2672.patch
# Resolve undefined bfloat16 datatype (BZ #1873667)
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++
@ -247,11 +239,7 @@ cd OpenBLAS-%{version}
%if 0%{?rhel} == 5
%patch2 -p1 -b .constructor
%endif
%patch4 -p1 -b .s390x
%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 {} \;
@ -657,6 +645,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%endif
%changelog
* Sun Oct 18 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.3.11-1
- Update to 0.3.11.
* Fri Sep 18 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.3.10-6
- Fix incorrect result of cblas_zdotc_sub on ppc64le (BZ #1878449).

View File

@ -1 +1 @@
SHA512 (openblas-0.3.10.tar.gz) = 64a5f983b2f6e02cdb6e0f14433498cc5daa1ccfb49246f7a2dcd38f9982fa608f2abea069fe0e35012af8c1441c43d1f6418eaccd40795f5002fed1c36ce05d
SHA512 (openblas-0.3.11.tar.gz) = 1a5e5f9ab1ef33d9882b2a491cf6803c05f87db0df7ae8a92ee7b9b8a52cedcea285888e5ee6c131c94ecf9403c1cc7f6c349f3df2f87245668cc018dcc8de32