mehrdadh opened a new issue #9612:
URL: https://github.com/apache/tvm/issues/9612


   I tried to use [_main 
function](https://github.com/apache/tvm/blob/7e673f859b5512a69955f0fdb8aff489ebf4cb3a/python/tvm/driver/tvmc/main.py#L55)
 for testing `tvmc micro` on PR #9584 but I ran into this issue.
   
   ### Expected behavior
   Should be able to run `tvmc micro` without error.
   
   ### Actual behavior
   ```
   usage: tvmc [-v] [--version] [-h] {micro,run,tune,compile} ...
   tvmc: error: unrecognized arguments: --project-option 
project_type=host_driven
   ```
   
   ### Environment
   Environment with TVMC and USE_MICRO
   
   ### Steps to reproduce
   ```
   from tvm.driver.tvmc.main import _main
   
   temp_dir = pathlib.Path(tempfile.mkdtemp())
       tar_path = str(temp_dir / "model.tar")
       project_dir = str(temp_dir / "project")
   
       runtime = "crt"
       executor = "graph"
   
   compile_cmd = [
       "compile",
       model_path,
       f"--target={target}",
       f"--runtime={runtime}",
       f"--runtime-crt-system-lib",
       str(1),
       f"--executor={executor}",
       "--executor-graph-link-params",
       str(0),
       "--output",
       tar_path,
       "--output-format",
       "mlf",
       "--pass-config",
       "tir.disable_vectorize=1",
       "--disabled-pass=AlterOpLayout",
   ]
   _main(compile_cmd)
   
   create_project_cmd = [
           "micro",
           "create-project",
           project_dir,
           tar_path,
           platform,
           "--project-option",
           "project_type=host_driven",
       ]
       if platform == "zephyr":
           create_project_cmd.append(f"{platform}_board={board}")
   
   _main(create_project_cmd)
   ```
   
   first tvmc command runs fine, but second fails. I realized in 
`add_micro_parser` it never reaches [this 
line](https://github.com/apache/tvm/blob/7e673f859b5512a69955f0fdb8aff489ebf4cb3a/python/tvm/driver/tvmc/micro.py#L211).
   
   cc @gromero @leandron 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to