Skip to content

Commit 20d4177

Browse files
authored
Merge pull request #2213 from xianyi/develop
Update from develop in preparation of the 0.3.7 release
2 parents 15cb124 + 3212885 commit 20d4177

File tree

165 files changed

+20234
-598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+20234
-598
lines changed

.drone.yml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
kind: pipeline
3+
name: arm64_gcc_make
4+
5+
platform:
6+
os: linux
7+
arch: arm64
8+
9+
steps:
10+
- name: Build and Test
11+
image: ubuntu:19.04
12+
environment:
13+
CC: gcc
14+
COMMON_FLAGS: 'DYNAMIC_ARCH=1 TARGET=ARMV8 NUM_THREADS=32'
15+
commands:
16+
- echo "MAKE_FLAGS:= $COMMON_FLAGS"
17+
- apt-get update -y
18+
- apt-get install -y make $CC gfortran perl
19+
- $CC --version
20+
- make QUIET_MAKE=1 $COMMON_FLAGS
21+
- make -C test $COMMON_FLAGS
22+
- make -C ctest $COMMON_FLAGS
23+
- make -C utest $COMMON_FLAGS
24+
25+
---
26+
kind: pipeline
27+
name: arm32_gcc_make
28+
29+
platform:
30+
os: linux
31+
arch: arm
32+
33+
steps:
34+
- name: Build and Test
35+
image: ubuntu:19.04
36+
environment:
37+
CC: gcc
38+
COMMON_FLAGS: 'DYNAMIC_ARCH=1 TARGET=ARMV6 NUM_THREADS=32'
39+
commands:
40+
- echo "MAKE_FLAGS:= $COMMON_FLAGS"
41+
- apt-get update -y
42+
- apt-get install -y make $CC gfortran perl
43+
- $CC --version
44+
- make QUIET_MAKE=1 $COMMON_FLAGS
45+
- make -C test $COMMON_FLAGS
46+
- make -C ctest $COMMON_FLAGS
47+
- make -C utest $COMMON_FLAGS
48+
49+
---
50+
kind: pipeline
51+
name: arm64_clang_make
52+
53+
platform:
54+
os: linux
55+
arch: arm64
56+
57+
steps:
58+
- name: Build and Test
59+
image: ubuntu:18.04
60+
environment:
61+
CC: clang
62+
COMMON_FLAGS: 'DYNAMIC_ARCH=1 TARGET=ARMV8 NUM_THREADS=32'
63+
commands:
64+
- echo "MAKE_FLAGS:= $COMMON_FLAGS"
65+
- apt-get update -y
66+
- apt-get install -y make $CC gfortran perl
67+
- $CC --version
68+
- make QUIET_MAKE=1 $COMMON_FLAGS
69+
- make -C test $COMMON_FLAGS
70+
- make -C ctest $COMMON_FLAGS
71+
- make -C utest $COMMON_FLAGS
72+
73+
---
74+
kind: pipeline
75+
name: arm32_clang_cmake
76+
77+
platform:
78+
os: linux
79+
arch: arm
80+
81+
steps:
82+
- name: Build and Test
83+
image: ubuntu:18.04
84+
environment:
85+
CC: clang
86+
CMAKE_FLAGS: '-DDYNAMIC_ARCH=1 -DTARGET=ARMV6 -DNUM_THREADS=32 -DNOFORTRAN=ON -DBUILD_WITHOUT_LAPACK=ON'
87+
commands:
88+
- echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
89+
- apt-get update -y
90+
- apt-get install -y make $CC g++ perl cmake
91+
- $CC --version
92+
- mkdir build && cd build
93+
- cmake $CMAKE_FLAGS ..
94+
- make -j
95+
- ctest
96+
97+
---
98+
kind: pipeline
99+
name: arm64_gcc_cmake
100+
101+
platform:
102+
os: linux
103+
arch: arm64
104+
105+
steps:
106+
- name: Build and Test
107+
image: ubuntu:18.04
108+
environment:
109+
CC: gcc
110+
CMAKE_FLAGS: '-DDYNAMIC_ARCH=1 -DTARGET=ARMV8 -DNUM_THREADS=32 -DNOFORTRAN=ON -DBUILD_WITHOUT_LAPACK=ON'
111+
commands:
112+
- echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
113+
- apt-get update -y
114+
- apt-get install -y make $CC g++ perl cmake
115+
- $CC --version
116+
- mkdir build && cd build
117+
- cmake $CMAKE_FLAGS ..
118+
- make -j
119+
- ctest
120+
121+
---
122+
kind: pipeline
123+
name: arm64_clang_cmake
124+
125+
platform:
126+
os: linux
127+
arch: arm64
128+
129+
steps:
130+
- name: Build and Test
131+
image: ubuntu:18.04
132+
environment:
133+
CC: clang
134+
CMAKE_FLAGS: '-DDYNAMIC_ARCH=1 -DTARGET=ARMV8 -DNUM_THREADS=32 -DNOFORTRAN=ON -DBUILD_WITHOUT_LAPACK=ON'
135+
commands:
136+
- echo "CMAKE_FLAGS:= $CMAKE_FLAGS"
137+
- apt-get update -y
138+
- apt-get install -y make $CC g++ perl cmake
139+
- $CC --version
140+
- mkdir build && cd build
141+
- cmake $CMAKE_FLAGS ..
142+
- make -j
143+
- ctest

