From efd6dbd954539a5537b2f1eb41b35a38a6fee334 Mon Sep 17 00:00:00 2001 From: Giuseppe Franco Date: Mon, 27 Jan 2025 13:40:32 +0000 Subject: [PATCH] Correct test skipping --- tests/brevitas/graph/test_quantize.py | 3 ++- tests/brevitas_examples/test_llm.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/brevitas/graph/test_quantize.py b/tests/brevitas/graph/test_quantize.py index a6c39942e..8f8ae3c93 100644 --- a/tests/brevitas/graph/test_quantize.py +++ b/tests/brevitas/graph/test_quantize.py @@ -65,7 +65,6 @@ def test_layerwise_quantize_blacklist(kwargs): K: torch.matmul(tensor, rot_mat), 'key': '0', 'expected': ""},]) -@requires_pt_lt('2.2.2', 'Windows') def test_layerwise_quantize_parametrized_modules(kwargs): key = kwargs['key'] exp = kwargs['expected'] @@ -162,6 +161,8 @@ def test_remove_parametrization_entries_state_dict(kwargs): 'key': '0', 'expected': ""},]) def test_quantize_parametrized_modules(kwargs): + if platform.system() == "Windows": + pytest.skip("Skipping dynamo + windows") key = kwargs['key'] exp = kwargs['expected'] rot_mat = kwargs['rot_mat'] diff --git a/tests/brevitas_examples/test_llm.py b/tests/brevitas_examples/test_llm.py index e9ec0b330..5d9bb10fa 100644 --- a/tests/brevitas_examples/test_llm.py +++ b/tests/brevitas_examples/test_llm.py @@ -979,8 +979,8 @@ def test_small_models_rotation_optimization_ppl( @requires_pt_ge('2.4') def test_small_models_rotation_optimization_layer_count( caplog, rotation_optimization_args_layer_count_and_ppl): - if platform.system() == "Windows": - pytest.skip("Skipping dynamo + windows") + if platform.system() != "Linux": + pytest.skip("Skipping dynamo + windows/macos") # Tolerances are stricter for this test, to ensure that it does not pass # with non-optimized quantized perplexities caplog.set_level(logging.INFO)