Skip to content

Commit 76f1be4

Browse files
authored
Merge pull request #5605 from OpenMathLib/develop
Merge from develop for 0.3.31 release
2 parents ca1aefc + 0e7b11f commit 76f1be4

File tree

1,277 files changed

+51590
-21112
lines changed

Some content is hidden

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

1,277 files changed

+51590
-21112
lines changed

.cirrus.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
62-
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -arch x86_64"
61+
- export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
62+
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.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:
@@ -78,8 +78,8 @@ task:
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_16.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
82-
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_16.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.4.sdk -arch arm64 -miphoneos-version-min=10.0"
81+
- export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
82+
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk -arch arm64 -miphoneos-version-min=10.0"
8383
- xcrun --sdk iphoneos --show-sdk-path
8484
- ls -l /Applications
8585
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
@@ -127,7 +127,7 @@ task:
127127
FreeBSD_task:
128128
name: FreeBSD-gcc
129129
freebsd_instance:
130-
image_family: freebsd-14-2
130+
image_family: freebsd-14-3
131131
install_script:
132132
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
133133
compile_script:
@@ -138,7 +138,7 @@ FreeBSD_task:
138138
FreeBSD_task:
139139
name: freebsd-gcc-ilp64
140140
freebsd_instance:
141-
image_family: freebsd-14-2
141+
image_family: freebsd-14-3
142142
install_script:
143143
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
144144
compile_script:
@@ -148,7 +148,7 @@ FreeBSD_task:
148148
FreeBSD_task:
149149
name: FreeBSD-clang-openmp
150150
freebsd_instance:
151-
image_family: freebsd-14-2
151+
image_family: freebsd-14-3
152152
install_script:
153153
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
154154
- ln -s /usr/local/lib/gcc13/libgfortran.so.5.0.0 /usr/lib/libgfortran.so

.github/workflows/apple_m.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
elif [ "$RUNNER_OS" == "macOS" ]; then
4545
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
4646
brew reinstall gcc
47-
brew install coreutils cmake ccache
47+
brew install coreutils ccache
4848
brew install llvm
4949
else
5050
echo "::error::$RUNNER_OS not supported"
@@ -87,10 +87,16 @@ jobs:
8787
echo "max_size = 300M" > ~/.ccache/ccache.conf
8888
echo "compression = true" >> ~/.ccache/ccache.conf
8989
ccache -s
90+
91+
- name: Add gfortran runtime to link path
92+
if: matrix.build == 'make' && runner.os == 'macOS'
93+
run: |
94+
GFORTRAN_LIBDIR=$(gfortran -print-file-name=libgfortran.dylib | xargs dirname)
95+
echo "Using gfortran runtime in $GFORTRAN_LIBDIR"
96+
echo "LDFLAGS=-L/opt/homebrew/opt/llvm/lib -L$GFORTRAN_LIBDIR" >> $GITHUB_ENV
9097
9198
- name: Build OpenBLAS
9299
run: |
93-
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
94100
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
95101
export CC="/opt/homebrew/opt/llvm/bin/clang"
96102
case "${{ matrix.build }}" in

.github/workflows/arm64_graviton.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ jobs:
8888
run: |
8989
case "${{ matrix.build }}" in
9090
"make")
91-
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
91+
make -j$(nproc) DYNAMIC_ARCH=1 BUILD_BFLOAT16=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
9292
;;
9393
"cmake")
9494
mkdir build && cd build
9595
cmake -DDYNAMIC_ARCH=1 \
9696
-DNOFORTRAN=0 \
9797
-DBUILD_WITHOUT_LAPACK=0 \
98+
-DBUILD_BFLOAT16=1 \
9899
-DCMAKE_VERBOSE_MAKEFILE=ON \
99100
-DCMAKE_BUILD_TYPE=Release \
100101
-DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \

.github/workflows/dynamic_arch.yml

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: continuous build
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
concurrency:
66
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -11,17 +11,24 @@ permissions:
1111

1212
jobs:
1313
build:
14-
if: "github.repository == 'OpenMathLib/OpenBLAS'"
14+
if: "github.repository == 'OpenMathLib/OpenBLAS' || github.event_name == 'workflow_dispatch'"
1515
runs-on: ${{ matrix.os }}
1616

1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [ubuntu-latest, macos-latest]
20+
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
21+
cc: [gcc, clang, clang-21]
2122
fortran: [gfortran, flang]
2223
build: [cmake, make]
2324
exclude:
2425
- os: macos-latest
26+
cc: gcc
27+
- os: macos-latest
28+
cc: clang-21
29+
- os: macos-latest
30+
fortran: flang
31+
- os: ubuntu-24.04-arm
2532
fortran: flang
2633

