Skip to content

Commit d6c9697

Browse files
CI Updates (#1947)
* Fix nightly CI for Windows * Skip compile test on T4 for torch 2.13+ * Update workflow naming for CI * Update CI torch versions used
1 parent 3d0f259 commit d6c9697

4 files changed

Lines changed: 26 additions & 24 deletions

File tree

.github/workflows/test-runner.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ on:
3232
type: string
3333
default: ""
3434
description: "CPU architecture for testing: icelake, cascadelake (default: platform default runner)"
35-
torch_nightly:
36-
type: boolean
37-
default: false
38-
description: "Install nightly torch (--pre, no version pin) instead of a stable release"
39-
4035
env:
4136
BNB_SKIP_CMAKE: 1
4237

@@ -210,16 +205,18 @@ jobs:
210205
if: inputs.platform == 'windows'
211206
uses: ilammy/msvc-dev-cmd@v1.13.0
212207

208+
- name: Install torch (nightly)
209+
if: inputs.torch_version == 'nightly'
210+
run: pip install --pre torch --index-url ${{ inputs.pypi_index }}
211+
212+
- name: Install torch
213+
if: inputs.torch_version != 'nightly'
214+
run: pip install --pre torch==${{ inputs.torch_version }} --index-url ${{ inputs.pypi_index }}
215+
213216
- name: Install dependencies
214217
run: |
215-
if [[ "${{ inputs.torch_nightly }}" == "true" ]]; then
216-
pip install --pre torch --index-url ${{ inputs.pypi_index }}
217-
else
218-
pip install torch==${{ inputs.torch_version }} --index-url ${{ inputs.pypi_index }}
219-
fi
220218
pip install -e ".[test]" -v
221219
pip install pytest-cov
222-
shell: bash
223220
224221
# Windows: Downgrade NumPy for torch<2.4.1 compatibility
225222
# See: https://github.com/pytorch/pytorch/issues/131668

.github/workflows/tests-nightly.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
cpu_type: ${{ matrix.cpu_type }}
5050

5151
test-cuda:
52-
name: CUDA
52+
name: CUDA ${{ matrix.cuda_version }} (${{ matrix.platform }}, ${{ matrix.gpu_type }}, ${{ matrix.torch_version }})
5353
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
5454
strategy:
5555
fail-fast: false
@@ -65,17 +65,16 @@ jobs:
6565
torch_version: "2.3.1"
6666
pypi_index: "https://download.pytorch.org/whl/cu118"
6767
- cuda_version: "12.6.3"
68-
torch_version: "2.8.0"
68+
torch_version: "2.11.0"
6969
pypi_index: "https://download.pytorch.org/whl/cu126"
7070
- cuda_version: "12.8.1"
71-
torch_version: "2.9.1"
71+
torch_version: "2.10.0"
7272
pypi_index: "https://download.pytorch.org/whl/cu128"
7373
- cuda_version: "13.0.2"
74-
torch_version: "2.11.0"
74+
torch_version: "2.12.0"
7575
pypi_index: "https://download.pytorch.org/whl/cu130"
7676
- cuda_version: "13.2.0"
77-
torch_version: "2.12.0"
78-
torch_nightly: true
77+
torch_version: "nightly"
7978
pypi_index: "https://download.pytorch.org/whl/nightly/cu132"
8079

8180
# Windows CUDA Tests - T4 GPU (CUDA 11.8 only, multiple torch versions)
@@ -102,5 +101,4 @@ jobs:
102101
cuda_version: ${{ matrix.cuda_version }}
103102
gpu_type: ${{ matrix.gpu_type }}
104103
torch_version: ${{ matrix.torch_version }}
105-
torch_nightly: ${{ matrix.torch_nightly || false }}
106104
pypi_index: ${{ matrix.pypi_index }}

.github/workflows/tests-pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,25 @@ jobs:
5858
cpu_type: ${{ matrix.cpu_type }}
5959

6060
test-cuda:
61-
name: CUDA
61+
name: CUDA ${{ matrix.cuda_version }} (${{ matrix.platform }}, ${{ matrix.gpu_type }}, ${{ matrix.torch_version }})
6262
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
6363
strategy:
6464
fail-fast: false
6565
matrix:
6666
platform: [linux-x64]
6767
gpu_type: [T4, A10, L40S]
68-
cuda_version: ["11.8.0", "12.8.1", "13.0.2"]
68+
cuda_version: ["11.8.0", "12.6.3", "13.0.2"]
6969

7070
include:
7171
# Map CUDA version to torch version and PyPI index
7272
- cuda_version: "11.8.0"
7373
torch_version: "2.3.1"
7474
pypi_index: "https://download.pytorch.org/whl/cu118"
75-
- cuda_version: "12.8.1"
76-
torch_version: "2.9.1"
77-
pypi_index: "https://download.pytorch.org/whl/cu128"
78-
- cuda_version: "13.0.2"
75+
- cuda_version: "12.6.3"
7976
torch_version: "2.11.0"
77+
pypi_index: "https://download.pytorch.org/whl/cu126"
78+
- cuda_version: "13.0.2"
79+
torch_version: "2.12.0"
8080
pypi_index: "https://download.pytorch.org/whl/cu130"
8181

8282
# Windows CUDA test - single configuration

tests/test_linear4bit.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,13 @@ def test_linear4bit_torch_compile_activation_checkpointing(device, quant_type, c
453453
pytest.skip("This configuration is not supported on HPU.")
454454
if device == "cuda" and platform.system() == "Windows":
455455
pytest.skip("Triton is not officially supported on Windows")
456+
if (
457+
device == "cuda"
458+
and torch.cuda.is_available()
459+
and torch.cuda.get_device_capability() < (8, 0)
460+
and torch.__version__ >= (2, 13, 0, "dev")
461+
):
462+
pytest.xfail("no compiled frames error on SM75")
456463
dim = 256
457464
batch_size = 16
458465
compute_dtype = torch.bfloat16

0 commit comments

Comments
 (0)