Skip to content

Commit e55b5c0

Browse files
CI: Update to test with torch 2.12.0 and nightly (#1948)
* CI: Update to test with torch 2.12 on CPU * Additional CI fixes * Fix? * Fix? * Windows is no fun. * additional windows cpu test guard
1 parent 6e55ec8 commit e55b5c0

5 files changed

Lines changed: 18 additions & 8 deletions

File tree

.github/workflows/tests-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
platform: [linux-x64, linux-aarch64, macos, windows]
2121
# default runners don't have AVX-512 support, but icelake does
2222
cpu_type: ["", icelake]
23-
torch_version: ["2.4.1", "2.10.0", "2.11.0"]
23+
torch_version: ["2.4.1", "2.12.0", "nightly"]
2424

2525
exclude:
2626
# aarch64 minimum torch version is 2.5.1

.github/workflows/tests-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
platform: [linux-x64, linux-aarch64, macos]
3232
# default runners don't have AVX-512 support, but icelake does
3333
cpu_type: ["", icelake]
34-
torch_version: ["2.4.1", "2.11.0"]
34+
torch_version: ["2.4.1", "2.12.0"]
3535

3636
exclude:
3737
# aarch64 minimum torch version is 2.5.1

bitsandbytes/backends/cpu/ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ def _(
153153
lambda: f"Blockwise 4bit dequantization only supports 16/32-bit floats, but got {dtype}",
154154
)
155155

156-
# Fallback as AVX512 implementation has accuracy issues with fp16/fp32 and blocksize >= 2048
156+
# Fallback as AVX512 implementation has accuracy issues with blocksize >= 2048.
157157
# Note: this is not a common use case.
158-
avx512_fallback = _has_avx512 and blocksize >= 2048 and dtype != torch.bfloat16
158+
avx512_fallback = _has_avx512 and blocksize >= 2048
159159

160160
# Odd shape is not supported by this kernel; fallback to generic implementation
161161
shape_fallback = shape[-1] % 2 != 0

tests/test_linear4bit.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,13 @@ def test_linear4bit_torch_compile(device, quant_type, compute_dtype, compress_st
365365
if fullgraph and torch.__version__ < (2, 8, 0, "dev"):
366366
pytest.skip("fullgraph mode requires torch 2.8 or higher")
367367

368-
if device == "cuda" and platform.system() == "Windows":
369-
pytest.skip("Triton is not officially supported on Windows")
368+
if platform.system() == "Windows":
369+
if device == "cuda":
370+
pytest.skip("Triton is not officially supported on Windows")
371+
if device == "cpu" and torch.__version__ < (2, 7):
372+
# torch.compile inductor on Windows CPU has include path bugs fixed in torch 2.7
373+
# https://github.com/pytorch/pytorch/pull/148271
374+
pytest.skip("torch.compile inductor on Windows CPU requires torch >= 2.7")
370375

371376
# Has a strange regression on Linux aarch64 CPU in torch==2.6.0 when fullgraph=False.
372377
if (

tests/test_linear8bitlt.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,13 @@ def test_linear8bitlt_torch_compile(device, threshold, bias, fullgraph, mode):
261261
if fullgraph and torch.__version__ < (2, 5):
262262
pytest.skip("fullgraph tracing of MatmulLtState requires torch >= 2.5")
263263

264-
if device == "cuda" and platform.system() == "Windows":
265-
pytest.skip("Triton is not officially supported on Windows")
264+
if platform.system() == "Windows":
265+
if device == "cuda":
266+
pytest.skip("Triton is not officially supported on Windows")
267+
if device == "cpu" and torch.__version__ < (2, 7):
268+
# torch.compile inductor on Windows CPU has include path bugs fixed in torch 2.7
269+
# https://github.com/pytorch/pytorch/pull/148271
270+
pytest.skip("torch.compile inductor on Windows CPU requires torch >= 2.7")
266271

267272
if device == "cuda" and mode == "reduce-overhead" and fullgraph and threshold > 0 and torch.__version__ >= (2, 10):
268273
pytest.xfail("Failure due to regression in torch 2.10 related to reduced overhead mode and CUDA.")

0 commit comments

Comments
 (0)