diff --git a/tests/torch/ptq/test_weights_compression.py b/tests/torch/ptq/test_weights_compression.py index a0056d09e5f..ba64f1341b8 100644 --- a/tests/torch/ptq/test_weights_compression.py +++ b/tests/torch/ptq/test_weights_compression.py @@ -246,6 +246,8 @@ def test_get_dtype_attribute_of_parameter(): @pytest.mark.parametrize("device", ("cpu", "cuda")) @pytest.mark.parametrize("dtype", ("float16", "float32")) def test_model_devices_and_precisions(device, dtype): + if device == "cuda" and not torch.cuda.is_available(): + pytest.skip("Skipping for CPU-only setups") device = torch.device(device) dtype = torch.float16 if dtype == "float16" else torch.float32