This is an automated email from the ASF dual-hosted git repository.

syfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 151696f  [unittests] Skip import of tvm.micro if micro-TVM was not 
enabled (#9301)
151696f is described below

commit 151696fbc8808f128c4bf163fcfff5e485c095c5
Author: Krzysztof Parzyszek <[email protected]>
AuthorDate: Sun Oct 17 22:24:06 2021 -0500

    [unittests] Skip import of tvm.micro if micro-TVM was not enabled (#9301)
---
 tests/python/unittest/test_crt.py               | 1 +
 tests/python/unittest/test_micro_project_api.py | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/tests/python/unittest/test_crt.py 
b/tests/python/unittest/test_crt.py
index 62e68ab..9450a93 100644
--- a/tests/python/unittest/test_crt.py
+++ b/tests/python/unittest/test_crt.py
@@ -35,6 +35,7 @@ from tvm.target import Target
 from tvm.topi.utils import get_const_tuple
 from tvm.topi.testing import conv2d_nchw_python
 
+pytest.importorskip("tvm.micro.testing")
 from tvm.micro.testing import check_tune_log
 
 BUILD = True
diff --git a/tests/python/unittest/test_micro_project_api.py 
b/tests/python/unittest/test_micro_project_api.py
index b5e2a57..e319318 100644
--- a/tests/python/unittest/test_micro_project_api.py
+++ b/tests/python/unittest/test_micro_project_api.py
@@ -25,6 +25,8 @@ from unittest import mock
 import pytest
 
 import tvm
+
+pytest.importorskip("tvm.micro")
 from tvm.micro import project_api
 
 

Reply via email to