@@ -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
0 commit comments