Unverified Commit 49c044b1 authored by Matthew Douglas's avatar Matthew Douglas Committed by GitHub
Browse files

Linux aarch64 CI updates (#1622)

* Add aarch64 cpu tests and CUDA build to nightly workflow

* aarch64: limit CUDA targets to sm75, sm80, sm90, sm100

* aarch64: limit CUDA targets to sm75, sm80, sm90, sm100

* Update build cpu script

* fix

* Update auditwheel for aarch64
parent 8a31eadf
...@@ -22,7 +22,7 @@ def main(): ...@@ -22,7 +22,7 @@ def main():
print(audit_wheel_output.stdout) print(audit_wheel_output.stdout)
if audit_wheel_output.stderr: if audit_wheel_output.stderr:
print(f"**Error:**\n```{audit_wheel_output.stderr}```") print(f"**Error:**\n```\n{audit_wheel_output.stderr}\n```")
print("---") print("---")
......
...@@ -6,12 +6,7 @@ set -xeuo pipefail ...@@ -6,12 +6,7 @@ set -xeuo pipefail
pip install cmake==3.28.3 pip install cmake==3.28.3
if [ "${build_os:0:6}" == ubuntu ] && [ "${build_arch}" == aarch64 ]; then if [ "${build_os:0:5}" == macos ] && [ "${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
cmake -DCMAKE_OSX_ARCHITECTURES=arm64 -DCOMPUTE_BACKEND=cpu . cmake -DCMAKE_OSX_ARCHITECTURES=arm64 -DCOMPUTE_BACKEND=cpu .
else else
cmake -DCOMPUTE_BACKEND=cpu . cmake -DCOMPUTE_BACKEND=cpu .
......
...@@ -8,6 +8,11 @@ set -xeuo pipefail ...@@ -8,6 +8,11 @@ set -xeuo pipefail
if [[ -v cuda_targets ]]; then if [[ -v cuda_targets ]]; then
build_capability="${cuda_targets}" 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 else
# By default, target Maxwell through Hopper. # By default, target Maxwell through Hopper.
build_capability="50;52;60;61;70;75;80;86;89;90" build_capability="50;52;60;61;70;75;80;86;89;90"
......
...@@ -198,16 +198,23 @@ jobs: ...@@ -198,16 +198,23 @@ jobs:
audit-wheels: audit-wheels:
needs: build-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: env:
PIP_DISABLE_PIP_VERSION_CHECK: 1 PIP_DISABLE_PIP_VERSION_CHECK: 1
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Download all wheels - name: Download wheel
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
merge-multiple: true name: bdist_wheel_${{ matrix.os }}_${{ matrix.arch }}
pattern: "bdist_wheel_*"
path: wheels/ path: wheels/
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
......
...@@ -17,8 +17,14 @@ jobs: ...@@ -17,8 +17,14 @@ jobs:
build-cpu: build-cpu:
strategy: strategy:
matrix: matrix:
os: [ubuntu-22.04, windows-2025] os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025]
arch: [x86_64] 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 }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
...@@ -44,8 +50,14 @@ jobs: ...@@ -44,8 +50,14 @@ jobs:
strategy: strategy:
matrix: matrix:
cuda_version: ["11.8.0", "12.8.1"] cuda_version: ["11.8.0", "12.8.1"]
os: [ubuntu-22.04, windows-2025] os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025]
arch: [x86_64] 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 }} runs-on: ${{ matrix.os }}
steps: steps:
...@@ -70,7 +82,7 @@ jobs: ...@@ -70,7 +82,7 @@ jobs:
run: bash .github/scripts/build-cuda.sh run: bash .github/scripts/build-cuda.sh
env: env:
build_os: ${{ matrix.os }} build_os: ${{ matrix.os }}
build_arch: x86_64 build_arch: ${{ matrix.arch }}
cuda_version: ${{ matrix.cuda_version }} cuda_version: ${{ matrix.cuda_version }}
cuda_targets: "75" cuda_targets: "75"
...@@ -86,9 +98,15 @@ jobs: ...@@ -86,9 +98,15 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-22.04, windows-2025] os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025]
arch: [x86_64]
torch_version: ["2.7.0"] 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 }} runs-on: ${{ matrix.os }}
env: env:
BNB_TEST_DEVICE: cpu BNB_TEST_DEVICE: cpu
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment