Skip to content

Commit

Permalink
[ci] Disable flaky ethosu + roofline tests
Browse files Browse the repository at this point in the history
These are all segfaulting in main (see #12955, #12933, and #12841) so
they need to be skipped until a fix is merged.
  • Loading branch information
driazati committed Sep 30, 2022
1 parent d4bf9ec commit 9748664
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 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,6 @@ def binary_elementwise(lhs, rhs):
)


@pytest.mark.xfail(strict=False, reason="See https://github.com/apache/tvm/issues/10487")
@pytest.mark.parametrize(
"accel_type",
ACCEL_TYPES,
Expand All @@ -390,6 +389,7 @@ def binary_elementwise(lhs, rhs):
[(8, 4), (0,), False, False],
],
)
@pytest.mark.skip(reason="See https://github.com/apache/tvm/issues/12634")
def test_mean(accel_type, ifm_shape, axis, keep_dims, use_same_quantization):
np.random.seed(0)
dtype = "int8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
],
],
)
@tvm.testing.skip_parameterizations(
"trial3", reason="See https://github.com/apache/tvm/issues/12841"
)
def test_depthwise_conv2d_single(trial):
def _get_func(
ifm_shape,
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 9748664

Please sign in to comment.