Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
Change-Id: I6a6bc9a023afd5a62a3c932dbc3ad535815b3963
  • Loading branch information
lhutton1 committed Aug 1, 2022
1 parent 1924b41 commit 450f599
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/python/driver/tvmc/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import re
import shutil
import tarfile
import subprocess
from os import path

from unittest import mock
Expand Down Expand Up @@ -429,6 +430,32 @@ def test_compile_tflite_module_with_external_codegen_ethos_n78(tflite_mobilenet_
assert os.path.exists(dumps_path)


@tvm.testing.requires_ethosn
def test_cli_compile_tflite_module_with_external_codegen_ethos_n78(
tmpdir_factory, tflite_mobilenet_v1_1_quant
):
pytest.importorskip("tflite")
tmp_dir = tmpdir_factory.mktemp("module")
package_path = tmp_dir.join("module.tar")

subprocess.run(
[
"tvmc",
"compile",
"--target='ethos-n -variant=n78, llvm'",
"--dump-code=relay",
f"-o={package_path}",
tflite_mobilenet_v1_1_quant,
],
check=True,
capture_output=True,
)

assert os.path.exists(package_path)
dumps_path = package_path + ".relay"
assert os.path.exists(dumps_path)


@tvm.testing.requires_vitis_ai
def test_compile_tflite_module_with_external_codegen_vitis_ai(tflite_mobilenet_v1_1_quant):
pytest.importorskip("tflite")
Expand Down

0 comments on commit 450f599

Please sign in to comment.