2734
steps:
@@ -42,14 +49,27 @@ jobs:
4249
- name: Install Dependencies
4350
run: |
4451
if [ "$RUNNER_OS" == "Linux" ]; then
52+
cat << EOF | sudo tee -a /etc/apt/apt.conf.d/01norecommend
53+
APT::Install-Recommends "0";
54+
APT::Install-Suggests "0";
55+
EOF
4556
sudo apt-get update
46-
sudo apt-get install -y gfortran cmake ccache
47-
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
48-
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
57+
sudo apt-get install -y ccache
58+
if [ "${{ matrix.cc }}" == "clang-21" ]; then
59+
wget https://apt.llvm.org/llvm.sh
60+
chmod +x llvm.sh
61+
sudo ./llvm.sh 21
62+
fi
63+
if [ "${{ matrix.fortran }}" == "flang" ]; then
64+
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
65+
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
66+
else
67+
sudo apt-get install -y ${{ matrix.fortran }}
68+
fi
4969
elif [ "$RUNNER_OS" == "macOS" ]; then
5070
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
5171
brew reinstall gcc
52-
brew install coreutils cmake ccache
72+
brew install coreutils ccache
5373
else
5474
echo "::error::$RUNNER_OS not supported"
5575
exit 1
@@ -64,12 +84,12 @@ jobs:
6484
# GNU make and cmake call the compilers differently. It looks like
6585
# that causes the cache to mismatch. Keep the ccache for both build
6686
# tools separate to avoid polluting each other.
67-
key: ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
87+
key: ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
6888
# Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler.
6989
restore-keys: |
70-
ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}
71-
ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}
72-
ccache-${{ runner.os }}-${{ matrix.build }}
90+
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}-${{ github.ref }}
91+
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}
92+
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}
7393
7494
- name: Configure ccache
7595
run: |
@@ -90,6 +110,14 @@ jobs:
90110
echo "compression = true" >> ~/.ccache/ccache.conf
91111
ccache -s
92112
113+
- name: Add gfortran runtime to link path
114+
if: matrix.build == 'make' && runner.os == 'macOS'
115+
run: |
116+
GFORTRAN_LIBDIR=$(gfortran -print-file-name=libgfortran.dylib | xargs dirname)
117+
echo "Using gfortran runtime in $GFORTRAN_LIBDIR"
118+
# Preserve whatever LDFLAGS may already contain
119+
echo "LDFLAGS=${LDFLAGS:+$LDFLAGS }-L$GFORTRAN_LIBDIR" >> "$GITHUB_ENV"
120+
93121
- name: Build OpenBLAS
94122
run: |
95123
if [ "${{ matrix.fortran }}" = "flang" ]; then
@@ -102,7 +130,7 @@ jobs:
102130
fi
103131
case "${{ matrix.build }}" in
104132
"make")
105-
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
133+
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
106134
;;
107135
"cmake")
108136
mkdir build && cd build
@@ -111,6 +139,7 @@ jobs:
111139
-DBUILD_WITHOUT_LAPACK=0 \
112140
-DCMAKE_VERBOSE_MAKEFILE=ON \
113141
-DCMAKE_BUILD_TYPE=Release \
142+
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
114143
-DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \
115144
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
116145
-DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
@@ -134,13 +163,13 @@ jobs:
134163
"make")
135164
MAKE_FLAGS='DYNAMIC_ARCH=1 USE_OPENMP=0'
136165
echo "::group::Tests in 'test' directory"
137-
make -C test $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
166+
make -C test $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
138167
echo "::endgroup::"
139168
echo "::group::Tests in 'ctest' directory"
140-
make -C ctest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
169+
make -C ctest $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
141170
echo "::endgroup::"
142171
echo "::group::Tests in 'utest' directory"
143-
make -C utest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
172+
make -C utest $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
144173
echo "::endgroup::"
145174
;;
146175
"cmake")
@@ -364,15 +393,15 @@ jobs:
364393
steps:
365394
- name: Checkout repository
366395
uses: actions/checkout@v3
367-
396+
368397
- name: Install Dependencies
369398
run: |
370399
sudo apt-get update
371400
sudo apt-get install -y gcc gfortran make
372-
401+
373402
- name: Build OpenBLAS
374403
run: |
375-
make -j${nproc}
404+
make -j${nproc}
376405
make -j${nproc} lapack-test
377-
378-
406+
407+

.github/workflows/loongarch64_clang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Install libffi6
3737
run: |
38-
wget http://ftp.ca.debian.org/debian/pool/main/libf/libffi/libffi6_3.2.1-9_amd64.deb
38+
wget https://download.nvidia.com/cumulus/apt.cumulusnetworks.com/pool/upstream/libf/libffi/libffi6_3.2.1-9_amd64.deb
3939
sudo dpkg -i libffi6_3.2.1-9_amd64.deb
4040
4141
- name: Install APT deps