.travis.yml

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ matrix:
2525
- TARGET_BOX=LINUX64
2626
- BTYPE="BINARY=64"
2727

28+
- <<: *test-ubuntu
29+
os: linux-ppc64le
30+
before_script:
31+
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=POWER8 NUM_THREADS=32"
32+
env:
33+
# for matrix annotation only
34+
- TARGET_BOX=PPC64LE_LINUX
35+
- BTYPE="BINARY=64 USE_OPENMP=1"
36+
2837
- <<: *test-ubuntu
2938
env:
3039
- TARGET_BOX=LINUX64
@@ -164,42 +173,6 @@ matrix:
164173
env:
165174
- BTYPE="BINARY=32"
166175

167-
- &emulated-arm
168-
dist: trusty
169-
sudo: required
170-
services: docker
171-
env: IMAGE_ARCH=arm32 TARGET_ARCH=ARMV6 COMPILER=gcc
172-
name: "Emulated Build for ARMV6 with gcc"
173-
before_install: sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
174-
script: |
175-
echo "FROM openblas/alpine:${IMAGE_ARCH}
176-
COPY . /tmp/openblas
177-
RUN mkdir /tmp/openblas/build && \
178-
cd /tmp/openblas/build && \
179-
CC=${COMPILER} cmake -D DYNAMIC_ARCH=OFF \
180-
-D TARGET=${TARGET_ARCH} \
181-
-D BUILD_SHARED_LIBS=ON \
182-
-D BUILD_WITHOUT_LAPACK=ON \
183-
-D BUILD_WITHOUT_CBLAS=ON \
184-
-D CMAKE_BUILD_TYPE=Release ../ && \
185-
cmake --build ." > Dockerfile
186-
docker build .
187-
- <<: *emulated-arm
188-
env: IMAGE_ARCH=arm32 TARGET_ARCH=ARMV6 COMPILER=clang
189-
name: "Emulated Build for ARMV6 with clang"
190-
- <<: *emulated-arm
191-
env: IMAGE_ARCH=arm64 TARGET_ARCH=ARMV8 COMPILER=gcc
192-
name: "Emulated Build for ARMV8 with gcc"
193-
- <<: *emulated-arm
194-
env: IMAGE_ARCH=arm64 TARGET_ARCH=ARMV8 COMPILER=clang
195-
name: "Emulated Build for ARMV8 with clang"
196-
197-
allow_failures:
198-
- env: IMAGE_ARCH=arm32 TARGET_ARCH=ARMV6 COMPILER=gcc
199-
- env: IMAGE_ARCH=arm32 TARGET_ARCH=ARMV6 COMPILER=clang
200-
- env: IMAGE_ARCH=arm64 TARGET_ARCH=ARMV8 COMPILER=gcc
201-
- env: IMAGE_ARCH=arm64 TARGET_ARCH=ARMV8 COMPILER=clang
202-
203176
# whitelist
204177
branches:
205178
only:

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.8.5)
66
project(OpenBLAS C ASM)
77
set(OpenBLAS_MAJOR_VERSION 0)
88
set(OpenBLAS_MINOR_VERSION 3)
9-
set(OpenBLAS_PATCH_VERSION 6)
9+
set(OpenBLAS_PATCH_VERSION 7.dev)
1010
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
1111

1212
# Adhere to GNU filesystem layout conventions
@@ -20,9 +20,14 @@ if(MSVC)
2020
option(BUILD_WITHOUT_LAPACK "Do not build LAPACK and LAPACKE (Only BLAS or CBLAS)" ON)
2121
endif()
2222
option(BUILD_WITHOUT_CBLAS "Do not build the C interface (CBLAS) to the BLAS functions" OFF)
23-
option(DYNAMIC_ARCH "Include support for multiple CPU targets, with automatic selection at runtime (x86/x86_64 only)" OFF)
24-
option(DYNAMIC_OLDER "Include specific support for older cpu models (Penryn,Dunnington,Atom,Nano,Opteron) with DYNAMIC_ARCH" OFF)
23+
option(DYNAMIC_ARCH "Include support for multiple CPU targets, with automatic selection at runtime (x86/x86_64, aarch64 or ppc only)" OFF)
24+
option(DYNAMIC_OLDER "Include specific support for older x86 cpu models (Penryn,Dunnington,Atom,Nano,Opteron) with DYNAMIC_ARCH" OFF)
2525
option(BUILD_RELAPACK "Build with ReLAPACK (recursive implementation of several LAPACK functions on top of standard LAPACK)" OFF)
26+
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
27+
option(NO_AFFINITY "Disable support for CPU affinity masks to avoid binding processes from e.g. R or numpy/scipy to a single core" ON)
28+
else()
29+
set(NO_AFFINITY 1)
30+
endif()
2631

