Skip to content

Commit b6bade8

Browse files
authored
Merge branch 'main' into docfix
2 parents b4de8c5 + d9333aa commit b6bade8

47 files changed

Lines changed: 1338 additions & 1556 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 92 additions & 10 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.1"]
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
@@ -129,12 +137,21 @@ jobs:
129137
with:
130138
python-version: 3.9
131139

140+
- name: Setup MSVC
141+
if: startsWith(matrix.os, 'windows')
142+
uses: ilammy/msvc-dev-cmd@v1.13.0 # to use cl for torch.compile
143+
132144
- name: Install dependencies
133145
run: |
134146
pip install torch==${{ matrix.torch_version }} --index-url https://download.pytorch.org/whl/cpu
135147
pip install -e ".[test]"
136148
pip install pytest-cov
137149
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+
138155
- name: Show installed packages
139156
run: pip list
140157

@@ -144,7 +161,47 @@ jobs:
144161
- name: Run tests
145162
run: pytest --durations=100
146163

147-
# cuda-aarch64-tests:
164+
test-cpu-ipex:
165+
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
166+
needs: build-cpu
167+
runs-on: banb-aws-general-8-plus-use1-public-80
168+
env:
169+
BNB_TEST_DEVICE: cpu
170+
steps:
171+
- uses: actions/checkout@v4
172+
173+
- name: Download build artifact
174+
uses: actions/download-artifact@v4
175+
with:
176+
name: lib_cpu_ubuntu-22.04_x86_64
177+
path: bitsandbytes/
178+
merge-multiple: true
179+
180+
- name: Setup Python
181+
uses: actions/setup-python@v5
182+
with:
183+
python-version: 3.9
184+
185+
- name: Install dependencies
186+
run: |
187+
pip install torch==2.7.1 --index-url https://download.pytorch.org/whl/cpu
188+
pip install intel_extension_for_pytorch==2.7.0 --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/cpu/us/
189+
pip install -e ".[test]"
190+
pip install pytest-cov
191+
192+
- name: Show installed packages
193+
run: pip list
194+
195+
- name: Show environment information
196+
run: python -m torch.utils.collect_env
197+
198+
- name: IPEX smoke test
199+
run: python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__);"
200+
201+
- name: Run tests
202+
run: pytest --durations=100
203+
204+
# test-cuda-aarch64:
148205
# if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
149206
# needs: build-cuda
150207
# strategy:
@@ -165,9 +222,7 @@ jobs:
165222
# - name: Show pip packages
166223
# run: pip list
167224

168-
169-
170-
cuda-tests:
225+
test-cuda:
171226
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
172227
needs: build-cuda
173228
strategy:
@@ -179,27 +234,49 @@ jobs:
179234
cuda_version: ["11.8.0", "12.6.3", "12.8.1"]
180235
include:
181236
- cuda_version: "11.8.0"
182-
torch_version: "2.4.1"
237+
torch_version: "2.2.2"
183238
pypi_index: "https://download.pytorch.org/whl/cu118"
184239
- cuda_version: "12.6.3"
185240
torch_version: "2.6.0"
186241
pypi_index: "https://download.pytorch.org/whl/cu126"
187242
- cuda_version: "12.8.1"
188-
torch_version: "2.7.0"
243+
torch_version: "2.7.1"
189244
pypi_index: "https://download.pytorch.org/whl/cu128"
190245

191-
# L40S runners
246+
247+
# Linux L40S runners
192248
- os: ubuntu-22.04
193249
gpu: L40S
194250
runner: bandb-aws-g6e-4xlarge-plus-use1-public-80
195251

196-
# T4 runners
252+
# Linux T4 runners
197253
- os: ubuntu-22.04
198254
gpu: T4
199255
runner: bandb-aws-g4dn-4xlarge-plus-use1-public-80
256+
257+
# Specific Windows runners using cu118
200258
- os: windows-2025
259+
arch: x86_64
260+
gpu: T4
261+
runner: CUDA-Windows-x64
262+
cuda_version: "11.8.0"
263+
torch_version: "2.2.0"
264+
pypi_index: "https://download.pytorch.org/whl/cu118"
265+
- os: windows-2025
266+
arch: x86_64
201267
gpu: T4
202268
runner: CUDA-Windows-x64
269+
cuda_version: "11.8.0"
270+
torch_version: "2.6.0"
271+
pypi_index: "https://download.pytorch.org/whl/cu118"
272+
- os: windows-2025
273+
arch: x86_64
274+
gpu: T4
275+
runner: CUDA-Windows-x64
276+
cuda_version: "11.8.0"
277+
torch_version: "2.7.1"
278+
pypi_index: "https://download.pytorch.org/whl/cu118"
279+
203280
exclude:
204281
# Our current T4 Windows runner has a driver too old (471.11)
205282
# and cannot support CUDA 12+. Skip for now.
@@ -238,6 +315,11 @@ jobs:
238315
pip install -e ".[test]"
239316
pip install pytest-cov
240317
318+
# We need to downgrade to numpy<2 for torch<2.3 compatibility.
319+
- name: Downgrade NumPy
320+
if: startsWith(matrix.torch_version, '2.2.')
321+
run: pip install "numpy<2"
322+
241323
- name: Show installed packages
242324
run: pip list
243325

README.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,25 @@ bitsandbytes has the following minimum requirements for all platforms:
2525

2626
#### Accelerator support:
2727

