gromero opened a new pull request #9632:
URL: https://github.com/apache/tvm/pull/9632
Do not generate 'tvmc micro' subcommand and disable micro device option
in 'tvmc run' when TVM is built without support for microTVM, i.e. with
set(USE_MICRO OFF).
Otherwise tvmc will crash on importing any `tvm.micro` module / class. For
instance:
```
gromero@amd:~/git/tvm/build$ tvmc -h
Traceback (most recent call last):
File "/home/gromero/git/tvm/python/tvm/micro/session.py", line 35, in
<module>
from .base import _rpc_connect
ImportError: cannot import name '_rpc_connect' from 'tvm.micro.base'
(/home/gromero/git/tvm/python/tvm/micro/base.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/home/gromero/git/tvm/python/tvm/driver/tvmc/__init__.py", line 22,
in <module>
from . import micro
File "/home/gromero/git/tvm/python/tvm/driver/tvmc/micro.py", line 26, in
<module>
import tvm.micro.project as project
File "/home/gromero/git/tvm/python/tvm/micro/__init__.py", line 28, in
<module>
from .session import (
File "/home/gromero/git/tvm/python/tvm/micro/session.py", line 37, in
<module>
raise ImportError("micro tvm is not enabled. Set USE_MICRO to ON in
config.cmake")
ImportError: micro tvm is not enabled. Set USE_MICRO to ON in config.cmake
gromero@amd:~/git/tvm/build$
```
For any user, which is bad specially for the ones not interested in using
`tvmc` for micro targets.
--
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]