Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
[ci] Disable flaky ethosu + roofline tests (apache#12956)
Browse files Browse the repository at this point in the history
These are all segfaulting in main (see apache#12955, apache#12933, and apache#12841) so
they need to be skipped until a fix is merged.

Co-authored-by: driazati <driazati@users.noreply.github.com>
  • Loading branch information
2 people authored and xinetzone committed Nov 25, 2022
1 parent 9c6fb4d commit 99d00ef
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
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

0 comments on commit 99d00ef

Please sign in to comment.