Unverified Commit 39b42e74 authored by Vladimir Malinovskii's avatar Vladimir Malinovskii Committed by GitHub
Browse files

Fixed tests for cpu only platforms (#1259)

* fixed test_4bit_warnings on cpu-only platforms

* fixed linear8bit-based tests for cpu only platforms
parent f2b2310e
...@@ -182,7 +182,7 @@ def test_linear_serialization( ...@@ -182,7 +182,7 @@ def test_linear_serialization(
@pytest.fixture @pytest.fixture
def linear8bit(): def linear8bit(requires_cuda):
linear = torch.nn.Linear(32, 96) linear = torch.nn.Linear(32, 96)
linear_custom = Linear8bitLt( linear_custom = Linear8bitLt(
linear.in_features, linear.in_features,
......
...@@ -616,7 +616,7 @@ def test_fp8linear(): ...@@ -616,7 +616,7 @@ def test_fp8linear():
assert bgraderr < 0.00002 assert bgraderr < 0.00002
def test_4bit_warnings(): def test_4bit_warnings(requires_cuda):
dim1 = 64 dim1 = 64
with pytest.warns(UserWarning, match=r"inference or training"): with pytest.warns(UserWarning, match=r"inference or training"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment