diff --git a/tests/python/relay/test_auto_scheduler_tuning.py b/tests/python/relay/test_auto_scheduler_tuning.py index 735486ef27c6..e2f754aaf4e0 100644 --- a/tests/python/relay/test_auto_scheduler_tuning.py +++ b/tests/python/relay/test_auto_scheduler_tuning.py @@ -18,6 +18,7 @@ import tempfile import numpy as np +import pytest from tvm import auto_scheduler, relay from tvm.contrib import graph_executor @@ -26,7 +27,16 @@ from test_auto_scheduler_task_extraction import get_network -def tune_network(network, target): +network = tvm.testing.parameter( + "mlp", + pytest.param("winograd-test", marks=pytest.mark.xfail(reason="Flaky unit test")), +) + + +@tvm.testing.requires_cuda +def test_tuning_cuda(network): + target = "cuda" + # Extract tasks mod, params = get_network(network) target = tvm.target.Target(target) @@ -104,11 +114,5 @@ def get_output(data, lib): tvm.testing.assert_allclose(actual_output2, expected_output, rtol=1e-4, atol=1e-4) -@tvm.testing.requires_cuda -def test_tuning_cuda(): - tune_network("mlp", "cuda") - tune_network("winograd-test", "cuda") - - if __name__ == "__main__": - test_tuning_cuda() + tvm.testing.main()