diff --git a/.github/scripts/auditwheel_show.py b/.github/scripts/auditwheel_show.py index c9dd09cc2..3c62ef6f7 100755 --- a/.github/scripts/auditwheel_show.py +++ b/.github/scripts/auditwheel_show.py @@ -22,7 +22,7 @@ def main(): print(audit_wheel_output.stdout) if audit_wheel_output.stderr: - print(f"**Error:**\n```{audit_wheel_output.stderr}```") + print(f"**Error:**\n```\n{audit_wheel_output.stderr}\n```") print("---") diff --git a/.github/scripts/build-cpu.sh b/.github/scripts/build-cpu.sh index 6dc6a8ddf..5daeb5ea5 100644 --- a/.github/scripts/build-cpu.sh +++ b/.github/scripts/build-cpu.sh @@ -6,12 +6,7 @@ set -xeuo pipefail pip install cmake==3.28.3 -if [ "${build_os:0:6}" == ubuntu ] && [ "${build_arch}" == aarch64 ]; then - # Allow cross-compile on aarch64 - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu g++-aarch64-linux-gnu - cmake -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCOMPUTE_BACKEND=cpu . -elif [ "${build_os:0:5}" == macos ] && [ "${build_arch}" == aarch64 ]; then +if [ "${build_os:0:5}" == macos ] && [ "${build_arch}" == aarch64 ]; then cmake -DCMAKE_OSX_ARCHITECTURES=arm64 -DCOMPUTE_BACKEND=cpu . else cmake -DCOMPUTE_BACKEND=cpu . diff --git a/.github/scripts/build-cuda.sh b/.github/scripts/build-cuda.sh index be8e98704..d8c4ebbe1 100644 --- a/.github/scripts/build-cuda.sh +++ b/.github/scripts/build-cuda.sh @@ -8,6 +8,11 @@ set -xeuo pipefail if [[ -v cuda_targets ]]; then build_capability="${cuda_targets}" +elif [ "${build_arch}" = "aarch64" ]; then + build_capability="75;80;90" + + # CUDA 12.8: Add sm100 + [[ "${cuda_version}" == 12.8.* ]] && build_capability="75;80;90;100" else # By default, target Maxwell through Hopper. build_capability="50;52;60;61;70;75;80;86;89;90" diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e31238c00..9d160b505 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -198,16 +198,23 @@ jobs: audit-wheels: needs: build-wheels - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-22.04-arm] + include: + - os: ubuntu-22.04 + arch: x86_64 + - os: ubuntu-22.04-arm + arch: aarch64 + runs-on: ${{ matrix.os }} env: PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: - uses: actions/checkout@v4 - - name: Download all wheels + - name: Download wheel uses: actions/download-artifact@v4 with: - merge-multiple: true - pattern: "bdist_wheel_*" + name: bdist_wheel_${{ matrix.os }}_${{ matrix.arch }} path: wheels/ - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a2917b9bb..73ab5ce5b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,8 +17,14 @@ jobs: build-cpu: strategy: matrix: - os: [ubuntu-22.04, windows-2025] - arch: [x86_64] + os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025] + include: + - os: ubuntu-22.04 + arch: x86_64 + - os: ubuntu-22.04-arm + arch: aarch64 + - os: windows-2025 + arch: x86_64 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -44,8 +50,14 @@ jobs: strategy: matrix: cuda_version: ["11.8.0", "12.8.1"] - os: [ubuntu-22.04, windows-2025] - arch: [x86_64] + os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025] + include: + - os: ubuntu-22.04 + arch: x86_64 + - os: ubuntu-22.04-arm + arch: aarch64 + - os: windows-2025 + arch: x86_64 runs-on: ${{ matrix.os }} steps: @@ -70,7 +82,7 @@ jobs: run: bash .github/scripts/build-cuda.sh env: build_os: ${{ matrix.os }} - build_arch: x86_64 + build_arch: ${{ matrix.arch }} cuda_version: ${{ matrix.cuda_version }} cuda_targets: "75" @@ -86,9 +98,15 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, windows-2025] - arch: [x86_64] + os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025] torch_version: ["2.7.0"] + include: + - os: ubuntu-22.04 + arch: x86_64 + - os: ubuntu-22.04-arm + arch: aarch64 + - os: windows-2025 + arch: x86_64 runs-on: ${{ matrix.os }} env: BNB_TEST_DEVICE: cpu