You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/09/17 11:06:30 UTC

[GitHub] [incubator-tvm] lhutton1 opened a new pull request #6505: [RPC] Lazily import micro when starting an RPC server

lhutton1 opened a new pull request #6505:
URL: https://github.com/apache/incubator-tvm/pull/6505


   Since #6334 the RPC server cannot be started unless USE_MICRO is enabled.
   
   Without USE_MICRO enabled executing the command `python -m tvm.exec.rpc_server --host=0.0.0.0 --port=9090` will result in the following trace:
   ```
   Traceback (most recent call last):
     File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
       "__main__", mod_spec)
     File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
       exec(code, run_globals)
     File "/home/lukhut01/dev/remote-dev-nnvm/src/tvm/python/tvm/exec/rpc_server.py", line 28, in <module>
       from tvm import micro
     File "/home/lukhut01/dev/remote-dev-nnvm/src/tvm/python/tvm/micro/__init__.py", line 26, in <module>
       from .session import create_local_graph_runtime, Session
     File "/home/lukhut01/dev/remote-dev-nnvm/src/tvm/python/tvm/micro/session.py", line 25, in <module>
       from .base import _rpc_connect
   ImportError: cannot import name '_rpc_connect'
   ```
   
   I've tracked this down to an import in `python/tvn/exec/rpc_server.py`: `from tvm import micro` in the top level list of imports. This will mean that we try to import micro when it's not been built. Fix this by lazily importing micro when initializing an rpc server with micro enabled.
   
   cc @areusch, @liangfu, @tqchen 
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen edited a comment on pull request #6505: [RPC] Lazily import micro when starting an RPC server

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #6505:
URL: https://github.com/apache/incubator-tvm/pull/6505#issuecomment-694296275


   LGTM


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen merged pull request #6505: [RPC] Lazily import micro when starting an RPC server

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #6505:
URL: https://github.com/apache/incubator-tvm/pull/6505


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6505: [RPC] Lazily import micro when starting an RPC server

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6505:
URL: https://github.com/apache/incubator-tvm/pull/6505#issuecomment-694296275


   cc @areusch 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] junrushao1994 commented on pull request #6505: [RPC] Lazily import micro when starting an RPC server

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #6505:
URL: https://github.com/apache/incubator-tvm/pull/6505#issuecomment-694578951


   Just encountered the same issue today. Thanks for the quick fix!


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org