Skip to content

Commit

Permalink
enable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyu-work committed Jan 8, 2025
1 parent b5aa78e commit 39baa6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions test/unit_test/passes/inc/test_inc_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
from olive.passes.onnx.inc_quantization import IncDynamicQuantization, IncQuantization, IncStaticQuantization


# TODO(team): 55133 Linux GPU CI is failing with the following test. Need to investigate and fix it.
@pytest.mark.skipif(
platform.system() == OS.WINDOWS or torch.cuda.is_available() or True,
reason="Skip test on Windows. neural-compressor import is hanging on Windows.",
platform.system() == OS.WINDOWS, reason="Skip test on Windows. neural-compressor import is hanging on Windows."
)
def test_inc_quantization(tmp_path):
ov_model = get_onnx_model(tmp_path)
Expand Down Expand Up @@ -73,10 +71,8 @@ def test_inc_quantization(tmp_path):
assert "QLinearConv" in [node.op_type for node in quantized_model.load_model().graph.node]


# TODO(team): 55133 Linux GPU CI is failing with the following test. Need to investigate and fix it.
@pytest.mark.skipif(
platform.system() == OS.WINDOWS or torch.cuda.is_available() or True,
reason="Skip test on Windows. neural-compressor import is hanging on Windows.",
platform.system() == OS.WINDOWS, reason="Skip test on Windows. neural-compressor import is hanging on Windows."
)
def test_inc_weight_only_quantization(tmp_path):
ov_model = get_onnx_model(tmp_path)
Expand Down Expand Up @@ -113,10 +109,8 @@ def test_inc_weight_only_quantization(tmp_path):
assert Path(quantized_model.model_path).is_file()


# TODO(team): 55133 Linux GPU CI is failing with the following test. Need to investigate and fix it.
@pytest.mark.skipif(
platform.system() == OS.WINDOWS or torch.cuda.is_available() or True,
reason="Skip test on Windows. neural-compressor import is hanging on Windows.",
platform.system() == OS.WINDOWS, reason="Skip test on Windows. neural-compressor import is hanging on Windows."
)
@patch.dict("neural_compressor.quantization.STRATEGIES", {"auto": MagicMock()})
@patch("olive.passes.onnx.inc_quantization.model_proto_to_olive_model")
Expand Down
2 changes: 1 addition & 1 deletion test/unit_test/passes/onnx/test_mnb_to_qdq.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def forward(self, x):
@pytest.mark.parametrize("use_transpose_op", [True, False])
@pytest.mark.parametrize("use_int4", [True, False])
@pytest.mark.parametrize("add_zero_point", [True, False])
@pytest.mark.parametrize("execution_provider", ["CPUExecutionProvider", "CUDAExecutionProvider"])
@pytest.mark.parametrize("execution_provider", ["CPUExecutionProvider"])
def test_mnb_to_qdq(create_mnb_model, execution_provider, add_zero_point, use_int4, use_transpose_op, tmp_path):
available_providers = onnxruntime.get_available_providers()
if execution_provider not in available_providers:
Expand Down

0 comments on commit 39baa6b

Please sign in to comment.