Skip to content

Commit 62267d7

Browse files
Guard for torch < 2.5
1 parent 794710d commit 62267d7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/test_parametrize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ def test_error_conditions():
259259

260260
@pytest.mark.parametrize("device", get_available_devices())
261261
@pytest.mark.parametrize("dtype", [torch.float32, torch.float16, torch.bfloat16], ids=describe_dtype)
262+
@pytest.mark.skipif(torch.__version__ < (2, 5), reason="state dict hook requires torch >= 2.5.0")
262263
def test_quant_state_preservation(device, dtype):
263264
"""Test that quantization state is properly preserved and accessible."""
264265
if device == "hpu" and not is_supported_on_hpu("nf4", dtype):

0 commit comments

Comments
 (0)