This is an automated email from the ASF dual-hosted git repository.
ekalda 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 48d9165263 [microNPU] Fix skip tests when Vela is not present (#14587)
48d9165263 is described below
commit 48d916526307017f87cc47c648bb591ad746c01f
Author: Luke Hutton <[email protected]>
AuthorDate: Wed Apr 12 15:58:59 2023 +0100
[microNPU] Fix skip tests when Vela is not present (#14587)
This was failing locally due to an indirect import in `infra.py`.
Also ensure both tests are run by using the standard
`tvm.testing.main()` function to run the tests.
---
.../contrib/test_ethosu/test_pass_operations_distribution.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/tests/python/contrib/test_ethosu/test_pass_operations_distribution.py
b/tests/python/contrib/test_ethosu/test_pass_operations_distribution.py
index 2a9d88e412..17f973d8b3 100644
--- a/tests/python/contrib/test_ethosu/test_pass_operations_distribution.py
+++ b/tests/python/contrib/test_ethosu/test_pass_operations_distribution.py
@@ -15,8 +15,12 @@
# specific language governing permissions and limitations
# under the License.
import pytest
+
+pytest.importorskip("ethosu.vela")
+
import numpy as np
+import tvm
from tvm import relay
from tests.python.contrib.test_ethosu.infra import get_tflite_graph
from tvm.relay.op.contrib.ethosu import partition_for_ethosu
@@ -28,7 +32,6 @@ def test_operations_distribution_ethos():
tflite = pytest.importorskip("tflite")
tensorflow = pytest.importorskip("tensorflow")
- pytest.importorskip("ethosu.vela")
import tensorflow as tf
@@ -100,7 +103,6 @@ def test_operations_distribution_generic():
tflite = pytest.importorskip("tflite")
tensorflow = pytest.importorskip("tensorflow")
- pytest.importorskip("ethosu.vela")
import tensorflow as tf
@@ -170,4 +172,4 @@ def test_operations_distribution_generic():
if __name__ == "__main__":
- test_operations_distribution()
+ tvm.testing.main()