2732
# Add a prefix or suffix to all exported symbol names in the shared library.
2833
# Avoids conflicts with other BLAS libraries, especially when using
@@ -206,7 +211,8 @@ if (USE_THREAD)
206211
target_link_libraries(${OpenBLAS_LIBNAME} ${CMAKE_THREAD_LIBS_INIT})
207212
endif()
208213

209-
if (MSVC OR NOT NOFORTRAN)
214+
#if (MSVC OR NOT NOFORTRAN)
215+
if (NOT NO_CBLAS)
210216
# Broken without fortran on unix
211217
add_subdirectory(utest)
212218
endif()

CONTRIBUTORS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,7 @@ In chronological order:
167167
* [2017-02-26] ztrmm kernel for IBM z13
168168
* [2017-03-13] strmm and ctrmm kernel for IBM z13
169169
* [2017-09-01] initial Blas Level-1,2 (double precision) for IBM z13
170-
170+
* [2018-03-07] added missing Blas Level 1-2 (double precision) simd codes
171+
* [2019-02-01] added missing Blas Level-1,2 (single precision) simd codes
172+
* [2019-03-14] power9 dgemm/dtrmm kernel
173+
* [2019-04-29] power9 sgemm/strmm kernel

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ endif
3434

3535
LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast,$(LAPACK_FFLAGS))
3636

37-
SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench
37+
SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test
3838

3939
.PHONY : all libs netlib $(RELA) test ctest shared install
4040
.NOTPARALLEL : all libs $(RELA) prof lapack-test install blas-test
@@ -109,6 +109,7 @@ endif
109109
ifeq ($(OSNAME), Darwin)
110110
@$(MAKE) -C exports dyn
111111
@ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib
112+
@ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib
112113
endif
113114
ifeq ($(OSNAME), WINNT)
114115
@$(MAKE) -C exports dll
@@ -123,10 +124,13 @@ ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
123124
touch $(LIBNAME)
124125
ifndef NO_FBLAS
125126
$(MAKE) -C test all
126-
$(MAKE) -C utest all
127127
endif
128+
$(MAKE) -C utest all
128129
ifndef NO_CBLAS
129130
$(MAKE) -C ctest all
131+
ifeq ($(CPP_THREAD_SAFETY_TEST), 1)
132+
$(MAKE) -C cpp_thread_test all
133+
endif
130134
endif
131135
endif
132136

Makefile.arm

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
ifeq ($(CORE), $(filter $(CORE),ARMV7 CORTEXA9 CORTEXA15))
22
ifeq ($(OSNAME), Android)
3-
CCOMMON_OPT += -mfpu=neon -march=armv7-a
4-
FCOMMON_OPT += -mfpu=neon -march=armv7-a
3+
CCOMMON_OPT += -mfpu=neon
4+
FCOMMON_OPT += -mfpu=neon
55
else
66
CCOMMON_OPT += -mfpu=vfpv3 -march=armv7-a
77
FCOMMON_OPT += -mfpu=vfpv3 -march=armv7-a
88
endif
99
endif
1010

1111
ifeq ($(CORE), ARMV6)
12-
CCOMMON_OPT += -mfpu=vfp -march=armv6
13-
FCOMMON_OPT += -mfpu=vfp -march=armv6
14-
endif
15-
16-
ifeq ($(CORE), ARMV5)
17-
CCOMMON_OPT += -march=armv5
18-
FCOMMON_OPT += -march=armv5
12+
CCOMMON_OPT += -mfpu=vfp
13+
FCOMMON_OPT += -mfpu=vfp
1914
endif

Makefile.install

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ ifeq ($(OSNAME), Darwin)
8383
@-cp $(LIBDYNNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
8484
@-install_name_tool -id "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)" "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)"
8585
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
86-
ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib
86+
ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib ; \
87+
ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib
8788
endif
8889
ifeq ($(OSNAME), WINNT)
8990
@-cp $(LIBDLLNAME) "$(DESTDIR)$(OPENBLAS_BINARY_DIR)"

Makefile.power

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fas
2929
endif
3030
endif
3131

32+
# workaround for C->FORTRAN ABI violation in LAPACKE
33+
ifeq ($(F_COMPILER), GFORTRAN)
34+
FCOMMON_OPT += -fno-optimize-sibling-calls
35+
endif
3236

3337
FLAMEPATH = $(HOME)/flame/lib
3438

0 commit comments

Comments
 (0)