File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1818import re
1919import shutil
2020import tarfile
21+ import subprocess
2122from os import path
2223
2324from unittest import mock
@@ -429,6 +430,32 @@ def test_compile_tflite_module_with_external_codegen_ethos_n78(tflite_mobilenet_
429430 assert os .path .exists (dumps_path )
430431
431432
433+ @tvm .testing .requires_ethosn
434+ def test_cli_compile_tflite_module_with_external_codegen_ethos_n78 (
435+ tmpdir_factory , tflite_mobilenet_v1_1_quant
436+ ):
437+ pytest .importorskip ("tflite" )
438+ tmp_dir = tmpdir_factory .mktemp ("module" )
439+ package_path = tmp_dir .join ("module.tar" )
440+
441+ subprocess .run (
442+ [
443+ "tvmc" ,
444+ "compile" ,
445+ "--target='ethos-n -variant=n78, llvm'" ,
446+ "--dump-code=relay" ,
447+ f"-o={ package_path } " ,
448+ tflite_mobilenet_v1_1_quant ,
449+ ],
450+ check = True ,
451+ capture_output = True ,
452+ )
453+
454+ assert os .path .exists (package_path )
455+ dumps_path = package_path + ".relay"
456+ assert os .path .exists (dumps_path )
457+
458+
432459@tvm .testing .requires_vitis_ai
433460def test_compile_tflite_module_with_external_codegen_vitis_ai (tflite_mobilenet_v1_1_quant ):
434461 pytest .importorskip ("tflite" )
You can’t perform that action at this time.
0 commit comments