Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ on:
type: string
default: ""
description: "CPU architecture for testing: icelake, cascadelake (default: platform default runner)"
torch_nightly:
type: boolean
default: false
description: "Install nightly torch (--pre, no version pin) instead of a stable release"

env:
BNB_SKIP_CMAKE: 1

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

- name: Install torch (nightly)
if: inputs.torch_version == 'nightly'
run: pip install --pre torch --index-url ${{ inputs.pypi_index }}

- name: Install torch
if: inputs.torch_version != 'nightly'
run: pip install --pre torch==${{ inputs.torch_version }} --index-url ${{ inputs.pypi_index }}

- name: Install dependencies
run: |
if [[ "${{ inputs.torch_nightly }}" == "true" ]]; then
pip install --pre torch --index-url ${{ inputs.pypi_index }}
else
pip install torch==${{ inputs.torch_version }} --index-url ${{ inputs.pypi_index }}
fi
pip install -e ".[test]" -v
pip install pytest-cov
shell: bash

# Windows: Downgrade NumPy for torch<2.4.1 compatibility
# See: https://github.com/pytorch/pytorch/issues/131668
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
cpu_type: ${{ matrix.cpu_type }}

test-cuda:
name: CUDA
name: CUDA ${{ matrix.cuda_version }} (${{ matrix.platform }}, ${{ matrix.gpu_type }}, ${{ matrix.torch_version }})
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
strategy:
fail-fast: false
Expand All @@ -65,17 +65,16 @@ jobs:
torch_version: "2.3.1"
pypi_index: "https://download.pytorch.org/whl/cu118"
- cuda_version: "12.6.3"
torch_version: "2.8.0"
torch_version: "2.11.0"
pypi_index: "https://download.pytorch.org/whl/cu126"
- cuda_version: "12.8.1"
torch_version: "2.9.1"
torch_version: "2.10.0"
pypi_index: "https://download.pytorch.org/whl/cu128"
- cuda_version: "13.0.2"
torch_version: "2.11.0"
torch_version: "2.12.0"
pypi_index: "https://download.pytorch.org/whl/cu130"
- cuda_version: "13.2.0"
torch_version: "2.12.0"
torch_nightly: true
torch_version: "nightly"
pypi_index: "https://download.pytorch.org/whl/nightly/cu132"

# Windows CUDA Tests - T4 GPU (CUDA 11.8 only, multiple torch versions)
Expand All @@ -102,5 +101,4 @@ jobs:
cuda_version: ${{ matrix.cuda_version }}
gpu_type: ${{ matrix.gpu_type }}
torch_version: ${{ matrix.torch_version }}
torch_nightly: ${{ matrix.torch_nightly || false }}
pypi_index: ${{ matrix.pypi_index }}
12 changes: 6 additions & 6 deletions .github/workflows/tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,25 @@ jobs:
cpu_type: ${{ matrix.cpu_type }}

test-cuda:
name: CUDA
name: CUDA ${{ matrix.cuda_version }} (${{ matrix.platform }}, ${{ matrix.gpu_type }}, ${{ matrix.torch_version }})
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
strategy:
fail-fast: false
matrix:
platform: [linux-x64]
gpu_type: [T4, A10, L40S]
cuda_version: ["11.8.0", "12.8.1", "13.0.2"]
cuda_version: ["11.8.0", "12.6.3", "13.0.2"]

include:
# Map CUDA version to torch version and PyPI index
- cuda_version: "11.8.0"
torch_version: "2.3.1"
pypi_index: "https://download.pytorch.org/whl/cu118"
- cuda_version: "12.8.1"
torch_version: "2.9.1"
pypi_index: "https://download.pytorch.org/whl/cu128"
- cuda_version: "13.0.2"
- cuda_version: "12.6.3"
torch_version: "2.11.0"
pypi_index: "https://download.pytorch.org/whl/cu126"
- cuda_version: "13.0.2"
torch_version: "2.12.0"
pypi_index: "https://download.pytorch.org/whl/cu130"

# Windows CUDA test - single configuration
Expand Down
7 changes: 7 additions & 0 deletions tests/test_linear4bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,13 @@ def test_linear4bit_torch_compile_activation_checkpointing(device, quant_type, c
pytest.skip("This configuration is not supported on HPU.")
if device == "cuda" and platform.system() == "Windows":
pytest.skip("Triton is not officially supported on Windows")
if (
device == "cuda"
and torch.cuda.is_available()
and torch.cuda.get_device_capability() < (8, 0)
and torch.__version__ >= (2, 13, 0, "dev")
):
pytest.xfail("no compiled frames error on SM75")
dim = 256
batch_size = 16
compute_dtype = torch.bfloat16
Expand Down
Loading