Skip to content

Commit 4ee6c60

Browse files
Tests: skip test_gemv_eye_4bit on CPU with bf16 when not supported by torch
1 parent 308afcf commit 4ee6c60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_functional.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,9 @@ def test_gemv_4bit(self, device, dim, dtype, storage_type, quant_storage, double
13301330
@pytest.mark.parametrize("dtype", [torch.float16, torch.bfloat16, torch.float32], ids=describe_dtype)
13311331
@pytest.mark.parametrize("double_quant", [False], ids=["DQ_True"])
13321332
def test_gemv_eye_4bit(self, device, storage_type, dtype, double_quant):
1333+
if dtype == torch.bfloat16 and torch.__version__ < (2, 3):
1334+
pytest.skip("eye doe not support bfloat16 on CPU in torch < 2.3")
1335+
13331336
dims = 10
13341337
torch.random.manual_seed(np.random.randint(0, 412424242))
13351338
dims = get_test_dims(0, 8192, n=dims)

0 commit comments

Comments
 (0)