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 2021/07/30 15:17:58 UTC

[GitHub] [tvm] minils opened a new issue #8603: [VTA] `tvm.rpc.server.start` is not called

minils opened a new issue #8603:
URL: https://github.com/apache/tvm/issues/8603


   When running the script `python vta/tests/python/pynq/test_program_rpc.py`, the function `tvm.rpc.server.start`is never called on the target (PYNQ in my case) which leads to an `AttributeError: Module has no function 'tvm.contrib.vta.init'` because the function is not registered (see `vta/python/vta/exec/rpc_server.py:65`).
   
   The function should be called at `src/runtime/rpc/rpc_endpoint.cc:728`
   ```
   void RPCEndpoint::ServerLoop() {                                                                                    
     if (const auto* f = Registry::Get("tvm.rpc.server.start")) {                                                      
       (*f)();                                                                                                         
     }                                                                                                                 
     TVMRetValue rv;                                                                                                   
     ICHECK(HandleUntilReturnEvent(false, [](TVMArgs) {}) == RPCCode::kShutdown);                                      
     if (const auto* f = Registry::Get("tvm.rpc.server.shutdown")) {                                                   
       (*f)();                                                                                                         
     }                                                                                                                 
     channel_.reset(nullptr);                                                                                          
   }
   ```
   But the ServerLoop is also not called. Not sure why...


-- 
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: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] minils commented on issue #8603: [VTA] `tvm.rpc.server.start` is not called

Posted by GitBox <gi...@apache.org>.
minils commented on issue #8603:
URL: https://github.com/apache/tvm/issues/8603#issuecomment-890797454


   Thanks @tqchen for looking into this.
   Running the rpc server now gives another error:
   ```
   xilinx@pynq:~/tvm$ sudo ./apps/vta_rpc/start_rpc_server.sh
   Traceback (most recent call last):
     File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
       mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
     File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
       __import__(pkg_name)
     File "/home/xilinx/tvm/vta/python/vta/__init__.py", line 25, in <module>
       from .autotvm import module_loader
     File "/home/xilinx/tvm/vta/python/vta/autotvm.py", line 21, in <module>
       from . import rpc_client
     File "/home/xilinx/tvm/vta/python/vta/rpc_client.py", line 22, in <module>
       from .environment import get_env
     File "/home/xilinx/tvm/vta/python/vta/environment.py", line 296, in <module>
       @register_intrin_lowering("tir.vta.coproc_sync", "default")
     File "/home/xilinx/tvm/python/tvm/ir/op.py", line 223, in _register
       _ffi_api.RegisterOpLowerIntrinsic(op_name, f, target, level)
   AttributeError: module 'tvm.ir._ffi_api' has no attribute 'RegisterOpLowerIntrinsic'
   ```
   
   I could previously fix this error by moving some functions from `vta/python/vta/environment.py` to `vta/python/vta/build_module.py`  (see [fix.patch](https://gist.github.com/minils/a37546d0d186c02952ecc326173db9f0)). But with the latest commits from `main` it doesn't work any more.
   
   


-- 
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: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] tqchen commented on issue #8603: [VTA] `tvm.rpc.server.start` is not called

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #8603:
URL: https://github.com/apache/tvm/issues/8603#issuecomment-889990539


   THanks @minils for reporting. This is likely due to our recent update to rpc server and results the requirement of the function to be registered within the rpc server launch.


-- 
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: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] tqchen commented on issue #8603: [VTA] `tvm.rpc.server.start` is not called

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #8603:
URL: https://github.com/apache/tvm/issues/8603#issuecomment-890002382


   Please see if https://github.com/apache/tvm/pull/8604 fixes the problem


-- 
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: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] tqchen commented on issue #8603: [VTA] `tvm.rpc.server.start` is not called

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #8603:
URL: https://github.com/apache/tvm/issues/8603#issuecomment-893889611


   Thanks for the note, please see if https://github.com/apache/tvm/pull/8671 fixes the problem


-- 
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: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] minils commented on issue #8603: [VTA] `tvm.rpc.server.start` is not called

Posted by GitBox <gi...@apache.org>.
minils commented on issue #8603:
URL: https://github.com/apache/tvm/issues/8603#issuecomment-889964809


   Also see [this thread](https://discuss.tvm.apache.org/t/test-benchmark-topi-conv2d-py-failure-caused-by-attributeerror-module-has-no-function-tvm-contrib-vta-init/10059)


-- 
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: commits-unsubscribe@tvm.apache.org

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