Skip to content

Commit 5ef8b19

Browse files
authored
Merge pull request #4854 from OpenMathLib/develop
merge develop in preparation of the 0.3.28 release
2 parents 116bc76 + 884a949 commit 5ef8b19

File tree

308 files changed

+32346
-6896
lines changed

Some content is hidden

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

308 files changed

+32346
-6896
lines changed

.cirrus.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ macos_instance:
4141
# - make CC=gcc-11 FC=gfortran-11 USE_OPENMP=1
4242

4343
macos_instance:
44-
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
44+
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
4545
task:
4646
name: AppleM1/LLVM x86_64 xbuild
4747
compile_script:
@@ -58,8 +58,8 @@ task:
5858
- export VALID_ARCHS="i386 x86_64"
5959
- xcrun --sdk macosx --show-sdk-path
6060
- xcodebuild -version
61-
- export CC=/Applications/Xcode-15.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
62-
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-15.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -arch x86_64"
61+
- export CC=/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
62+
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -arch x86_64"
6363
- make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
6464
always:
6565
config_artifacts:
@@ -70,16 +70,18 @@ task:
7070
# type: application/octet-streamm
7171

7272
macos_instance:
73-
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
73+
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
7474
task:
7575
name: AppleM1/LLVM armv8-ios xbuild
7676
compile_script:
7777
- #brew install llvm
7878
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
7979
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
8080
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
81-
- export CC=/Applications/Xcode-15.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
82-
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-15.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -arch arm64 -miphoneos-version-min=10.0"
81+
- export CC=/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
82+
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -arch arm64 -miphoneos-version-min=10.0"
83+
- xcrun --sdk iphoneos --show-sdk-path
84+
- ls -l /Applications
8385
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
8486
always:
8587
config_artifacts:
@@ -96,11 +98,11 @@ task:
9698
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
9799
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
98100
- ls /System/Volumes/Data/opt/homebrew
99-
- ls -l /System/Volumes/Data/opt/homebrew/Caskroom/
101+
- ls -l /System/Volumes/Data/opt/homebrew/Caskroom/android-ndk
100102
- find /System/Volumes/Data/opt/homebrew -name "armv7a-linux-androideabi*-ranlib"
101103
- #export CC=/Applications/Xcode-13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
102104
- #export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -arch arm64 -miphoneos-version-min=10.0"
103-
- export CC=/System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/26c/AndroidNDK*.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
105+
- export CC=/System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/26d/AndroidNDK*.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
104106
- make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
105107
always:
106108
config_artifacts:
@@ -132,7 +134,7 @@ task:
132134
FreeBSD_task:
133135
name: FreeBSD-gcc12
134136
freebsd_instance:
135-
image_family: freebsd-13-2
137+
image_family: freebsd-13-3
136138
install_script:
137139
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
138140
compile_script:
@@ -143,7 +145,7 @@ FreeBSD_task:
143145
FreeBSD_task:
144146
name: freebsd-gcc12-ilp64
145147
freebsd_instance:
146-
image_family: freebsd-13-2
148+
image_family: freebsd-13-3
147149
install_script:
148150
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
149151
compile_script:
@@ -153,10 +155,10 @@ FreeBSD_task:
153155
FreeBSD_task:
154156
name: FreeBSD-clang-openmp
155157
freebsd_instance:
156-
image_family: freebsd-13-2
158+
image_family: freebsd-13-3
157159
install_script:
158160
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
159-
- ln -s /usr/local/lib/gcc12/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
161+
- ln -s /usr/local/lib/gcc13/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
160162
compile_script:
161163
- gmake CC=clang FC=gfortran USE_OPENMP=1 CPP_THREAD_SAFETY_TEST=1
162164

.github/workflows/c910v.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
run: |
8585
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
8686
qemu-riscv64 ./utest/openblas_utest
87+
qemu-riscv64 ./utest/openblas_utest_ext
8788
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xscblat1
8889
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xdcblat1
8990
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xccblat1

