This is an automated email from the ASF dual-hosted git repository. sanirudh pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push: new ab94ca3b91 [CI] Disable flaky unit test (#16837) ab94ca3b91 is described below commit ab94ca3b9163e128196bbd6f4c59116ac42dec2e Author: Eric Lunderberg <lunderb...@users.noreply.github.com> AuthorDate: Fri Apr 5 03:34:50 2024 -0500 [CI] Disable flaky unit test (#16837) * [CI] Disable flaky unit test The `test_auto_scheduler_tuning.py::test_tuning_cuda` unit test has sporadic failures on unrelated changes. Seems to be triggered when tuning does not find any valid candidates, and so the "best" candidate of a no-op triggers a "did you forget to bind" error message. * Import pytest before use * typo fix --- tests/python/relay/test_auto_scheduler_tuning.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/python/relay/test_auto_scheduler_tuning.py b/tests/python/relay/test_auto_scheduler_tuning.py index 735486ef27..e2f754aaf4 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 @@ import tvm.testing 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 tune_network(network, target): 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()