From fb90300af1726c5fb1cd0ab4d44816448b0d8c50 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 22 Nov 2025 19:08:36 +0100 Subject: [PATCH 1/7] update to latest develop --- .github/workflows/posix.yml | 2 +- .github/workflows/windows-arm.yml | 2 +- .github/workflows/windows.yml | 2 +- .travis.yml | 2 +- OpenBLAS | 2 +- pyproject.toml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 067eba1..4fd3fba 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -10,7 +10,7 @@ on: - cron: '0 0 * * 0' env: - OPENBLAS_COMMIT: "v0.3.30-349-gf6df9beb" + OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9" MACOSX_DEPLOYMENT_TARGET: 10.9 jobs: diff --git a/.github/workflows/windows-arm.yml b/.github/workflows/windows-arm.yml index 2b56e82..fc700c8 100644 --- a/.github/workflows/windows-arm.yml +++ b/.github/workflows/windows-arm.yml @@ -7,7 +7,7 @@ on: branches: [ main ] env: - OPENBLAS_COMMIT: "v0.3.30-349-gf6df9beb" + OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9" OPENBLAS_ROOT: "c:\\opt" # Preserve working directory for calls into bash # Without this, invoking bash will cd to the home directory diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 09599c6..e7caa9d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: null env: - OPENBLAS_COMMIT: "v0.3.30-349-gf6df9beb" + OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9" OPENBLAS_ROOT: "c:\\opt" # Preserve working directory for calls into bash # Without this, invoking bash will cd to the home directory diff --git a/.travis.yml b/.travis.yml index 6ca6247..e092dba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ env: global: # The archive that gets built has name from ``git describe`` on this # commit. - - OPENBLAS_COMMIT: "v0.3.30-349-gf6df9beb" + - OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9" dist: jammy services: docker diff --git a/OpenBLAS b/OpenBLAS index f6df9be..29fab2b 160000 --- a/OpenBLAS +++ b/OpenBLAS @@ -1 +1 @@ -Subproject commit f6df9bebbb4259aa61ab5634c0f1269fb152cc0e +Subproject commit 29fab2b912d3130b3caa84c2c1178f94ed25d1a6 diff --git a/pyproject.toml b/pyproject.toml index c956d4c..9de67f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,8 +8,8 @@ build-backend = "setuptools.build_meta" [project] name = "scipy-openblas64" -# v0.3.30-349-gf6df9beb -version = "0.3.30.349.0" +# v0.3.30-359-g29fab2b9 +version = "0.3.30.359.0" requires-python = ">=3.7" description = "Provides OpenBLAS for python packaging" readme = "README.md" From 16d0825405bdb704497fbcb5fc7a7653317e704a Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 3 Nov 2025 12:47:50 +0200 Subject: [PATCH 2/7] use qemu on github CI for ppc64le, s390x --- .github/workflows/posix.yml | 12 ++++++++++++ tools/build_steps.sh | 3 +++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 4fd3fba..efb2153 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -45,6 +45,12 @@ jobs: - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} + - { os: ubuntu-latest, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + + - { os: ubuntu-latest, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + env: NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }} @@ -70,6 +76,12 @@ jobs: with: xcode-version: '15.4' + - name: Set up QEMU + if: runner.os == 'Linux' && runner.arch == 'X64' + uses: docker/setup-qemu-action@v3 + with: + platforms: all + - name: Print some Environment variable run: | echo "PLAT: ${PLAT}" diff --git a/tools/build_steps.sh b/tools/build_steps.sh index 6aacb01..f05c49d 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -186,11 +186,14 @@ EOF export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH ;; *-s390x) + # The TargetList.txt has only ZARCH_GENERIC, Z13, Z14. Not worth + # messing with dynamic lists and targets. local bitness=64 ;; *-ppc64le) local bitness=64 local target="POWER8" + local dynamic_list="POWER8 POWER10" ;; Linux-loongarch64) local target="GENERIC" From 18336d8beb196df7f1edda654d767911236abe35 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 22 Nov 2025 10:48:11 +0100 Subject: [PATCH 3/7] fix QEMU build --- tools/build_steps.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/build_steps.sh b/tools/build_steps.sh index f05c49d..bd7fb9e 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -58,7 +58,7 @@ function clean_code { echo after git fetch origin git checkout $build_commit echo after git checkout $build_commit - git clean -fxd + git clean -fxd echo after git clean git submodule update --init --recursive echo after git submodule update @@ -187,13 +187,13 @@ EOF ;; *-s390x) # The TargetList.txt has only ZARCH_GENERIC, Z13, Z14. Not worth - # messing with dynamic lists and targets. + # messing with dynamic lists. local bitness=64 + local target="ZARCH_GENERIC" ;; *-ppc64le) local bitness=64 local target="POWER8" - local dynamic_list="POWER8 POWER10" ;; Linux-loongarch64) local target="GENERIC" @@ -225,6 +225,13 @@ EOF echo -n > utest/test_dsdot.c echo "Due to the qemu versions 7.2 causing utest cases to fail," echo "the utest dsdot:dsdot_n_1 have been temporarily disabled." + elif [ "$plat" == "s390x" ]; then + sed -i 's/CTEST(samin, positive_step_1_N_70){/CTEST_SKIP(samin, positive_step_1_N_70){/g' ./utest/test_extensions/test_samin.c + sed -i 's/CTEST(samin, negative_step_1_N_70){/CTEST_SKIP(samin, negative_step_1_N_70){/g' ./utest/test_extensions/test_samin.c + sed -i 's/CTEST(damin, positive_step_1_N_70){/CTEST_SKIP(damin, positive_step_1_N_70){/g' ./utest/test_extensions/test_damin.c + sed -i 's/CTEST(damin, negative_step_1_N_70){/CTEST_SKIP(damin, negative_step_1_N_70){/g' ./utest/test_extensions/test_damin.c + echo "the utest samin/damin have been temporarily disabled." + echo "QEMU does not support the 'lper' /'lpdr' instructions used" fi if [ -n "$dynamic_list" ]; then CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \ From 5f7fc1a3894ef4cdb45482b9d56c306dccbf6b63 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 22 Nov 2025 19:13:37 +0100 Subject: [PATCH 4/7] update to cibuildwheel 3.3.0 --- .github/workflows/posix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index efb2153..80bfbfa 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -93,7 +93,7 @@ jobs: # limit-access-to-actor: true - name: Build and Test wheels - uses: pypa/cibuildwheel@v3.1.4 + uses: pypa/cibuildwheel@v3.3.0 with: output-dir: dist env: From 2701daf89be1c2785613ac8112ddb46f18917908 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 15 Nov 2025 21:06:28 +0100 Subject: [PATCH 5/7] use clang instead of gcc --- .github/workflows/posix.yml | 2 - ci-before-build.sh | 4 +- pyproject.toml | 5 +- tools/build_steps.sh | 5 -- tools/install-static-clang.sh | 90 +++++++++++++++++++++++++++++++++++ 5 files changed, 97 insertions(+), 9 deletions(-) create mode 100755 tools/install-static-clang.sh diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 80bfbfa..f40f36c 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -39,8 +39,6 @@ jobs: - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} diff --git a/ci-before-build.sh b/ci-before-build.sh index f2dc8a3..354f69d 100755 --- a/ci-before-build.sh +++ b/ci-before-build.sh @@ -1,7 +1,7 @@ #! /bin/bash -# Most of the content in this file comes from https://github.com/multi-build/multibuild, with some modifications +# Most of the content in this file comes from https://github.com/multi-build/multibuild, with some modifications # Follow the license below @@ -87,6 +87,8 @@ else # Default Manylinux version MB_ML_VER=${MB_ML_VER:-2014} fi + ./tools/install-static-clang.sh + export PATH=/opt/clang/bin:$PATH fi # Work round bug in travis xcode image described at diff --git a/pyproject.toml b/pyproject.toml index 9de67f1..58a9f25 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ scipy_openblas64 = ["lib/*", "include/*", "lib/pkgconfig/*", "lib/cmake/openblas [tool.cibuildwheel] before-build = "bash ci-before-build.sh" repair-wheel-command = "bash ci-repair-wheel.sh {dest_dir} {wheel}" -test-command = "cd {package} && bash ci-test.sh " +test-command = "cd {package} && bash ci-test.sh" environment-pass = [ "OPENBLAS_COMMIT", "MACOSX_DEPLOYMENT_TARGET", @@ -54,4 +54,7 @@ environment-pass = [ "BUILD_DIR", "PLAT", "OS-NAME", + "RUNNER_ARCH", ] +[tool.cibuildwheel.linux] +environment = { CC = "/opt/clang/bin/clang", CXX = "/opt/clang/bin/clang++", LDFLAGS = "-fuse-ld=lld" } diff --git a/tools/build_steps.sh b/tools/build_steps.sh index bd7fb9e..8489cba 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -171,11 +171,6 @@ EOF Linux-aarch64) local bitness=64 local target="ARMV8" - # manylinux2014 image uses gcc-10, which miscompiles ARMV8SVE and up - if [ "$MB_ML_VER" == "2014" ]; then - echo setting DYNAMIC_LIST for manylinux2014 to ARMV8 only - local dynamic_list="ARMV8" - fi ;; Darwin-arm64) local bitness=64 diff --git a/tools/install-static-clang.sh b/tools/install-static-clang.sh new file mode 100755 index 0000000..b146b20 --- /dev/null +++ b/tools/install-static-clang.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +# Stop at any error, show all commands +set -exuo pipefail + +TOOLCHAIN_PATH=/opt/clang + +# Download static-clang +DEFAULT_ARCH="$(uname -m)" +if [ "${STATIC_CLANG_ARCH:-}" == "" ]; then + STATIC_CLANG_ARCH="${RUNNER_ARCH:-${DEFAULT_ARCH}}" +fi +case "${STATIC_CLANG_ARCH}" in + ARM64|aarch64|arm64|arm64/*) GO_ARCH=arm64;; + ARM|armv7l|armv8l|arm|arm/v7) GO_ARCH=arm;; # assume arm/v7 for arm + X64|x86_64|amd64|amd64/*) GO_ARCH=amd64;; + X86|i686|386) GO_ARCH=386;; + ppc64le) GO_ARCH=ppc64le;; + riscv64) GO_ARCH=riscv64;; + s390x) GO_ARCH=s390x;; + *) echo "No static-clang toolchain for ${CLANG_ARCH}">2; exit 1;; +esac +STATIC_CLANG_VERSION=21.1.6.0 +STATIC_CLANG_FILENAME="static-clang-linux-${GO_ARCH}.tar.xz" +STATIC_CLANG_URL="https://github.com/mayeut/static-clang-images/releases/download/v${STATIC_CLANG_VERSION}/${STATIC_CLANG_FILENAME}" +pushd /tmp +cat<<'EOF' | grep "${STATIC_CLANG_FILENAME}" > "${STATIC_CLANG_FILENAME}.sha256" +3f92a131d27ca606dae8230550236a0c897a7f5990d61a293814e0abea8d0e1f static-clang-linux-386.tar.xz +3fc6a3500cb9514b2c3af6d4a95676842769c301f872b6cea8c15576a64e756c static-clang-linux-amd64.tar.xz +82ea0c148ec75f72a2f6f61cc877561efe9675c6e59a1a2c4d130f088f9dc868 static-clang-linux-arm.tar.xz +9b5ad28877b6d56aff530164f7f88590e5d3441a1fddd7a73370539783056120 static-clang-linux-arm64.tar.xz +2adccbcad99d033222c8a63872739919375a7aef2339ce2e8ab7dcfc938502b1 static-clang-linux-loong64.tar.xz +5f551911ad73ecbbcf278e6d05a04bc68bd0dc4918a6a145352072f7734959c6 static-clang-linux-ppc64le.tar.xz +90f5beda1004bec124607df1f9fc0a70c2b9f382b82ab1db2703ebd131c920ef static-clang-linux-riscv64.tar.xz +e4047765a5e64bace4be36f6aae4d859e96bc1298d3ff5ba6b7d6100ea7d23f7 static-clang-linux-s390x.tar.xz +EOF +curl -fsSLO "${STATIC_CLANG_URL}" +sha256sum -c "${STATIC_CLANG_FILENAME}.sha256" +tar -C /opt -xf "${STATIC_CLANG_FILENAME}" +popd + +# configure target triple +case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in + manylinux*-armv7l) TARGET_TRIPLE=armv7-unknown-linux-gnueabihf;; + musllinux*-armv7l) TARGET_TRIPLE=armv7-alpine-linux-musleabihf;; + manylinux*-ppc64le) TARGET_TRIPLE=powerpc64le-unknown-linux-gnu;; + musllinux*-ppc64le) TARGET_TRIPLE=powerpc64le-alpine-linux-musl;; + manylinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-unknown-linux-gnu;; + musllinux*-*) TARGET_TRIPLE=${AUDITWHEEL_ARCH}-alpine-linux-musl;; +esac +case "${AUDITWHEEL_POLICY}-${AUDITWHEEL_ARCH}" in + *-riscv64) M_ARCH="-march=rv64gc";; + *-x86_64) M_ARCH="-march=x86-64";; + *-armv7l) M_ARCH="-march=armv7a";; + manylinux*-i686) M_ARCH="-march=k8 -mtune=generic";; # same as gcc manylinux2014 / manylinux_2_28 + musllinux*-i686) M_ARCH="-march=pentium-m -mtune=generic";; # same as gcc musllinux_1_2 +esac +GCC_TRIPLE=$(gcc -dumpmachine) + +cat<"${TOOLCHAIN_PATH}/bin/${AUDITWHEEL_PLAT}.cfg" + -target ${TARGET_TRIPLE} + ${M_ARCH:-} + --gcc-toolchain=${DEVTOOLSET_ROOTPATH:-}/usr + --gcc-triple=${GCC_TRIPLE} +EOF + +cat<"${TOOLCHAIN_PATH}/bin/clang.cfg" + @${AUDITWHEEL_PLAT}.cfg +EOF + +cat<"${TOOLCHAIN_PATH}/bin/clang++.cfg" + @${AUDITWHEEL_PLAT}.cfg +EOF + +cat<"${TOOLCHAIN_PATH}/bin/clang-cpp.cfg" + @${AUDITWHEEL_PLAT}.cfg +EOF + +# override entrypoint to add the toolchain to PATH +mv /usr/local/bin/manylinux-entrypoint /usr/local/bin/manylinux-entrypoint-org +cat</usr/local/bin/manylinux-entrypoint +#!/bin/bash + +set -eu + +export PATH="${TOOLCHAIN_PATH}/bin:\${PATH}" +exec /usr/local/bin/manylinux-entrypoint-org "\$@" +EOF + +chmod +x /usr/local/bin/manylinux-entrypoint From 62366010fa129f393ba189c7f37358b5af766b30 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 22 Nov 2025 19:53:41 +0100 Subject: [PATCH 6/7] remove Travis CI config --- .travis.yml | 65 ----------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e092dba..0000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +0,0 @@ -env: - global: - # The archive that gets built has name from ``git describe`` on this - # commit. - - OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9" - -dist: jammy -services: docker - -jobs: - include: - - os: linux - arch: s390x - env: - - PLAT=s390x - - MB_ML_VER=2014 - - INTERFACE64=0 - - os: linux - arch: s390x - env: - - PLAT=s390x - - INTERFACE64=1 - - MB_ML_VER=2014 - - os: linux - arch: ppc64le - env: - - PLAT=ppc64le - - MB_ML_VER=2014 - - INTERFACE64=0 - - os: linux - arch: ppc64le - env: - - PLAT=ppc64le - - INTERFACE64=1 - - MB_ML_VER=2014 - -before_install: - - source tools/build_steps.sh - - before_build - -install: - # Maybe get and clean and patch source - - | - if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then - clean_code develop - else - clean_code $OPENBLAS_COMMIT - fi - echo done install step - -script: - # Build library and collect into libs subdirectory - - travis_wait 30 build_on_travis - - libc=${MB_ML_LIBC:-manylinux} - - docker_image=quay.io/pypa/${libc}${MB_ML_VER}_${PLAT} - - docker run --rm -e INTERFACE64="${INTERFACE64}" -e MB_ML_LIBC="${MB_ML_LIBC}" -v $(pwd):/openblas "${docker_image}" /bin/bash -xe /openblas/tools/build_wheel.sh - -after_success: - - set +ex - - sudo chmod -R a+w /home/travis/.cache - - pip install -q git+https://github.com/Anaconda-Platform/anaconda-client@1.13.0 - # Upload libraries to the shared staging area on anaconda.org - - sudo chmod -R a+w dist - - source tools/upload_to_anaconda_staging.sh - - upload_wheels From 4c307ecfc21fd69c46bd214098bed698a51ecaf1 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 22 Nov 2025 20:41:06 +0100 Subject: [PATCH 7/7] run QEMU on aarch64 --- .github/workflows/posix.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index f40f36c..21d197d 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -43,11 +43,11 @@ jobs: - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - { os: ubuntu-latest, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-latest, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-latest, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-latest, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} env: NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} @@ -75,7 +75,7 @@ jobs: xcode-version: '15.4' - name: Set up QEMU - if: runner.os == 'Linux' && runner.arch == 'X64' + if: matrix.PLAT == 'ppc64le' || matrix.PLAT == 's390x' uses: docker/setup-qemu-action@v3 with: platforms: all @@ -92,6 +92,7 @@ jobs: - name: Build and Test wheels uses: pypa/cibuildwheel@v3.3.0 + timeout-minutes: 60 with: output-dir: dist env: