Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Disable flaky ethosu + roofline tests #12956

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions python/tvm/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1752,22 +1752,24 @@ def fetch_model_from_url(
return tvmc_model.mod, tvmc_model.params


def xfail_parameterizations(*xfail_params, reason):
def _mark_parameterizations(*params, marker_fn, reason):
"""
Mark tests with a nodeid parameters that exactly matches one in params as
xfail. Useful for quickly marking tests as xfail when they have a large
Mark tests with a nodeid parameters that exactly matches one in params.
Useful for quickly marking tests as xfail when they have a large
combination of parameters.
"""
xfail_params = set(xfail_params)
params = set(params)

def decorator(func):
@functools.wraps(func)
def wrapper(request, *args, **kwargs):
if "[" in request.node.name and "]" in request.node.name:
# Strip out the test name and the [ and ] brackets
params_from_name = request.node.name[len(request.node.originalname) + 1 : -1]
if params_from_name in xfail_params:
pytest.xfail(reason=f"xfail on nodeid {request.node.nodeid}: " + reason)
if params_from_name in params:
marker_fn(
reason=f"{marker_fn.__name__} on nodeid {request.node.nodeid}: " + reason
)

return func(request, *args, **kwargs)

Expand All @@ -1776,6 +1778,14 @@ def wrapper(request, *args, **kwargs):
return decorator


def xfail_parameterizations(*xfail_params, reason):
return _mark_parameterizations(*xfail_params, marker_fn=pytest.xfail, reason=reason)


def skip_parameterizations(*skip_params, reason):
return _mark_parameterizations(*skip_params, marker_fn=pytest.skip, reason=reason)


def main():
test_file = inspect.getsourcefile(sys._getframe(1))
sys.exit(pytest.main([test_file] + sys.argv[1:]))
Expand Down
2 changes: 1 addition & 1 deletion tests/python/contrib/test_ethosu/test_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def binary_elementwise(lhs, rhs):
)


@pytest.mark.xfail(strict=False, reason="See https://github.com/apache/tvm/issues/10487")
@pytest.mark.skip(reason="See https://github.com/apache/tvm/issues/12634")
@pytest.mark.parametrize(
"accel_type",
ACCEL_TYPES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
],
],
)
def test_depthwise_conv2d_single(trial):
@tvm.testing.skip_parameterizations(
"trial3", reason="See https://github.com/apache/tvm/issues/12841"
)
def test_depthwise_conv2d_single(request, trial):
def _get_func(
ifm_shape,
channels,
Expand Down
1 change: 1 addition & 0 deletions tests/python/unittest/test_roofline.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@


@tvm.testing.parametrize_targets("llvm", "cuda")
@pytest.mark.skip(reason="See https://github.com/apache/tvm/issues/12955")
def test_estimate_peak_flops(target, dev):
server = rpc.Server(key="roofline_flops")
remote = rpc.connect("127.0.0.1", server.port, key="roofline_flops")
Expand Down