.github/workflows/riscv64_vector.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
env:
1717
triple: riscv64-unknown-linux-gnu
1818
riscv_gnu_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain
19-
riscv_gnu_toolchain_version: 13.2.0
20-
riscv_gnu_toolchain_nightly_download_path: /releases/download/2024.02.02/riscv64-glibc-ubuntu-22.04-llvm-nightly-2024.02.02-nightly.tar.gz
19+
riscv_gnu_toolchain_version: 15.1.0
20+
riscv_gnu_toolchain_nightly_download_path: /releases/download/2025.08.29/riscv64-glibc-ubuntu-22.04-llvm-nightly-2025.08.29-nightly.tar.xz
2121
strategy:
2222
fail-fast: false
2323
matrix:
@@ -26,8 +26,8 @@ jobs:
2626
opts: TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64
2727
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64
2828
- target: RISCV64_ZVL256B
29-
opts: TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64
30-
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64
29+
opts: TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1
30+
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true
3131
- target: DYNAMIC_ARCH=1
3232
opts: TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1
3333
qemu_cpu: rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64
@@ -40,10 +40,13 @@ jobs:
4040
run: |
4141
sudo apt-get update
4242
sudo apt-get install autoconf automake autotools-dev ninja-build make \
43-
libgomp1-riscv64-cross ccache
43+
libgomp1-riscv64-cross ccache qemu-kvm qemu-user libc6-riscv64-cross
4444
wget ${riscv_gnu_toolchain}/${riscv_gnu_toolchain_nightly_download_path}
4545
tar -xvf $(basename ${riscv_gnu_toolchain_nightly_download_path}) -C /opt
46-
46+
wget https://gist.github.com/martin-frbg/bb630e0de34978e578eeb496b1538d4e/raw/7fd8d971f327f7a517b8f5f7989479ff2b36f71f/qemu-riscv64-10.1-ubuntu24 -P /opt/riscv/bin -o riscv64-qemu
47+
mv /opt/riscv/bin/qemu-riscv64-10.1-ubuntu24 /opt/riscv/bin/qemu-riscv64
48+
chmod +x /opt/riscv/bin/qemu-riscv64
49+
4750
- name: Compilation cache
4851
uses: actions/cache@v3
4952
with:
@@ -74,7 +77,7 @@ jobs:
7477
run: |
7578
export PATH="/opt/riscv/bin:$PATH"
7679
make TARGET=${{ matrix.target }} CFLAGS="-DTARGET=${{ matrix.target }}" \
77-
CC='${triple}-gcc' \
80+
CC='ccache clang --rtlib=compiler-rt -target ${triple} --sysroot /opt/riscv/sysroot --gcc-toolchain=/opt/riscv/lib/gcc/riscv64-unknown-linux-gnu/${riscv_gnu_toolchain_version}/' \
7881
AR='ccache ${triple}-ar' AS='ccache ${triple}-gcc' LD='ccache ${triple}-gcc' \
7982
RANLIB='ccache ${triple}-ranlib' \
8083
FC='ccache ${triple}-gfortran' ${{ matrix.opts }} \
@@ -98,6 +101,8 @@ jobs:
98101
shell: bash
99102
run: |
100103
export PATH="/opt/riscv/bin:$PATH"
104+
export LD_LIBRARY_PATH=/opt/riscv/sysroot/lib
105+
sudo ln -s /opt/riscv/sysroot/lib/ld-linux-riscv64-lp64d.so.1 /lib
101106
export QEMU_CPU=${{ matrix.qemu_cpu }}
102107
rm -rf ./test_out
103108
mkdir -p ./test_out
@@ -134,6 +139,14 @@ jobs:
134139
wait
135140
while IFS= read -r -d $'\0' LOG; do cat $LOG ; FAILURES=1 ; done < <(grep -lZ FAIL ./test_out/*)
136141
if [[ ! -z $FAILURES ]]; then echo "==========" ; echo "== FAIL ==" ; echo "==========" ; echo ; exit 1 ; fi
142+
if [ "${{matrix.target}}" == "RISCV64_ZVL256B" ]; then
143+
qemu-riscv64 test/test_sbgemm &
144+
qemu-riscv64 test/test_sbgemv &
145+
qemu-riscv64 test/test_shgemm &
146+
qemu-riscv64 test/test_shgemv &
147+
qemu-riscv64 test/test_bgemm
148+
fi
149+
137150
138151
- name: netlib tests
139152
shell: bash

0 commit comments

Comments
 (0)