From 6e1b3d4848f67d83df45e0422e9c54db27b12f58 Mon Sep 17 00:00:00 2001 From: Matthew Barrett Date: Mon, 8 Nov 2021 17:01:01 +0000 Subject: [PATCH] Add test guards Change-Id: I34e48e4ce4fd14e6c92601412f5029aa08efe8fc --- .../test_ethosu/cascader/test_ethosu_conv2d_matcher.py | 5 ++++- .../test_ethosu/cascader/test_ethosu_inline_matcher.py | 6 ++++-- .../python/contrib/test_ethosu/cascader/test_ethosu_part.py | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/python/contrib/test_ethosu/cascader/test_ethosu_conv2d_matcher.py b/tests/python/contrib/test_ethosu/cascader/test_ethosu_conv2d_matcher.py index fdf43ba9a0fb..4da4a1a7c5cb 100644 --- a/tests/python/contrib/test_ethosu/cascader/test_ethosu_conv2d_matcher.py +++ b/tests/python/contrib/test_ethosu/cascader/test_ethosu_conv2d_matcher.py @@ -14,12 +14,15 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +import pytest + +pytest.importorskip("ethosu.vela") + from tvm import te import tvm.contrib.ethosu.cascader as cs from tvm.relay.backend.contrib.ethosu.te.convolution import match_ethosu_conv2d, conv2d_compute import numpy as np -import pytest def _make_matrices(kernel, stride, dilation, padding, ifm_channels, ifm_layout, ofm_layout): diff --git a/tests/python/contrib/test_ethosu/cascader/test_ethosu_inline_matcher.py b/tests/python/contrib/test_ethosu/cascader/test_ethosu_inline_matcher.py index 0d6e394daa38..a3639ba03077 100644 --- a/tests/python/contrib/test_ethosu/cascader/test_ethosu_inline_matcher.py +++ b/tests/python/contrib/test_ethosu/cascader/test_ethosu_inline_matcher.py @@ -14,13 +14,15 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +import pytest + +pytest.importorskip("ethosu.vela") + from tvm import te from tvm.topi.transform import reshape import tvm.contrib.ethosu.cascader as cs from tvm.relay.backend.contrib.ethosu.te.inline import match_ethosu_inline -import pytest - def test_ethosu_inline_matcher(): ifm_shape = (2, 5, 6) diff --git a/tests/python/contrib/test_ethosu/cascader/test_ethosu_part.py b/tests/python/contrib/test_ethosu/cascader/test_ethosu_part.py index 781498edc17a..ef449a49976c 100644 --- a/tests/python/contrib/test_ethosu/cascader/test_ethosu_part.py +++ b/tests/python/contrib/test_ethosu/cascader/test_ethosu_part.py @@ -14,11 +14,13 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +import pytest + +pytest.importorskip("ethosu.vela") + import tvm.contrib.ethosu.cascader as pl from tvm.contrib.ethosu.cascader.parts import EthosuPart -import pytest - def test_ethosu_part(): te_subgraph = pl.TESubgraph([], None)