.github/workflows/codspeed-bench.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: Run codspeed benchmarks
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
12+
jobs:
13+
benchmarks:
14+
if: "github.repository == 'OpenMathLib/OpenBLAS'"
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest]
19+
fortran: [gfortran]
20+
build: [make]
21+
pyver: ["3.12"]
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-python@v3
26+
with:
27+
python-version: ${{ matrix.pyver }}
28+
29+
- name: Print system information
30+
run: |
31+
if [ "$RUNNER_OS" == "Linux" ]; then
32+
cat /proc/cpuinfo
33+
fi
34+
35+
- name: Install Dependencies
36+
run: |
37+
if [ "$RUNNER_OS" == "Linux" ]; then
38+
sudo apt-get update
39+
sudo apt-get install -y gfortran cmake ccache libtinfo5
40+
else
41+
echo "::error::$RUNNER_OS not supported"
42+
exit 1
43+
fi
44+
45+
- name: Compilation cache
46+
uses: actions/cache@v3
47+
with:
48+
path: ~/.ccache
49+
# We include the commit sha in the cache key, as new cache entries are
50+
# only created if there is no existing entry for the key yet.
51+
# GNU make and cmake call the compilers differently. It looks like
52+
# that causes the cache to mismatch. Keep the ccache for both build
53+
# tools separate to avoid polluting each other.
54+
key: ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
55+
# Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler.
56+
restore-keys: |
57+
ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}
58+
ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}
59+
ccache-${{ runner.os }}-${{ matrix.build }}
60+
61+
- name: Write out the .pc
62+
run: |
63+
cd benchmark/pybench
64+
cat > openblas.pc << EOF
65+
libdir=${{ github.workspace }}
66+
includedir= ${{ github.workspace }}
67+
openblas_config= OpenBLAS 0.3.27 DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64
68+
version=0.0.99
69+
extralib=-lm -lpthread -lgfortran -lquadmath -L${{ github.workspace }} -lopenblas
70+
Name: openblas
71+
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
72+
Version: ${version}
73+
URL: https://github.com/xianyi/OpenBLAS
74+
Libs: ${{ github.workspace }}/libopenblas.so -Wl,-rpath,${{ github.workspace }}
75+
Libs.private: -lm -lpthread -lgfortran -lquadmath -L${{ github.workspace }} -lopenblas
76+
Cflags: -I${{ github.workspace}}
77+
EOF
78+
cat openblas.pc
79+
80+
- name: Configure ccache
81+
run: |
82+
if [ "${{ matrix.build }}" = "make" ]; then
83+
# Add ccache to path
84+
if [ "$RUNNER_OS" = "Linux" ]; then
85+
echo "/usr/lib/ccache" >> $GITHUB_PATH
86+
elif [ "$RUNNER_OS" = "macOS" ]; then
87+
echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH
88+
else
89+
echo "::error::$RUNNER_OS not supported"
90+
exit 1
91+
fi
92+
fi
93+
# Limit the maximum size and switch on compression to avoid exceeding the total disk or cache quota (5 GB).
94+
test -d ~/.ccache || mkdir -p ~/.ccache
95+
echo "max_size = 300M" > ~/.ccache/ccache.conf
96+
echo "compression = true" >> ~/.ccache/ccache.conf
97+
ccache -s
98+
99+
- name: Build OpenBLAS
100+
run: |
101+
case "${{ matrix.build }}" in
102+
"make")
103+
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
104+
;;
105+
"cmake")
106+
mkdir build && cd build
107+
cmake -DDYNAMIC_ARCH=1 \
108+
-DNOFORTRAN=0 \
109+
-DBUILD_WITHOUT_LAPACK=0 \
110+
-DCMAKE_VERBOSE_MAKEFILE=ON \
111+
-DCMAKE_BUILD_TYPE=Release \
112+
-DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \
113+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
114+
-DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
115+
..
116+
cmake --build .
117+
;;
118+
*)
119+
echo "::error::Configuration not supported"
120+
exit 1
121+
;;
122+
esac
123+
124+
- name: Show ccache status
125+
continue-on-error: true
126+
run: ccache -s
127+
128+
- name: Install benchmark dependencies
129+
run: pip install meson ninja numpy pytest pytest-codspeed --user
130+
131+
- name: Build the wrapper
132+
run: |
133+
cd benchmark/pybench
134+
export PKG_CONFIG_PATH=$PWD
135+
meson setup build --prefix=$PWD/build-install
136+
meson install -C build
137+
#
138+
# sanity check
139+
cd build/openblas_wrap
140+
python -c'import _flapack; print(dir(_flapack))'
141+
142+
- name: Run benchmarks under pytest-benchmark
143+
run: |
144+
cd benchmark/pybench
145+
pip install pytest-benchmark
146+
export PYTHONPATH=$PWD/build-install/lib/python${{matrix.pyver}}/site-packages/
147+
OPENBLAS_NUM_THREADS=1 pytest benchmarks/bench_blas.py -k 'gesdd'
148+
149+
- name: Run benchmarks
150+
uses: CodSpeedHQ/action@v2
151+
with:
152+
token: ${{ secrets.CODSPEED_TOKEN }}
153+
run: |
154+
cd benchmark/pybench
155+
export PYTHONPATH=$PWD/build-install/lib/python${{matrix.pyver}}/site-packages/
156+
OPENBLAS_NUM_THREADS=1 pytest benchmarks/bench_blas.py --codspeed
157+

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish docs via GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
8+
branches:
9+
- develop
10+
11+
jobs:
12+
build:
13+
name: Deploy docs
14+
if: "github.repository == 'OpenMathLib/OpenBLAS'"
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.10"
24+
25+
- name: Install MkDocs and doc theme packages
26+
run: pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin
27+
28+
- name: Build docs site
29+
run: mkdocs build
30+
31+
# mkdocs gh-deploy command only builds to the top-level, hence deploying
32+
# with this action instead.
33+
# Deploys to http://www.openmathlib.org/OpenBLAS/docs/
34+
- name: Deploy docs
35+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
36+
if: ${{ github.ref == 'refs/heads/develop' }}
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./site
40+
destination_dir: docs/

0 commit comments

Comments
 (0)