Skip to content

Commit 503d243

Browse files
General cleanup & test improvements (#1646)
* General cleanup & test improvements * Tests: WA numpy 2 compat issue for torch<2.3 * Tests: update aarch64 cpu min torch version * Tests: update aarch64 cpu min torch version * Tests: update aarch64 cpu min torch version
1 parent e99ac0a commit 503d243

File tree

9 files changed

+57
-395
lines changed

9 files changed

+57
-395
lines changed

.github/workflows/tests.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,32 @@ jobs:
9393
path: output/${{ matrix.os }}/${{ matrix.arch }}/*
9494
retention-days: 7
9595

96-
cpu-tests:
96+
test-cpu:
9797
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
9898
needs: build-cpu
9999
strategy:
100100
fail-fast: false
101101
matrix:
102102
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025, macos-15]
103-
torch_version: ["2.6.0", "2.7.0"]
103+
# Test with the oldest supported torch version and the two newest.
104+
torch_version: ["2.2.2", "2.6.0", "2.7.0"]
104105
include:
105106
- os: ubuntu-22.04
106107
arch: x86_64
107108
runner: banb-aws-general-8-plus-use1-public-80
108109
- os: ubuntu-22.04-arm
109110
arch: aarch64
111+
- os: ubuntu-22.04-arm
112+
arch: aarch64
113+
torch_version: "2.5.1"
110114
- os: windows-2025
111115
arch: x86_64
112116
- os: macos-15
113117
arch: arm64
118+
exclude:
119+
- os: ubuntu-22.04-arm
120+
torch_version: "2.2.2"
121+
114122
runs-on: ${{ matrix.runner || matrix.os }}
115123
env:
116124
BNB_TEST_DEVICE: cpu
@@ -135,6 +143,11 @@ jobs:
135143
pip install -e ".[test]"
136144
pip install pytest-cov
137145
146+
# We need to downgrade to numpy<2 for torch<2.3 compatibility.
147+
- name: Downgrade NumPy
148+
if: startsWith(matrix.torch_version, '2.2.')
149+
run: pip install "numpy<2"
150+
138151
- name: Show installed packages
139152
run: pip list
140153

@@ -144,7 +157,7 @@ jobs:
144157
- name: Run tests
145158
run: pytest --durations=100
146159

147-
# cuda-aarch64-tests:
160+
# test-cuda-aarch64:
148161
# if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
149162
# needs: build-cuda
150163
# strategy:
@@ -167,7 +180,7 @@ jobs:
167180

168181

169182

170-
cuda-tests:
183+
test-cuda:
171184
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
172185
needs: build-cuda
173186
strategy:
@@ -179,7 +192,7 @@ jobs:
179192
cuda_version: ["11.8.0", "12.6.3", "12.8.1"]
180193
include:
181194
- cuda_version: "11.8.0"
182-
torch_version: "2.4.1"
195+
torch_version: "2.2.2"
183196
pypi_index: "https://download.pytorch.org/whl/cu118"
184197
- cuda_version: "12.6.3"
185198
torch_version: "2.6.0"
@@ -238,6 +251,11 @@ jobs:
238251
pip install -e ".[test]"
239252
pip install pytest-cov
240253
254+
# We need to downgrade to numpy<2 for torch<2.3 compatibility.
255+
- name: Downgrade NumPy
256+
if: startsWith(matrix.torch_version, '2.2.')
257+
run: pip install "numpy<2"
258+
241259
- name: Show installed packages
242260
run: pip list
243261

benchmarking/int8/row_scale_benchmark.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

deploy.sh

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)