Skip to content

Commit 49c044b

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
1 parent 8a31ead commit 49c044b

File tree

5 files changed

+43
-18
lines changed

5 files changed

+43
-18
lines changed

.github/scripts/auditwheel_show.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def main():
2222
print(audit_wheel_output.stdout)
2323

2424
if audit_wheel_output.stderr:
25-
print(f"**Error:**\n```{audit_wheel_output.stderr}```")
25+
print(f"**Error:**\n```\n{audit_wheel_output.stderr}\n```")
2626

2727
print("---")
2828

.github/scripts/build-cpu.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ set -xeuo pipefail
66

77
pip install cmake==3.28.3
88

9-
if [ "${build_os:0:6}" == ubuntu ] && [ "${build_arch}" == aarch64 ]; then
10-
# Allow cross-compile on aarch64
11-
sudo apt-get update
12-
sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu g++-aarch64-linux-gnu
13-
cmake -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCOMPUTE_BACKEND=cpu .
14-
elif [ "${build_os:0:5}" == macos ] && [ "${build_arch}" == aarch64 ]; then
9+
if [ "${build_os:0:5}" == macos ] && [ "${build_arch}" == aarch64 ]; then
1510
cmake -DCMAKE_OSX_ARCHITECTURES=arm64 -DCOMPUTE_BACKEND=cpu .
1611
else
1712
cmake -DCOMPUTE_BACKEND=cpu .

.github/scripts/build-cuda.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ set -xeuo pipefail
88

99
if [[ -v cuda_targets ]]; then
1010
build_capability="${cuda_targets}"
11+
elif [ "${build_arch}" = "aarch64" ]; then
12+
build_capability="75;80;90"
13+
14+
# CUDA 12.8: Add sm100
15+
[[ "${cuda_version}" == 12.8.* ]] && build_capability="75;80;90;100"
1116
else
1217
# By default, target Maxwell through Hopper.
1318
build_capability="50;52;60;61;70;75;80;86;89;90"

.github/workflows/python-package.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,23 @@ jobs:
198198

199199
audit-wheels:
200200
needs: build-wheels
201-
runs-on: ubuntu-latest
201+
strategy:
202+
matrix:
203+
os: [ubuntu-22.04, ubuntu-22.04-arm]
204+
include:
205+
- os: ubuntu-22.04
206+
arch: x86_64
207+
- os: ubuntu-22.04-arm
208+
arch: aarch64
209+
runs-on: ${{ matrix.os }}
202210
env:
203211
PIP_DISABLE_PIP_VERSION_CHECK: 1
204212
steps:
205213
- uses: actions/checkout@v4
206-
- name: Download all wheels
214+
- name: Download wheel
207215
uses: actions/download-artifact@v4
208216
with:
209-
merge-multiple: true
210-
pattern: "bdist_wheel_*"
217+
name: bdist_wheel_${{ matrix.os }}_${{ matrix.arch }}
211218
path: wheels/
212219
- name: Set up Python
213220
uses: actions/setup-python@v5

.github/workflows/tests.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ jobs:
1717
build-cpu:
1818
strategy:
1919
matrix:
20-
os: [ubuntu-22.04, windows-2025]
21-
arch: [x86_64]
20+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025]
21+
include:
22+
- os: ubuntu-22.04
23+
arch: x86_64
24+
- os: ubuntu-22.04-arm
25+
arch: aarch64
26+
- os: windows-2025
27+
arch: x86_64
2228
runs-on: ${{ matrix.os }}
2329
steps:
2430
- uses: actions/checkout@v4
@@ -44,8 +50,14 @@ jobs:
4450
strategy:
4551
matrix:
4652
cuda_version: ["11.8.0", "12.8.1"]
47-
os: [ubuntu-22.04, windows-2025]
48-
arch: [x86_64]
53+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025]
54+
include:
55+
- os: ubuntu-22.04
56+
arch: x86_64
57+
- os: ubuntu-22.04-arm
58+
arch: aarch64
59+
- os: windows-2025
60+
arch: x86_64
4961
runs-on: ${{ matrix.os }}
5062

5163
steps:
@@ -70,7 +82,7 @@ jobs:
7082
run: bash .github/scripts/build-cuda.sh
7183
env:
7284
build_os: ${{ matrix.os }}
73-
build_arch: x86_64
85+
build_arch: ${{ matrix.arch }}
7486
cuda_version: ${{ matrix.cuda_version }}
7587
cuda_targets: "75"
7688

@@ -86,9 +98,15 @@ jobs:
8698
strategy:
8799
fail-fast: false
88100
matrix:
89-
os: [ubuntu-22.04, windows-2025]
90-
arch: [x86_64]
101+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025]
91102
torch_version: ["2.7.0"]
103+
include:
104+
- os: ubuntu-22.04
105+
arch: x86_64
106+
- os: ubuntu-22.04-arm
107+
arch: aarch64
108+
- os: windows-2025
109+
arch: x86_64
92110
runs-on: ${{ matrix.os }}
93111
env:
94112
BNB_TEST_DEVICE: cpu

0 commit comments

Comments
 (0)