Skip to content

Commit 2596d8f

Browse files
committed
fix(ci): guard CPU half-precision forward test on Windows without CUDA
1 parent ed2bc41 commit 2596d8f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tests/test_quant_linear.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Unit tests for QuantLinear drop-in module and model conversion runtimes."""
22

33
import io
4+
import sys
45

56
import pytest
67
import torch
@@ -190,6 +191,10 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
190191
assert cos_sim > 0.95
191192

192193

194+
@pytest.mark.skipif(
195+
sys.platform == "win32" and not torch.cuda.is_available(),
196+
reason="PyTorch CPU half-precision forward causes 0xc000001d on Windows CI VMs without AVX512-FP16",
197+
)
193198
@pytest.mark.parametrize("dtype", [torch.bfloat16, torch.float16])
194199
@pytest.mark.parametrize("scheme", ["int8", "int4", "ternary"])
195200
def test_half_precision_biased_model_converts_and_runs(dtype, scheme):

0 commit comments

Comments
 (0)