Skip to content

Commit d3d6840

Browse files
Setup XPU CI
1 parent 61db085 commit d3d6840

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,50 @@ jobs:
222222
# - name: Show pip packages
223223
# run: pip list
224224

225+
test-xpu:
226+
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
227+
needs: build-cpu
228+
runs-on:
229+
group: bandb-itac-bmsprpvc1550-8-1gpu
230+
env:
231+
BNB_TEST_DEVICE: xpu
232+
steps:
233+
- name: Show system information
234+
run: |
235+
echo "OS: $(uname -a)"
236+
echo "CPU: $(lscpu | grep 'Model name')"
237+
echo "Memory: $(free -h)"
238+
239+
- name: Show XPU Information
240+
run: xpu-smi
241+
242+
- uses: actions/checkout@v4
243+
244+
- name: Download build artifact
245+
uses: actions/download-artifact@v4
246+
with:
247+
name: lib_cpu_ubuntu-22.04_x86_64
248+
249+
- name: Setup Python
250+
uses: actions/setup-python@v5
251+
with:
252+
python-version: 3.9
253+
254+
- name: Install dependencies
255+
run: |
256+
pip install torch==2.7.1 --index-url https://download.pytorch.org/whl/xpu
257+
258+
pip install -e ".[test]"
259+
pip install pytest-cov
260+
261+
- name: Show installed packages
262+
run: pip list
263+
264+
- name: Show environment information
265+
run: |
266+
python -m torch.utils.collect_env
267+
python -m bitsandbytes
268+
225269
test-cuda:
226270
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
227271
needs: build-cuda

0 commit comments

Comments
 (0)