Skip to content

Commit

Permalink
[Onnx] Switched from using pytest.skip to tvm.testing.known_failing_t…
Browse files Browse the repository at this point in the history
…argets

After merging of the `tvm.testing.parametrize_targets` and
`tvm.testing._auto_parametrize_target` code paths,
`known_failing_targets` can be used in both cases.
  • Loading branch information
Lunderberg committed Aug 3, 2021
1 parent 0d5e557 commit eede865
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/python/frontend/onnx/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,11 +1567,9 @@ def verify_hardsigmoid(input_dim, alpha, beta):


# TODO (mbrookhart, electriclilies) Fix argmin on GPU and enable this test
@tvm.testing.known_failing_targets("cuda")
@tvm.testing.parametrize_targets
def test_forward_arg_min_max(target, dev):
if "cuda" in target:
pytest.skip("Fails on CUDA")

def verify_argreduce(input_dim, op_name, axis=None, keepdims=None):
a_np1 = np.random.uniform(-10, 10, input_dim).astype(np.int32)
out_shape = list(a_np1.shape)
Expand Down Expand Up @@ -5039,11 +5037,9 @@ def verify_reverse_sequence(x, sequence_lens, batch_axis, time_axis):
verify_reverse_sequence(x, sequence_lens, 1, 0)


@tvm.testing.known_failing_targets("cuda")
@tvm.testing.parametrize_targets
def test_qlinearconv(target, dev):
if "cuda" in target:
pytest.skip("Fails on CUDA")

def verify_qlinearconv(
x_shape,
w_shape,
Expand Down Expand Up @@ -5341,11 +5337,9 @@ def get_random_uniform(shape, dtype="float32", high=1.0, low=0.0, seed=None):
tvm.testing.assert_allclose(real, expected, rtol=1e-5)


@tvm.testing.known_failing_targets("cuda")
@tvm.testing.parametrize_targets
def test_convinteger(target, dev):
if "cuda" in target:
pytest.skip("Fails on CUDA")

def verify_convinteger(
x_shape,
w_shape,
Expand Down

0 comments on commit eede865

Please sign in to comment.