28+
<small>Note: this table reflects the status of the current development branch. For the latest stable release, see the
29+
[document in the v0.46.0 tag](https://github.com/bitsandbytes-foundation/bitsandbytes/blob/0.46.0/README.md#accelerator-support).
30+
</small>
31+
32+
##### Legend:
33+
🚧 = In Development,
34+
〰️ = Partially Supported,
35+
✅ = Supported,
36+
❌ = Not Supported
37+
2838
<table>
2939
<thead>
3040
<tr>
3141
<th>Platform</th>
3242
<th>Accelerator</th>
3343
<th>Hardware Requirements</th>
34-
<th>Support Status</th>
44+
<th>LLM.int8()</th>
45+
<th>QLoRA 4-bit</th>
46+
<th>8-bit Optimizers</th>
3547
</tr>
3648
</thead>
3749
<tbody>
@@ -42,13 +54,17 @@ bitsandbytes has the following minimum requirements for all platforms:
4254
<td align="right">x86-64</td>
4355
<td>◻️ CPU</td>
4456
<td>AVX2</td>
45-
<td>〰️ Partial Support</td>
57+
<td>〰️</td>
58+
<td>〰️</td>
59+
<td>❌</td>
4660
</tr>
4761
<tr>
4862
<td></td>
4963
<td>🟩 NVIDIA GPU <br><code>cuda</code></td>
5064
<td>SM50+ minimum<br>SM75+ recommended</td>
51-
<td>✅ Full Support</td>
65+
<td>✅</td>
66+
<td>✅</td>
67+
<td>✅</td>
5268
</tr>
5369
<tr>
5470
<td></td>
@@ -57,7 +73,9 @@ bitsandbytes has the following minimum requirements for all platforms:
5773
CDNA: gfx90a, gfx942<br>
5874
RDNA: gfx1100, gfx1200
5975
</td>
60-
<td>🚧 In Development</td>
76+
<td>🚧</td>
77+
<td>🚧</td>
78+
<td>🚧</td>
6179
</tr>
6280
<tr>
6381
<td></td>
@@ -67,25 +85,33 @@ bitsandbytes has the following minimum requirements for all platforms:
6785
Arc A-Series (Alchemist)<br>
6886
Arc B-Series (Battlemage)
6987
</td>
70-
<td>🚧 In Development</td>
88+
<td>🚧</td>
89+
<td>🚧</td>
90+
<td>🚧</td>
7191
</tr>
7292
<tr>
7393
<td></td>
7494
<td>🟪 Intel Gaudi <br><code>hpu</code></td>
7595
<td>Gaudi1, Gaudi2, Gaudi3</td>
76-
<td>🚧 In Development</td>
96+
<td>🚧</td>
97+
<td>🚧</td>
98+
<td>❌</td>
7799
</tr>
78100
<tr>
79101
<td align="right">aarch64</td>
80102
<td>◻️ CPU</td>
81103
<td></td>
82-
<td>〰️ Partial Support</td>
104+
<td>〰️</td>
105+
<td>〰️</td>
106+
<td>❌</td>
83107
</tr>
84108
<tr>
85109
<td></td>
86110
<td>🟩 NVIDIA GPU <br><code>cuda</code></td>
87111
<td>SM75, SM80, SM90, SM100</td>
88-
<td>✅ Full Support</td>
112+
<td>✅</td>
113+
<td>✅</td>
114+
<td>✅</td>
89115
</tr>
90116
<tr>
91117
<td colspan="4">🪟 <strong>Windows 11 / Windows Server 2019+</strong></td>
@@ -94,13 +120,17 @@ bitsandbytes has the following minimum requirements for all platforms:
94120
<td align="right">x86-64</td>
95121
<td>◻️ CPU</td>
96122
<td>AVX2</td>
97-
<td>〰️ Partial Support</td>
123+
<td>〰️</td>
124+
<td>〰️</td>
125+
<td>❌</td>
98126
</tr>
99127
<tr>
100128
<td></td>
101129
<td>🟩 NVIDIA GPU <br><code>cuda</code></td>
102130
<td>SM50+ minimum<br>SM75+ recommended</td>
103-
<td>✅ Full Support</td>
131+
<td>✅</td>
132+
<td>✅</td>
133+
<td>✅</td>
104134
</tr>
105135
<tr>
106136
<td></td>
@@ -109,7 +139,9 @@ bitsandbytes has the following minimum requirements for all platforms:
109139
Arc A-Series (Alchemist) <br>
110140
Arc B-Series (Battlemage)
111141
</td>
112-
<td>🚧 In Development</td>
142+
<td>🚧</td>
143+
<td>🚧</td>
144+
<td>🚧</td>
113145
</tr>
114146
<tr>
115147
<td colspan="4">🍎 <strong>macOS 13.1+</strong></td>
@@ -118,13 +150,17 @@ bitsandbytes has the following minimum requirements for all platforms:
118150
<td align="right">arm64</td>
119151
<td>◻️ CPU</td>
120152
<td>Apple M1+</td>
121-
<td>🛣️ Future Roadmap</td>
153+
<td>🚧</td>
154+
<td>🚧</td>
155+
<td>❌</td>
122156
</tr>
123157
<tr>
124158
<td></td>
125159
<td>⬜ Metal <br><code>mps</code></td>
126160
<td>Apple M1+</td>
127-
<td>🛣️ Future Roadmap</td>
161+
<td>🚧</td>
162+
<td>🚧</td>
163+
<td>❌</td>
128164
</tbody>
129165
</table>
130166

0 commit comments

Comments
 (0)