@@ -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
@@ -139,6 +147,11 @@ jobs:
139147 pip install -e ".[test]"
140148 pip install pytest-cov
141149
150+ # We need to downgrade to numpy<2 for torch<2.3 compatibility.
151+ - name : Downgrade NumPy
152+ if : startsWith(matrix.torch_version, '2.2.')
153+ run : pip install "numpy<2"
154+
142155 - name : Show installed packages
143156 run : pip list
144157
@@ -148,7 +161,7 @@ jobs:
148161 - name : Run tests
149162 run : pytest --durations=100
150163
151- # cuda-aarch64-tests :
164+ # test- cuda-aarch64:
152165 # if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
153166 # needs: build-cuda
154167 # strategy:
@@ -171,7 +184,7 @@ jobs:
171184
172185
173186
174- cuda-tests :
187+ test-cuda :
175188 if : github.repository == 'bitsandbytes-foundation/bitsandbytes'
176189 needs : build-cuda
177190 strategy :
@@ -183,7 +196,7 @@ jobs:
183196 cuda_version : ["11.8.0", "12.6.3", "12.8.1"]
184197 include :
185198 - cuda_version : " 11.8.0"
186- torch_version : " 2.4.1 "
199+ torch_version : " 2.2.2 "
187200 pypi_index : " https://download.pytorch.org/whl/cu118"
188201 - cuda_version : " 12.6.3"
189202 torch_version : " 2.6.0"
@@ -251,6 +264,11 @@ jobs:
251264 pip install -e ".[test]"
252265 pip install pytest-cov
253266
267+ # We need to downgrade to numpy<2 for torch<2.3 compatibility.
268+ - name : Downgrade NumPy
269+ if : startsWith(matrix.torch_version, '2.2.')
270+ run : pip install "numpy<2"
271+
254272 - name : Show installed packages
255273 run : pip list
256274
0 commit comments